home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / LinkSrcB.cpp < prev    next >
Text File  |  1997-03-21  |  63KB  |  1,537 lines

  1. /* @(#) 1.17 com/src/storage/LinkSrcB.cpp, oddataxfer, od96os2, odos29712d 3/7/97 11:16:27 [3/21/97 17:18:55] */
  2. //====START_GENERATED_PROLOG======================================
  3. //
  4. //
  5. //   COMPONENT_NAME: oddataxfer
  6. //
  7. //   CLASSES: none
  8. //
  9. //   ORIGINS: 82,27
  10. //
  11. //
  12. //   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //   All Rights Reserved
  14. //   Licensed Materials - Property of IBM
  15. //   US Government Users Restricted Rights - Use, duplication or
  16. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //
  18. //   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //   OR PERFORMANCE OF THIS SOFTWARE.
  25. //
  26. //====END_GENERATED_PROLOG========================================
  27. //
  28.  
  29. /*
  30.         File:           LinkSrcB.cpp
  31.  
  32.         Contains:       Implementation of ODBaseLinkSource class
  33.  
  34.         Owned by:       Craig Carper
  35.  
  36.         Copyright:      ⌐ 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  37.  
  38.         Change History (most recent first):
  39.  
  40.                 <52>     8/19/96        DJ              24768: Fix helps on Link Source Info Dlg
  41.                 <51>     6/27/96        DJ              23569: Enable compile on AIX platform
  42.                 <50>     10/8/95        TJ              Fixes Recomended by Refball
  43.                 <49>     10/5/95        CC              1241300: Clear removes data interchange
  44.                                                                         properties.
  45.                 <48>     10/3/95        TJ              Added Includes so it compiles
  46.                 <47>     10/3/95        TJ              Changes done by RefBall Team
  47.                 <46>      9/8/95        Té              1281096 FB2:Many constants in ODTypesB
  48.                                                                         without kOD prefix!
  49.                 <45>      9/1/95        CC              1280757: Throw kODErrBrokenLink instead of
  50.                                                                         kODErrBrokenLinkSource.
  51.                 <44>     8/30/95        EL              1279582: Storage ODVolatile problems.
  52.                 <43>     8/29/95        DM              1221778, 1276165: add LinkUpdateAlert-
  53.                                                                         Completed, fUpdatedAfterSuspended,
  54.                                                                         fSuspended, and change Unlock to let
  55.                                                                         LinkMgr show update alerts.
  56.                 <42>     8/21/95        VL              1277291: Added #include <StorUtil.h>.
  57.                 <41>     8/12/95        Té              1276807 Opt./Bug: use StdTypIO routines for
  58.                                                                         portable streaming & smaller footprint
  59.                 <40>      8/3/95        RR              #1257260: Collapse B classes. Remove
  60.                                                                         somInit methods. Don't call IsInitialized
  61.                                                                         or SubclassResponsibility
  62.                 <39>     7/28/95        CC              1183569: Externalize only when dirty.
  63.                 <38>     7/28/95        CC              1242625: ODDeleteObject sets argument to
  64.                                                                         null.
  65.                 <37>     7/27/95        CC              1266053: Unlock only fails if the key is
  66.                                                                         invalid.  Errors caused by notify ing
  67.                                                                         destinations are suppressed.
  68.                                                                         1272086: Unlock returns kODFalse if
  69.                                                                         returned key is null.
  70.                                                                         1266119: InitBaseLinkSource: Set fUpdateID
  71.                                                                         to a valid change ID, in case the initial
  72.                                                                         update of the link fails.
  73.                 <36>     7/24/95        CC              1154714: Don't pass update id to
  74.                                                                         UpdateDependents.
  75.                                                                         Unlock: Set _fKindsUsed to kODNULL after
  76.                                                                         deleting.
  77.                 <35>     7/20/95        CC              1270145: Clear: Fail immediately if draft
  78.                                                                         cannot be changed.
  79.                 <34>     6/21/95        CC              1260937: BB: ODTypeListIterator must return
  80.                                                                         copies of ODType values.
  81.                 <33>     6/19/95        CC              1260182 Lock: Return kODFalse if lock not
  82.                                                                         granted.
  83.                 <32>     6/17/95        CC              1259902: Clear, ContentUpdated: Fail if id
  84.                                                                         is kODUnknownUpdate.
  85.                                                                         1252700: Clear: Inhibit notification if
  86.                                                                         cleared with existing update ID.
  87.                 <31>     6/12/95        CC              1255414: Externalize, CloneInto: Write list
  88.                                                                         of types used if last update failed.
  89.                                                                         Lock: Delete iterator.
  90.                                                                         Added static function
  91.                                                                         RemovePromisedContent; called by
  92.                                                                         Externalize and CloneInto.
  93.                 <30>      6/7/95        CC              1252870: Replaced kODKeyNotGranted with
  94.                                                                         local kODNullKey.
  95.                 <29>      6/2/95        CC              1255474: GetLink: AcquireLink restored to
  96.                                                                         GetLink.
  97.                 <28>     5/26/95        VL              1251403: Multithreading naming support.
  98.                 <27>     5/18/95        CC              1250280: ShowLinkSourceInfo throws on
  99.                                                                         invalid null arguments.
  100.                 <26>     5/17/95        RR              #1250135/1250137/1250143 Getters increment
  101.                                                                         refcount
  102.                 <25>     5/16/95        CC              1246729: Clear removes the kODPropContents
  103.                                                                         property; promises for values in use
  104.                                                                         fulfilled in Unlock.
  105.                 <24>     4/27/95        CC              1242550: Moved circular link detection from
  106.                                                                         ContentUpdated to Unlock.
  107.                                                                         Always set fChangeTime, even if change is
  108.                                                                         not propogated.
  109.                                                                         Removed private method IsChanged.
  110.                 <23>     4/25/95        CC              1242555: Lock: $5 entered as bug 1242561.
  111.                                                                         1242555: Clear: Removed $5 comment.
  112.                 <22>     4/16/95        VL              1230084: Use POUtils in Init,
  113.                                                                         InitFromStorage and CloneInto.
  114.                 <21>     4/14/95        Té              #1235279 BB: InfoUtil & StdTypIO functions
  115.                                                                         should take Environment* and SU* when
  116.                                                                         possible
  117.                 <20>     4/11/95        CC              1235953: Lock link's storage unit, not its
  118.                                                                         content storage unit, to guard access to
  119.                                                                         link content.
  120.                                                                         1236452: Added SOM_CATCH to
  121.                                                                         InitBaseLinkSourceFromStorage.
  122.                 <19>     3/22/95        CC              1230650: Clear() looks for content in wrong
  123.                                                                         storage unit.
  124.                                                                         1229648: Clear() and Externalize() remove
  125.                                                                         unfulfilled promises.
  126.                 <18>      3/9/95        CC              1221471: Added changesAllowed parameter to
  127.                                                                         ShowLinkSourceInfo().
  128.                 <17>     2/15/95        CC              1216124 ShowLinkSourceInfo: Aquire modal
  129.                                                                         focus & deactivate front window.
  130.                 <16>     1/19/95        CC              1193551 Removed GetLinkStatus().
  131.                                                                         1212356 ShowSourceContent: Catch errors
  132.                                                                         returned by
  133.                                                                         ODLinkSource::ShowSourceContent().
  134.                 <15>    12/22/94        CC              1207986 Moved ODSURemoveProperty to
  135.                                                                         StdTypIO.
  136.                 <14>    12/16/94        CC              1203516 Removed ODLink parameter from
  137.                                                                         InitBaseLinkSource(); added SetLink().
  138.                 <13>    12/15/94        CC              1205605 SetSourcePart() - Removed call to
  139.                                                                         SetChangedFromPrev().
  140.                 <12>     10/7/94        CC              1160232 - Alert user of possible link cycle
  141.                                                                         when updating.
  142.                 <11>     10/4/94        CC              1190307 - Robustify for non-existent link
  143.                                                                         object.
  144.                 <10>     9/29/94        RA              1189812: Mods for 68K build.
  145.                  <9>     9/15/94        CC               1186669 - Replace CloneTo() with
  146.                                                                         CloneInto().
  147.                  <8>      9/8/94        CC              #1185565 - Fix Lock();
  148.                                                                         #1185113 - Use StdTypeIO to read/write
  149.                                                                         property values.
  150.                  <7>      9/7/94        CC              #1185344 - Implement Lock() and Unlock()
  151.                                                                         using storage unit locks.
  152.                  <6>     8/26/94        VL              1183174: Use updated cloning APIs.
  153.                  <5>     8/16/94        Té              #1180922  Remove more obsolete types from
  154.                                                                         StdTypes.idl.  Localized kODLinkContent to
  155.                                                                         this file, changed usage of kODUpdateID to
  156.                                                                         kODULong which is what the format of an
  157.                                                                         ODUpdateID actually is.
  158.                  <4>     8/12/94        CC              1180598 - Added ODFacet parameter to
  159.                                                                         ShowLinkSourceInfo().
  160.                  <3>     8/10/94        CC              1179943 - Moved in platform-independent
  161.                                                                         implementation from LinkSrc.cpp.
  162.                  <2>      8/5/94        CC              #1179160 - ContentUpdated() takes ODLinkKey
  163.                                                                         parameter.
  164.                  <1>     6/24/94        CC              first checked in
  165.         To Do:
  166. */
  167.  
  168. #define VARIABLE_MACROS
  169.  
  170. #define ODBaseLinkSource_Class_Source
  171. #include <LinkSrcB.xih>
  172.  
  173. #include <LinkSrc.xh>
  174.  
  175. #ifndef _EXCEPT_
  176. #include <Except.h>
  177. #endif
  178.  
  179. #ifndef _ODMEMORY_
  180. #include <ODMemory.h>
  181. #endif
  182.  
  183. #ifdef _PLATFORM_MACINTOSH_
  184. #ifndef _CONSTDEF_
  185. #include <ConstDef.h>
  186. #endif
  187. #endif
  188.  
  189.  
  190. #ifndef SOM_ODLink_xh
  191. #include <Link.xh>
  192. #endif
  193.  
  194. #ifndef _LINKDLGS_
  195. #include <LinkDlgs.h>
  196. #endif
  197.  
  198. #ifndef SOM_ODPart_xh
  199. #include <Part.xh>
  200. #endif
  201.  
  202. #ifndef SOM_ODFrame_xh
  203. #include <Frame.xh>
  204. #endif
  205.  
  206. #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  207. #ifndef SOM_ODFacet_xh
  208. #include <Facet.xh>
  209. #endif
  210. #endif
  211.  
  212. #ifndef SOM_ODContainer_xh
  213. #include <ODCtr.xh>
  214. #endif
  215.  
  216. #ifndef SOM_ODDocument_xh
  217. #include <Document.xh>
  218. #endif
  219.  
  220. #ifndef SOM_ODDraft_xh
  221. #include <Draft.xh>
  222. #endif
  223.  
  224. #ifndef SOM_ODSession_xh
  225. #include <ODSessn.xh>
  226. #endif
  227.  
  228. #ifndef SOM_ODArbitrator_xh
  229. #include <Arbitrat.xh>
  230. #endif
  231.  
  232. #ifndef SOM_ODWindowState_xh
  233. #include <WinStat.xh>
  234. #endif
  235.  
  236. #ifndef SOM_Module_OpenDoc_Foci_defined
  237. #include <Foci.xh>
  238. #endif
  239.  
  240. #ifndef SOM_ODStorageSystem_xh
  241. #include <ODStor.xh>
  242. #endif
  243.  
  244. #ifndef SOM_ODStorageUnit_xh
  245. #include <StorageU.xh>
  246. #endif
  247.  
  248. #ifndef SOM_Module_OpenDoc_StdProps_defined
  249. #include <StdProps.xh>
  250. #endif
  251.  
  252. #ifndef SOM_Module_OpenDoc_StdTypes_defined
  253. #include <StdTypes.xh>
  254. #endif
  255.  
  256. #ifndef __ERRORS__
  257. #include <Errors.h>
  258. #endif
  259.  
  260. #ifndef _ODUTILS_
  261. #include <ODUtils.h>
  262. #endif
  263.  
  264. /* Adkins -- added to provide prototype for ODUnused and LMGetBufPtr */
  265. /* Adkins -- LMGetBufPtr is in LowMem.h, which PlfmDef.h conditionaly includes */
  266. #ifndef _PLFMDEF_
  267. #include <PlfmDef.h>
  268. #endif
  269.  
  270. #ifndef _ISOSTR_
  271. #include <ISOStr.h>
  272. #endif
  273.  
  274. #ifndef _DOCUTILS_
  275. #include <DocUtils.h>
  276. #endif
  277.  
  278. #ifndef _STDTYPIO_
  279. #include <StdTypIO.h>
  280. #endif
  281.  
  282. #ifndef _ODDEBUG_
  283. #include <ODDebug.h>
  284. #endif
  285.  
  286. #ifndef _POUTILS_
  287. #include <POUtils.h>
  288. #endif
  289.  
  290. #ifndef SOM_ODTypeList_xh
  291. #include <TypeList.xh>
  292. #endif
  293.  
  294. #ifndef SOM_LinkMgr_xh
  295. #include <LinkMgr.xh>
  296. #endif
  297.  
  298. #ifndef SOM_ODTypeListIterator_xh
  299. #include <TypLsItr.xh>
  300. #endif
  301.  
  302. #ifndef _STORUTIL_
  303. #include <StorUtil.h>
  304. #endif
  305.  
  306. #ifndef _TEMPOBJ_
  307. #include "TempObj.h"
  308. #endif
  309.  
  310. #pragma segment ODBaseLinkSource
  311.  
  312. //==============================================================================
  313. // Constants
  314. //==============================================================================
  315. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  316. const   ODType  kODLinkContent          = "OpenDoc:LinkContent";
  317. #endif // OS2 or AIX
  318. const   ODULong kODNullKey              = 0;
  319.  
  320. // dirty masks
  321. const ODULong kNotDirty                                 = 0x0000UL;
  322. const ODULong kLinkDirty                                = 0x0001UL;
  323. const ODULong kSourcePartDirty                  = 0x0002UL;
  324. const ODULong kAutoUpdateDirty                  = 0x0004UL;
  325. const ODULong kUpdateIDDirty                    = 0x0008UL;
  326. const ODULong kChangeTimeDirty                  = 0x0010UL;
  327. const ODULong kKindsUsedDirty                   = 0x0020UL;
  328. const ODULong kContentSUDirty                   = 0x0040UL;
  329. const ODULong kChangeLimitDirty                 = 0x0080UL;
  330. const ODULong kAllDirty                                 = 0xFFFFUL;
  331.  
  332. //==============================================================================
  333. // Local functions
  334. //==============================================================================
  335.  
  336. static void RemovePromisedContent(Environment *ev, ODStorageUnit* su);
  337.  
  338. //==============================================================================
  339. // ODBaseLinkSource
  340. //==============================================================================
  341.  
  342. //------------------------------------------------------------------------------
  343. // ODBaseLinkSource: somInit
  344. //------------------------------------------------------------------------------
  345.  
  346. SOM_Scope void  SOMLINK ODBaseLinkSourcesomInit(ODBaseLinkSource *somSelf)
  347. {
  348.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  349.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","somInit");
  350.  
  351.     parent_somInit(somSelf);
  352.  
  353.         _fContentSU = (ODStorageUnit*) kODNULL;
  354.         _fLink = (ODLink*) kODNULL;
  355.         _fSourcePartSU = (ODStorageUnit*) kODNULL;
  356.         _fAutoUpdate = kODFalse;
  357.         _fNewUpdateID = kODUnknownUpdate;
  358.         _fUpdateID = kODUnknownUpdate;
  359.         _fSuspended = _fUpdatedAfterSuspended = kODFalse;
  360.         _fChangeTime = 0;
  361.         _fChangeCount = 1;
  362.         _fChangeLimit = 1;
  363.         _fDirty = kNotDirty;
  364.         _fKindsUsed = (ODTypeList*) kODNULL;
  365.         _fCleared = kODFalse;
  366. }
  367.  
  368. //------------------------------------------------------------------------------
  369. // ODBaseLinkSource: somUninit
  370. //------------------------------------------------------------------------------
  371.  
  372. SOM_Scope void  SOMLINK ODBaseLinkSourcesomUninit(ODBaseLinkSource *somSelf)
  373. {
  374.     /* ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf); */
  375.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","somUninit");
  376.  
  377.     parent_somUninit(somSelf);
  378. }
  379.  
  380. //------------------------------------------------------------------------------
  381. // ODBaseLinkSource: InitBaseLinkSource
  382. //------------------------------------------------------------------------------
  383.  
  384. SOM_Scope void  SOMLINK ODBaseLinkSourceInitBaseLinkSource(ODBaseLinkSource *somSelf, Environment *ev,
  385.                 ODStorageUnit* storageUnit,
  386.                 ODPart* sourcePart)
  387. {
  388.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  389.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","InitBaseLinkSource");
  390. #ifdef _PLATFORM_MACINTOSH_
  391.         SOM_CATCH return;
  392. #endif
  393.  
  394. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  395.         SOM_TRY
  396. #endif
  397.  
  398.         somSelf->InitPersistentObject(ev, storageUnit);
  399.         InitDateInfo(ev, storageUnit);
  400. #ifdef _PLATFORM_OS2_
  401. #else
  402.         _fUpdateID = storageUnit->GetSession(ev)->UniqueUpdateID(ev);
  403.  
  404.         _fSuspended = _fUpdatedAfterSuspended = kODFalse;
  405.  
  406. #endif
  407.         if ( sourcePart != (ODPart*) kODNULL )
  408.         {
  409.                 _fSourcePartSU = sourcePart->GetStorageUnit(ev);
  410.                 _fSourcePartSU->Acquire(ev);
  411.                 _fAutoUpdate = kODTrue;
  412.         }
  413.  
  414.         ODStorageUnit* su = somSelf->GetStorageUnit(ev);
  415.  
  416.         _fContentSU = su->GetDraft(ev)->CreateStorageUnit(ev);
  417.         ODSetISOStrProp(ev, _fContentSU, kODPropStorageUnitType, kODISOStr, kODLinkContent);
  418.  
  419.         ODSUAddPropValue(ev, su, kODPropUpdateID, kODULong);
  420.         ODSUAddPropValue(ev, su, kODPropChangeLimit, kODULong);
  421.         ODSUAddPropValue(ev, su, kODPropChangeTime, kODTime_T);
  422.         ODSUAddPropValue(ev, su, kODPropAutoUpdate, kODBoolean);
  423.         ODSUAddPropValue(ev, su, kODPropLinkContentSU, kODStrongStorageUnitRef);
  424.         ODSUAddPropValue(ev, su, kODPropLink, kODWeakStorageUnitRef);
  425.  
  426.         if ( _fSourcePartSU != (ODStorageUnit*) kODNULL )
  427.                 ODSUAddPropValue(ev, su, kODPropSourcePart, kODWeakStorageUnitRef);
  428.  
  429. #ifdef _PLATFORM_OS2_
  430. #else
  431.         somSelf->SetBaseLinkSourceDirty(ev, kAllDirty);
  432. #endif
  433.  
  434. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  435.         SOM_CATCH_ALL
  436.           return;
  437.         SOM_ENDTRY
  438. #endif
  439. }
  440.  
  441. //------------------------------------------------------------------------------
  442. // ODBaseLinkSource: InitBaseLinkSourceFromStorage
  443. //------------------------------------------------------------------------------
  444.  
  445. SOM_Scope void  SOMLINK ODBaseLinkSourceInitBaseLinkSourceFromStorage(ODBaseLinkSource *somSelf, Environment *ev,
  446.                 ODStorageUnit* storageUnit)
  447. {
  448.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  449.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","InitBaseLinkSourceFromStorage");
  450. #ifdef _PLATFORM_MACINTOSH_
  451.         SOM_CATCH return;
  452. #endif
  453.  
  454. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  455.         SOM_TRY
  456. #endif
  457.  
  458.         somSelf->InitPersistentObjectFromStorage(ev, storageUnit);
  459.         InitDateInfo(ev, storageUnit);
  460.  
  461.         _fContentSU = storageUnit->GetDraft(ev)->AcquireStorageUnit(ev, ODGetStrongSURefProp(ev, storageUnit, kODPropLinkContentSU, kODStrongStorageUnitRef));
  462.         _fUpdateID = ODGetULongProp(ev, storageUnit, kODPropUpdateID, kODULong);
  463.         _fChangeLimit = ODGetULongProp(ev, storageUnit, kODPropChangeLimit, kODULong);
  464.         _fChangeTime = ODGetTime_TProp(ev, storageUnit, kODPropChangeTime, kODTime_T);
  465.         _fAutoUpdate = ODGetBooleanProp(ev, storageUnit, kODPropAutoUpdate, kODBoolean);
  466.  
  467.         _fSuspended = _fUpdatedAfterSuspended = kODFalse;
  468.  
  469.         if ( storageUnit->Exists(ev, kODPropContentKindsUsed, 0, 0) )
  470.         {
  471.                 _fKindsUsed = somSelf->GetStorageUnit(ev)->GetSession(ev)->GetStorageSystem(ev)->CreateTypeList(ev, kODNULL);
  472.                 ODGetTypeListProp(ev, storageUnit, kODPropContentKindsUsed, kODISOStrList, _fKindsUsed);
  473.         }
  474.  
  475.         if ( storageUnit->Exists(ev, kODPropLink, 0, 0) )
  476.         {
  477.                 ODID linkID = ODGetWeakSURefProp(ev, storageUnit, kODPropLink, kODWeakStorageUnitRef);
  478.                 if ( linkID == kODNULLID )
  479. #ifdef _PLATFORM_OS2_
  480.                         ;
  481. #else
  482.                         somSelf->SetBaseLinkSourceDirty(ev, kLinkDirty);
  483. #endif
  484.                 else
  485.                         _fLink = storageUnit->GetDraft(ev)->AcquireLink(ev, linkID, (ODLinkSpec*) kODNULL);
  486.         }
  487.  
  488.         if ( storageUnit->Exists(ev, kODPropSourcePart, 0, 0) )
  489.         {
  490.                 ODID sourcePartID = ODGetWeakSURefProp(ev, storageUnit, kODPropSourcePart, kODWeakStorageUnitRef);
  491.                 if ( sourcePartID == kODNULLID )
  492. #ifdef _PLATFORM_OS2_
  493.                         ;
  494. #else
  495.                         somSelf->SetBaseLinkSourceDirty(ev, kSourcePartDirty);
  496. #endif
  497.                 else
  498.                         _fSourcePartSU = storageUnit->GetDraft(ev)->AcquireStorageUnit(ev, sourcePartID);
  499.         }
  500.  
  501.  
  502. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  503.         SOM_CATCH_ALL
  504.           return;
  505.         SOM_ENDTRY
  506. #endif
  507. }
  508.  
  509. //------------------------------------------------------------------------------
  510. // ODBaseLinkSource::Externalize (OVERRIDE)
  511. //------------------------------------------------------------------------------
  512.  
  513. SOM_Scope void  SOMLINK ODBaseLinkSourceExternalize(ODBaseLinkSource *somSelf, Environment *ev)
  514. {
  515.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  516.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","Externalize");
  517. #ifdef _PLATFORM_MACINTOSH_
  518.         SOM_CATCH return;
  519. #endif
  520.  
  521. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  522.         SOM_TRY
  523. #endif
  524. #ifdef _PLATFORM_OS2_
  525.  
  526.     parent_Externalize(somSelf,ev);
  527.     RemovePromisedContent(ev, _fContentSU);
  528.  
  529.   ODStorageUnit* su = somSelf->GetStorageUnit(ev);
  530.  
  531.   ODSetStrongSURefProp(ev, su, kODPropLinkContentSU, kODStrongStorageUnitRef, _fContentSU->GetID(ev));
  532.   ODSetULongProp(ev, su, kODPropUpdateID, kODULong, _fUpdateID);
  533.   ODSetULongProp(ev, su, kODPropChangeLimit, kODULong, _fChangeLimit);
  534.   ODSetTime_TProp(ev, su, kODPropChangeTime, kODTime_T, _fChangeTime);
  535.   ODSetBooleanProp(ev, su, kODPropAutoUpdate, kODBoolean, _fAutoUpdate);
  536.  
  537.   if ( _fKindsUsed == kODNULL )
  538.     ODSURemoveProperty(ev, su, kODPropContentKindsUsed);
  539.   else
  540.     ODSetTypeListProp(ev, su, kODPropContentKindsUsed, kODISOStrList, _fKindsUsed);
  541.  
  542.   if ( _fLink == (ODLink*) kODNULL )
  543.     ODSURemoveProperty(ev, su, kODPropLink);
  544.   else
  545.     ODSetWeakSURefProp(ev, su, kODPropLink, kODWeakStorageUnitRef, _fLink->GetStorageUnit(ev)->GetID(ev));
  546.  
  547.   if ( _fSourcePartSU == (ODStorageUnit*) kODNULL )
  548.     ODSURemoveProperty(ev, su, kODPropSourcePart);
  549.   else
  550.     ODSetWeakSURefProp(ev, su, kODPropSourcePart, kODWeakStorageUnitRef, _fSourcePartSU->GetID(ev));
  551.  
  552. #else
  553.  
  554.     parent_Externalize(somSelf,ev);
  555.  
  556.     RemovePromisedContent(ev, _fContentSU);
  557.  
  558.         if ( _fDirty )
  559.         {
  560.                 ODStorageUnit* su = somSelf->GetStorageUnit(ev);
  561.  
  562.                 if ( _fDirty & kContentSUDirty )
  563.                         ODSetStrongSURefProp(ev, su, kODPropLinkContentSU, kODStrongStorageUnitRef, _fContentSU->GetID(ev));
  564.  
  565.                 if ( _fDirty & kUpdateIDDirty )
  566.                         ODSetULongProp(ev, su, kODPropUpdateID, kODULong, _fUpdateID);
  567.  
  568.                 if ( _fDirty & kChangeLimitDirty )
  569.                         ODSetULongProp(ev, su, kODPropChangeLimit, kODULong, _fChangeLimit);
  570.  
  571.                 if ( _fDirty & kChangeTimeDirty )
  572.                         ODSetTime_TProp(ev, su, kODPropChangeTime, kODTime_T, _fChangeTime);
  573.  
  574.                 if ( _fDirty & kAutoUpdateDirty )
  575.                         ODSetBooleanProp(ev, su, kODPropAutoUpdate, kODBoolean, _fAutoUpdate);
  576.  
  577.                 if ( _fDirty & kKindsUsedDirty )
  578.                 {
  579.                         if ( _fKindsUsed == kODNULL )
  580.                                 ODSURemoveProperty(ev, su, kODPropContentKindsUsed);
  581.                         else
  582.                                 ODSetTypeListProp(ev, su, kODPropContentKindsUsed, kODISOStrList, _fKindsUsed);
  583.                 }
  584.  
  585.                 if ( _fDirty & kLinkDirty )
  586.                 {
  587.                         if ( _fLink == (ODLink*) kODNULL )
  588.                                 ODSURemoveProperty(ev, su, kODPropLink);
  589.                         else
  590.                                 ODSetWeakSURefProp(ev, su, kODPropLink, kODWeakStorageUnitRef, _fLink->GetStorageUnit(ev)->GetID(ev));
  591.                 }
  592.  
  593.                 if ( _fDirty & kSourcePartDirty )
  594.                 {
  595.                         if ( _fSourcePartSU == (ODStorageUnit*) kODNULL )
  596.                                 ODSURemoveProperty(ev, su, kODPropSourcePart);
  597.                         else
  598.                                 ODSetWeakSURefProp(ev, su, kODPropSourcePart, kODWeakStorageUnitRef, _fSourcePartSU->GetID(ev));
  599.                 }
  600.  
  601.                 _fDirty = kNotDirty;
  602.         }
  603. #endif
  604.  
  605. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  606.         SOM_CATCH_ALL
  607.           return;
  608.         SOM_ENDTRY
  609. #endif
  610. }
  611.  
  612. //------------------------------------------------------------------------------
  613. // ODBaseLinkSource: CloneInto (OVERRIDE)
  614. //------------------------------------------------------------------------------
  615.  
  616. SOM_Scope void  SOMLINK ODBaseLinkSourceCloneInto(ODBaseLinkSource *somSelf, Environment *ev,
  617.                 ODDraftKey key,
  618.                 ODStorageUnit* toSU,
  619.                 ODFrame* scopeFrame)
  620. {
  621.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  622.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","CloneInto");
  623. #ifdef _PLATFORM_MACINTOSH_
  624.         SOM_CATCH return;
  625. #endif
  626.  
  627. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  628.         SOM_TRY
  629. #endif
  630.  
  631.         // If one of our properties already exists, this object has been cloned already
  632.         if ( toSU->Exists(ev, kODPropLink, kODWeakStorageUnitRef, 0) )
  633.                 return;
  634.  
  635.         parent_CloneInto(somSelf, ev, key, toSU, scopeFrame);
  636.  
  637.     RemovePromisedContent(ev, _fContentSU);
  638.  
  639.         CloneDateInfo(ev, somSelf->GetStorageUnit(ev), toSU);
  640.  
  641.         ODDraft* draft = somSelf->GetStorageUnit(ev)->GetDraft(ev);
  642.  
  643.         ODSetULongProp(ev, toSU, kODPropUpdateID, kODULong, _fUpdateID);
  644.         ODSetULongProp(ev, toSU, kODPropChangeLimit, kODULong, 1);
  645.         ODSetTime_TProp(ev, toSU, kODPropChangeTime, kODTime_T, _fChangeTime);
  646.         ODSetBooleanProp(ev, toSU, kODPropAutoUpdate, kODBoolean, _fAutoUpdate);
  647.  
  648.         ODID clonedLinkContentID = draft->Clone(ev, key, _fContentSU->GetID(ev), 0, (scopeFrame ? scopeFrame->GetID(ev) : 0));
  649.         ODSetStrongSURefProp(ev, toSU, kODPropLinkContentSU, kODStrongStorageUnitRef, clonedLinkContentID);
  650.  
  651.         if ( _fKindsUsed != kODNULL )
  652.                 ODSetTypeListProp(ev, toSU, kODPropContentKindsUsed, kODISOStrList, _fKindsUsed);
  653.  
  654.         if ( _fLink != (ODLink*) kODNULL )
  655.         {
  656.                 ODID clonedLinkSourceID = draft->WeakClone(ev, key, _fLink->GetID(ev), 0, (scopeFrame ? scopeFrame->GetID(ev) : 0));
  657.                 ODSetWeakSURefProp(ev, toSU, kODPropLink, kODWeakStorageUnitRef, clonedLinkSourceID);
  658.         }
  659.  
  660.         // The source part should only be kODNULL for links imported from another draft.
  661.         if ( _fSourcePartSU != (ODStorageUnit*) kODNULL )
  662.         {
  663.                 ODID clonedSourcePartID = draft->WeakClone(ev, key, _fSourcePartSU->GetID(ev), 0, (scopeFrame ? scopeFrame->GetID(ev) : 0));
  664.                 ODSetWeakSURefProp(ev, toSU, kODPropSourcePart, kODWeakStorageUnitRef, clonedSourcePartID);
  665.         }
  666.  
  667.  
  668. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  669.         SOM_CATCH_ALL
  670.           return;
  671.         SOM_ENDTRY
  672. #endif
  673. }
  674.  
  675. //------------------------------------------------------------------------------
  676. // ODBaseLinkSource: ReleaseAll (OVERRIDE)
  677. //------------------------------------------------------------------------------
  678.  
  679. SOM_Scope void  SOMLINK ODBaseLinkSourceReleaseAll(ODBaseLinkSource *somSelf, Environment *ev)
  680. {
  681.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  682.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","ReleaseAll");
  683. #ifdef _PLATFORM_MACINTOSH_
  684.         SOM_CATCH return;
  685. #endif
  686.  
  687. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  688.         SOM_TRY
  689. #endif
  690.  
  691.     parent_ReleaseAll(somSelf,ev);
  692.  
  693.         ODReleaseObject(ev, _fContentSU);
  694.         ODReleaseObject(ev, _fLink);
  695.         ODReleaseObject(ev, _fSourcePartSU);
  696.  
  697.  
  698. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  699.         SOM_CATCH_ALL
  700.           return;
  701.         SOM_ENDTRY
  702. #endif
  703. }
  704.  
  705. //------------------------------------------------------------------------------
  706. // ODBaseLinkSource: SetBaseLinkSourceDirty
  707. //------------------------------------------------------------------------------
  708.  
  709. SOM_Scope void  SOMLINK ODBaseLinkSourceSetBaseLinkSourceDirty(ODBaseLinkSource *somSelf, Environment *ev,
  710.         ODULong dirtyProperty)
  711. {
  712.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  713.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","SetBaseLinkSourceDirty");
  714.  
  715.         SOM_TRY
  716.                 _fDirty |= dirtyProperty;
  717.  
  718.                 ODDraft* draft = somSelf->GetStorageUnit(ev)->GetDraft(ev);
  719.                 if ( draft->GetPermissions(ev) != kODDPReadOnly )
  720.                         draft->SetChangedFromPrev(ev);
  721.         SOM_CATCH_ALL
  722.         SOM_ENDTRY
  723. }
  724.  
  725. //------------------------------------------------------------------------------
  726. // ODBaseLinkSource: ShowLinkSourceInfo
  727. //------------------------------------------------------------------------------
  728.  
  729. SOM_Scope ODBoolean  SOMLINK ODBaseLinkSourceShowLinkSourceInfo(ODBaseLinkSource *somSelf, Environment *ev,
  730.                 ODFacet* facet,
  731.                 ODUpdateID change,
  732.                 ODBoolean changesAllowed,
  733.                 ODLinkInfoResult* infoResult)
  734. {
  735.    // Note: in OS/2 this method is never called - it is overriden by ODLinkSource
  736.  
  737.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  738.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","ShowLinkSourceInfo");
  739.  
  740.         ODBoolean result = kODFalse;
  741. #ifdef _PLATFORM_MACINTOSH_
  742.         SOM_CATCH return kODFalse;
  743. #endif
  744.  
  745. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  746.         SOM_TRY
  747. #endif
  748.  
  749.         THROW_IF_NULL(facet, kODErrNullFacetInput);
  750.         THROW_IF_NULL(infoResult, kODErrNullLinkInfoResultInput);
  751. #ifndef _PLATFORM_OS2_
  752.         THROW_IF_NULL(_fLink, kODErrBrokenLink);
  753. #endif
  754.  
  755.         ODSession* session = somSelf->GetStorageUnit(ev)->GetSession(ev);
  756.         ODTypeToken modalFocus = session->Tokenize(ev, kODModalFocus);
  757.         ODArbitrator* arbitrator = session->GetArbitrator(ev);
  758.         TempODFrame currentOwner = arbitrator->AcquireFocusOwner(ev, modalFocus);
  759.  
  760.         if ( arbitrator->RequestFocus(ev, modalFocus, facet->GetFrame(ev)) )
  761.         {
  762.                 infoResult->autoUpdate = _fAutoUpdate;
  763.  
  764. #ifdef _PLATFORM_MACINTOSH_
  765.                 session->GetWindowState(ev)->DeactivateFrontWindows(ev);
  766. #endif
  767.         ODWindow* activeWindow = session->GetWindowState(ev)->AcquireActiveWindow(ev);
  768. #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_)
  769.                 result = ShowLinkSourceInfo(somSelf,
  770.                                             change,
  771.                                             changesAllowed,
  772.                         activeWindow->GetPlatformWindow(ev),
  773.                                             facet,
  774.                                             infoResult);
  775. #endif // _PLATFORM_WIN32_
  776. #ifdef _PLATFORM_AIX_
  777.                 result = ShowLinkSourceInfo(somSelf, change, changesAllowed, infoResult);
  778. #endif
  779.  
  780. #ifdef _PLATFORM_MACINTOSH_
  781.                 session->GetWindowState(ev)->ActivateFrontWindows(ev);
  782. #endif
  783.  
  784.                 arbitrator->TransferFocus(ev, modalFocus, facet->GetFrame(ev), currentOwner);
  785.         activeWindow->Release(ev);
  786.         }
  787.         else
  788.         {
  789. #ifdef _PLATFORM_MACINTOSH_
  790.                 SysBeep(2);
  791. #endif
  792. #ifdef _PLATFORM_WIN32_
  793.                 Beep(440, 250);  // play an A for 1/4 second, OK?
  794. #endif
  795. #ifdef _PLATFORM_OS2_
  796.                 // ?? OS/2?             SysBeep(2);
  797. #endif
  798.         }
  799.         return result;
  800.  
  801.  
  802. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  803.         SOM_CATCH_ALL
  804.           return kODFalse;
  805.         SOM_ENDTRY
  806. #endif
  807. }
  808.  
  809. //------------------------------------------------------------------------------
  810. // ODBaseLinkSource: Lock
  811. //------------------------------------------------------------------------------
  812.  
  813. SOM_Scope ODBoolean  SOMLINK ODBaseLinkSourceLock(ODBaseLinkSource *somSelf, Environment *ev,
  814.                 ODULong wait,
  815.                 ODLinkKey* key)
  816. {
  817.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  818.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","Lock");
  819.  
  820.     ODUnused(wait);
  821.  
  822. #ifdef _PLATFORM_OS2_
  823.     TRY
  824.  
  825.  
  826.     if (ev->_major) ODSetSOMException(ev, kODNoError);
  827.  
  828.     *key = (ODLinkKey) _fContentSU->Lock(ev, 0);
  829.  
  830.     /* the following exception checking should be removed when FN_CATCH */
  831.     /* works on OS2                                                     */
  832.     if (ODGetSOMException(ev) != kODNoError || *key == 0)
  833.     {
  834.       return kODFalse;
  835.     }
  836.     else
  837.     {
  838.      return kODTrue;
  839.     }
  840.     CATCH_ALL
  841.       return kODFalse;
  842.    ENDTRY
  843. #else
  844.  
  845.  
  846.         if ( _fLink == (ODLink*) kODNULL )
  847.         {
  848.                 ODSetSOMException(ev, kODErrBrokenLink);
  849.                 return kODFalse;
  850.         }
  851.  
  852.         TRY     // Don't use SOM_TRY as we do _not_ want to return an exception!
  853.  
  854.         *key = (ODLinkKey) somSelf->GetStorageUnit(ev)->Lock(ev, 0);
  855.  
  856.         _fCleared = kODFalse;
  857.         _fNewUpdateID = kODUnknownUpdate;
  858.  
  859.         CATCH_ALL
  860.                 *key = kODNullKey;
  861.                 // Don't reraise, just return
  862.         ENDTRY
  863.  
  864.         return (*key != kODNullKey);
  865. #endif
  866. }
  867.  
  868. //------------------------------------------------------------------------------
  869. // ODBaseLinkSource: Unlock
  870. //------------------------------------------------------------------------------
  871.  
  872. SOM_Scope void  SOMLINK ODBaseLinkSourceUnlock(ODBaseLinkSource *somSelf, Environment *ev,
  873.                 ODLinkKey key)
  874. {
  875.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  876.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","Unlock");
  877.  
  878.         SOM_TRY
  879. #ifdef _PLATFORM_OS2_
  880.                 _fUpdateContinue = kODFalse;
  881. #endif
  882.  
  883.                 // Force fulfilling of promises for content kinds used by current destinations
  884.                 if ( _fCleared && _fKindsUsed )
  885.                 {
  886.                         ODBoolean allUsedKindsPresent = kODTrue; ODVolatile(allUsedKindsPresent);
  887.  
  888.                         ODTypeListIterator* iter = kODNULL; ODVolatile(iter);
  889.                         TRY
  890.                                 iter = _fKindsUsed->CreateTypeListIterator(ev);
  891.  
  892.                                 for (ODType kind = iter->First(ev);
  893.                                         iter->IsNotComplete(ev);
  894.                                         kind = iter->Next(ev))
  895.                                 {
  896.                                         if ( ODSUExistsThenFocus(ev, _fContentSU, kODPropContents, kind) )
  897.                                         {
  898.                                                 if ( _fContentSU->IsPromiseValue(ev) )
  899.                                                 {
  900.                                                         // Force part to fulfill its promise
  901.                                                         TRY
  902.                                                                 ODULong size = _fContentSU->GetSize(ev);
  903.                                                         CATCH_ALL
  904.                                                                 allUsedKindsPresent = kODFalse;
  905.                                                         ENDTRY
  906.                                                 }
  907.                                         }
  908.                                         else
  909.                                         {
  910.                                                 allUsedKindsPresent = kODFalse;
  911.                                         }
  912.                                         ODDisposePtr(kind);
  913.                                 }
  914.                         CATCH_ALL
  915.                                 allUsedKindsPresent = kODFalse;
  916.                         ENDTRY
  917.                         ODDeleteObject(iter);
  918.  
  919.                         if ( allUsedKindsPresent )
  920.                         {
  921.                                 ODDeleteObject(_fKindsUsed);
  922.                                 somSelf->SetBaseLinkSourceDirty(ev, kKindsUsedDirty);
  923.                         }
  924.                 }
  925.  
  926.                 _fCleared = kODFalse;
  927.  
  928.                 // Any unlocking action needs to be performed before calling UpdateDependents(),
  929.                 // since that will cause dependents to lock and unlock their link, which delegates
  930.                 // to this object.
  931.  
  932.                 #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_UNIX_)
  933.                 somSelf->GetStorageUnit(ev)->Unlock(ev, (ODStorageUnitKey) key);
  934.                 #endif
  935.  
  936.                 if ( _fNewUpdateID != kODUnknownUpdate )
  937.                 {
  938.                         ODBoolean notifyDependents = kODFalse;
  939.  
  940.                         #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_UNIX_)
  941.                             time(&_fChangeTime);
  942.                         #else
  943.                             time((time_t *)&_fChangeTime);
  944.                         #endif
  945.                         somSelf->SetBaseLinkSourceDirty(ev, kChangeTimeDirty);
  946.  
  947.                         if ( _fUpdateID != _fNewUpdateID )
  948.                         {
  949.                                 // Link updated with different change ID than last time
  950.                                 _fChangeCount = 1;
  951.                                 _fUpdateID = _fNewUpdateID;
  952.                                 somSelf->SetBaseLinkSourceDirty(ev, kUpdateIDDirty);
  953.                                 notifyDependents = kODTrue;
  954.  
  955.                                 if ( _fSuspended )
  956.                                         _fUpdatedAfterSuspended = kODTrue;
  957.                         }
  958.                         else if ( ++_fChangeCount <= _fChangeLimit )
  959.                         {
  960.                                 // Same change but user previously continued beyond this iteration
  961.                                 notifyDependents = kODTrue;
  962.                         }
  963.                         else
  964.                         {
  965.                                 #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  966.                                 ODLinkManager* linkMgr =
  967.                                         somSelf->GetStorageUnit(ev)->GetSession(ev)->GetLinkManager(ev);
  968.                                 ODLinkUpdateResult updateResult = linkMgr->ShowLinkUpdateAlert(ev, somSelf);
  969.                                 #else
  970.  
  971.                                 ODLinkUpdateResult updateResult = ::ShowLinkUpdateAlert();
  972.                                 if (updateResult) {
  973.                                    _fUpdateContinue = kODTrue;
  974.                                 }
  975.                                 _fNewUpdateID = kODUnknownUpdate;
  976.                                 return;
  977.  
  978.                                 #endif
  979.  
  980.                                 if ( updateResult == kODLinkUpdateContinue )
  981.                                 {
  982.                                         // User continued propagating this update
  983.                                         ++_fChangeLimit;
  984.                                         somSelf->SetBaseLinkSourceDirty(ev, kChangeLimitDirty);
  985.                                         notifyDependents = kODTrue;
  986.                                 }
  987.                                 else if ( updateResult == kODLinkUpdateStop )
  988.                                 {
  989.                                         // User cancelled propagating this update
  990.                                         _fChangeLimit = 1;
  991.                                         somSelf->SetBaseLinkSourceDirty(ev, kChangeLimitDirty);
  992.                                 }
  993.                                 else // updateResult == kODLinkUpdateSuspend
  994.                                 {
  995.                                         _fSuspended = kODTrue;
  996.                                 }
  997.                         }
  998.                         _fNewUpdateID = kODUnknownUpdate;
  999.  
  1000.                         if ( notifyDependents && !_fSuspended && (_fLink != (ODLink*) kODNULL) )
  1001.                         {
  1002.                                 // Ignore errors returned by UpdateDependents
  1003.                                 TRY
  1004. #ifdef _PLATFORM_OS2_
  1005.                                         _fLink->UpdateDependents(ev, _fUpdateID);
  1006. #else
  1007.                                         _fLink->UpdateDependents(ev);
  1008. #endif
  1009.                                 CATCH_ALL
  1010.                                 ENDTRY
  1011.                         }
  1012.                 }
  1013.  
  1014.         SOM_CATCH_ALL
  1015.  
  1016.         SOM_ENDTRY
  1017. }
  1018.  
  1019.  
  1020. //------------------------------------------------------------------------------
  1021. // ODBaseLinkSource: LinkUpdateAlertCompleted
  1022. //------------------------------------------------------------------------------
  1023.  
  1024. SOM_Scope void  SOMLINK ODBaseLinkSourceLinkUpdateAlertCompleted(ODBaseLinkSource *somSelf, Environment *ev,
  1025.                 ODLinkUpdateResult updateResult)
  1026. {
  1027.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1028.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","LinkUpdateAlertCompleted");
  1029.  
  1030.         ODBoolean notifyDependents = kODFalse;
  1031.  
  1032.     SOM_TRY
  1033.  
  1034.         // Get and reset these booleans atomically here to avoid possible
  1035.         // confusion from setting them again while updating dependents:
  1036.         ODBoolean suspended = _fSuspended;
  1037.         ODBoolean updatedAfterSuspended = _fUpdatedAfterSuspended;
  1038.                 _fSuspended = _fUpdatedAfterSuspended = kODFalse;
  1039.  
  1040.                 if ( updateResult == kODLinkUpdateContinue )
  1041.                 {
  1042.                         // User continued propagating this update
  1043.                         ++_fChangeLimit;
  1044.                         somSelf->SetBaseLinkSourceDirty(ev, kChangeLimitDirty);
  1045.                         notifyDependents = kODTrue;
  1046.                 }
  1047.                 else if ( updateResult == kODLinkUpdateStop )
  1048.                 {
  1049.                         // User cancelled propagating this update
  1050.                         _fChangeLimit = 1;
  1051.                         somSelf->SetBaseLinkSourceDirty(ev, kChangeLimitDirty);
  1052.  
  1053.                         if ( updatedAfterSuspended )
  1054.                                 notifyDependents = kODTrue;
  1055.                 }
  1056.  
  1057.                 if ( notifyDependents && (_fLink != (ODLink*) kODNULL) )
  1058.                 {
  1059.                         // Ignore errors returned by UpdateDependents
  1060.                         TRY
  1061. #ifdef _PLATFORM_OS2_
  1062.                                         _fLink->UpdateDependents(ev, _fUpdateID);
  1063. #else
  1064.                                         _fLink->UpdateDependents(ev);
  1065. #endif
  1066.                         CATCH_ALL
  1067.                         ENDTRY
  1068.                 }
  1069.  
  1070.         SOM_CATCH_ALL
  1071.  
  1072.         SOM_ENDTRY
  1073. }
  1074.  
  1075. //------------------------------------------------------------------------------
  1076. // ODBaseLinkSource: KeyValid
  1077. //------------------------------------------------------------------------------
  1078.  
  1079. SOM_Scope void  SOMLINK ODBaseLinkSourceKeyValid(ODBaseLinkSource *somSelf, Environment *ev,
  1080.                 ODLinkKey key)
  1081. {
  1082.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1083.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","KeyValid");
  1084. #ifdef _PLATFORM_MACINTOSH_
  1085.         SOM_CATCH return;
  1086. #endif
  1087.  
  1088. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1089.         SOM_TRY
  1090. #endif
  1091.  
  1092. #ifdef _PLATFORM_OS2_
  1093.         if (key !=1) {
  1094.           ODSetSOMException(ev,kODErrInvalidLinkKey);
  1095.         }
  1096. #else
  1097.         if (key == kODNullKey)
  1098.                 ODSetSOMException(ev, kODErrInvalidLinkKey);
  1099.         else
  1100.         {
  1101.                 ODStorageUnit* su = somSelf->GetStorageUnit(ev);
  1102.                 ODStorageUnitKey suKey = su->Lock(ev, (ODStorageUnitKey) key);
  1103.                 su->Unlock(ev, suKey);
  1104.         }
  1105. #endif
  1106.  
  1107. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1108.         SOM_CATCH_ALL
  1109.           return;
  1110.         SOM_ENDTRY
  1111. #endif
  1112. }
  1113.  
  1114. //------------------------------------------------------------------------------
  1115. // ODBaseLinkSource: GetContentStorageUnit
  1116. //------------------------------------------------------------------------------
  1117.  
  1118. SOM_Scope ODStorageUnit*  SOMLINK ODBaseLinkSourceGetContentStorageUnit(ODBaseLinkSource *somSelf, Environment *ev,
  1119.                 ODLinkKey key)
  1120. {
  1121.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1122.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","GetContentStorageUnit");
  1123. #ifdef _PLATFORM_MACINTOSH_
  1124.         SOM_CATCH return (ODStorageUnit*) kODNULL;
  1125. #endif
  1126.  
  1127. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1128.         SOM_TRY
  1129. #endif
  1130.  
  1131.         somSelf->KeyValid(ev, key);
  1132.  
  1133.         return _fContentSU;
  1134.  
  1135.  
  1136. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1137.         SOM_CATCH_ALL
  1138.           return (ODStorageUnit*) kODNULL;
  1139.         SOM_ENDTRY
  1140. #endif
  1141. }
  1142.  
  1143. //------------------------------------------------------------------------------
  1144. // ODBaseLinkSource: ContentUpdated
  1145. //------------------------------------------------------------------------------
  1146.  
  1147. SOM_Scope void  SOMLINK ODBaseLinkSourceContentUpdated(ODBaseLinkSource *somSelf, Environment *ev,
  1148.                 ODUpdateID id,
  1149.                 ODLinkKey key)
  1150. {
  1151.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1152.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","ContentUpdated");
  1153.  
  1154.         SOM_TRY
  1155.  
  1156.                 somSelf->KeyValid(ev, key);
  1157.  
  1158.                 if ( id == kODUnknownUpdate )
  1159.                         THROW(kODErrUnknownUpdateID);
  1160.  
  1161.                 _fNewUpdateID = id;
  1162.  
  1163. #ifdef _PLATFORM_OS2_
  1164.     time_t now;
  1165.     time (&now);
  1166.     _fChangeTime = now;
  1167. //  _interrupt(3);        // ShowLinkUpdateAlert() not implemented yet
  1168. #endif
  1169.  
  1170.         SOM_CATCH_ALL
  1171.  
  1172.         SOM_ENDTRY
  1173. }
  1174.  
  1175. //------------------------------------------------------------------------------
  1176. // ODBaseLinkSource: Clear
  1177. //------------------------------------------------------------------------------
  1178.  
  1179. SOM_Scope void  SOMLINK ODBaseLinkSourceClear(ODBaseLinkSource *somSelf, Environment *ev,
  1180.                 ODUpdateID id,
  1181.                 ODLinkKey key)
  1182. {
  1183.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1184.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","Clear");
  1185.  
  1186.         ODValueType kind = kODNULL;     ODVolatile(kind);
  1187.  
  1188.         SOM_TRY
  1189.  
  1190.                 somSelf->KeyValid(ev, key);
  1191.  
  1192.                 // Fail immediately if this draft can't be changed
  1193.                 ODDraftPermissions permissions = somSelf->GetStorageUnit(ev)->GetDraft(ev)->GetPermissions(ev);
  1194.                 if (!HAS_WRITE_ACCESS(permissions))
  1195.                         THROW(kODErrInvalidPermissions);
  1196.  
  1197.                 if ( id == kODUnknownUpdate )
  1198.                         THROW(kODErrUnknownUpdateID);
  1199.  
  1200.                 // If id is the current id, don't notify destinations unless ContentUpdated is called.
  1201.                 if ( id != _fUpdateID )
  1202.                         _fNewUpdateID = id;
  1203.  
  1204.                 // Add each non-promise value type in the contents property to _fKindsUsed,
  1205.                 // then remove the contents property.
  1206.             if (ODSUExistsThenFocus(ev, _fContentSU, kODPropContents, kODNULL) )
  1207.             {
  1208.                         ODULong numValues = _fContentSU->CountValues(ev);
  1209.                         ODULong kindIndex;
  1210.  
  1211.                         for (kindIndex = 0; kindIndex < numValues; kindIndex++)
  1212.                         {
  1213.                                 _fContentSU->Focus(ev, kODPropContents, kODPosUndefined, kODTypeAll, 0, kODPosNextSib);
  1214.                                 if ( !_fContentSU->IsPromiseValue(ev) )
  1215.                                 {
  1216.                                         if ( _fKindsUsed == kODNULL )
  1217.                                                 _fKindsUsed = somSelf->GetStorageUnit(ev)->GetSession(ev)->GetStorageSystem(ev)
  1218.                                                                                 ->CreateTypeList(ev, kODNULL);
  1219.                                         kind = _fContentSU->GetType(ev);
  1220.                                         _fKindsUsed->AddLast(ev, kind);
  1221.                                         ODDisposePtr(kind);
  1222.                                         kind = kODNULL;
  1223.                                         somSelf->SetBaseLinkSourceDirty(ev, kKindsUsedDirty);
  1224.                                 }
  1225.                         }
  1226.                         ODSURemoveProperty(ev, _fContentSU, kODPropContents);
  1227.  
  1228.                         RemoveDataInterchangeProperties(ev, _fContentSU, kODFalse);
  1229.  
  1230.                         _fCleared = kODTrue;
  1231.                 }
  1232.  
  1233.         SOM_CATCH_ALL
  1234.  
  1235.                 ODDisposePtr(kind);
  1236.  
  1237.         SOM_ENDTRY
  1238. }
  1239.  
  1240. //------------------------------------------------------------------------------
  1241. // ODBaseLinkSource: GetUpdateID
  1242. //------------------------------------------------------------------------------
  1243.  
  1244. SOM_Scope ODUpdateID  SOMLINK ODBaseLinkSourceGetUpdateID(ODBaseLinkSource *somSelf, Environment *ev)
  1245. {
  1246.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1247.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","GetUpdateID");
  1248.  
  1249.         return _fUpdateID;
  1250. }
  1251.  
  1252. //------------------------------------------------------------------------------
  1253. // ODBaseLinkSource: SetUpdateID
  1254. //------------------------------------------------------------------------------
  1255.  
  1256. SOM_Scope void  SOMLINK ODBaseLinkSourceSetUpdateID(ODBaseLinkSource *somSelf, Environment *ev,
  1257.                 ODUpdateID updateID,
  1258.                 ODLinkKey key)
  1259. {
  1260.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1261.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","SetUpdateID");
  1262. #ifdef _PLATFORM_MACINTOSH_
  1263.         SOM_CATCH return;
  1264. #endif
  1265.  
  1266. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1267.         SOM_TRY
  1268. #endif
  1269.  
  1270.         somSelf->KeyValid(ev, key);
  1271.  
  1272.         if ( updateID != _fUpdateID )
  1273.         {
  1274.                 _fUpdateID = updateID;
  1275. #ifdef _PLATFORM_OS2_
  1276. #else
  1277.                 somSelf->SetBaseLinkSourceDirty(ev, kUpdateIDDirty);
  1278. #endif
  1279.         }
  1280.  
  1281.  
  1282. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1283.         SOM_CATCH_ALL
  1284.           return;
  1285.         SOM_ENDTRY
  1286. #endif
  1287. }
  1288.  
  1289. //------------------------------------------------------------------------------
  1290. // ODBaseLinkSource: GetChangeTime
  1291. //------------------------------------------------------------------------------
  1292.  
  1293. SOM_Scope ODTime  SOMLINK ODBaseLinkSourceGetChangeTime(ODBaseLinkSource *somSelf, Environment *ev)
  1294. {
  1295.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1296.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","GetChangeTime");
  1297.  
  1298.         return _fChangeTime;
  1299. }
  1300.  
  1301. //------------------------------------------------------------------------------
  1302. // ODBaseLinkSource: SetChangeTime
  1303. //------------------------------------------------------------------------------
  1304.  
  1305. SOM_Scope void  SOMLINK ODBaseLinkSourceSetChangeTime(ODBaseLinkSource *somSelf, Environment *ev,
  1306.                 ODTime changeTime,
  1307.                 ODLinkKey key)
  1308. {
  1309.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1310.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","SetChangeTime");
  1311. #ifdef _PLATFORM_MACINTOSH_
  1312.         SOM_CATCH return;
  1313. #endif
  1314.  
  1315. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1316.         SOM_TRY
  1317. #endif
  1318.  
  1319.         somSelf->KeyValid(ev, key);
  1320.  
  1321.         _fChangeTime = changeTime;
  1322. #ifdef _PLATFORM_OS2_
  1323. #else
  1324.         somSelf->SetBaseLinkSourceDirty(ev, kChangeTimeDirty);
  1325. #endif
  1326.  
  1327.  
  1328. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1329.         SOM_CATCH_ALL
  1330.           return;
  1331.         SOM_ENDTRY
  1332. #endif
  1333. }
  1334.  
  1335. //------------------------------------------------------------------------------
  1336. // ODBaseLinkSource: IsAutoUpdate
  1337. //------------------------------------------------------------------------------
  1338.  
  1339. SOM_Scope ODBoolean  SOMLINK ODBaseLinkSourceIsAutoUpdate(ODBaseLinkSource *somSelf, Environment *ev)
  1340. {
  1341.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1342.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","IsAutoUpdate");
  1343.  
  1344.         return _fAutoUpdate;
  1345. }
  1346.  
  1347. //------------------------------------------------------------------------------
  1348. // ODBaseLinkSource: SetAutoUpdate
  1349. //------------------------------------------------------------------------------
  1350.  
  1351. SOM_Scope void  SOMLINK ODBaseLinkSourceSetAutoUpdate(ODBaseLinkSource *somSelf, Environment *ev,
  1352.                 ODBoolean automatic)
  1353. {
  1354.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1355.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","SetAutoUpdate");
  1356.  
  1357.         SOM_TRY
  1358.         _fAutoUpdate = automatic;
  1359. #ifdef _PLATFORM_OS2_
  1360. #else
  1361.         somSelf->SetBaseLinkSourceDirty(ev, kAutoUpdateDirty);
  1362. #endif
  1363.         SOM_CATCH_ALL
  1364.         SOM_ENDTRY
  1365. }
  1366.  
  1367. //------------------------------------------------------------------------------
  1368. // ODBaseLinkSource: GetLink
  1369. //------------------------------------------------------------------------------
  1370.  
  1371. SOM_Scope ODLink*  SOMLINK ODBaseLinkSourceGetLink(ODBaseLinkSource *somSelf, Environment *ev)
  1372. {
  1373.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1374.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","GetLink");
  1375.  
  1376.         if ( _fLink == (ODLink*) kODNULL )
  1377.         {
  1378.                 ODSetSOMException(ev, kODErrBrokenLink);
  1379.                 return (ODLink*) kODNULL;
  1380.         }
  1381.  
  1382.         return _fLink;
  1383. }
  1384.  
  1385. //------------------------------------------------------------------------------
  1386. // ODBaseLinkSource: SetLink
  1387. //------------------------------------------------------------------------------
  1388.  
  1389. SOM_Scope void  SOMLINK ODBaseLinkSourceSetLink(ODBaseLinkSource *somSelf, Environment *ev,
  1390.                 ODLink* link)
  1391. {
  1392.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1393.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","SetLink");
  1394.  
  1395.         SOM_TRY
  1396.  
  1397.         if ( !ODObjectsAreEqual(ev, _fLink, link) )
  1398.         {
  1399.                 ODReleaseObject(ev, _fLink);
  1400.  
  1401.                 _fLink = link;
  1402.                 if ( _fLink != (ODLink*) kODNULL )
  1403.                         _fLink->Acquire(ev);
  1404.  
  1405. #ifdef _PLATFORM_OS2_
  1406. #else
  1407.                 somSelf->SetBaseLinkSourceDirty(ev, kLinkDirty);
  1408. #endif
  1409.         }
  1410.  
  1411.         SOM_CATCH_ALL
  1412.         SOM_ENDTRY
  1413. }
  1414.  
  1415. //------------------------------------------------------------------------------
  1416. // ODBaseLinkSource: AcquireSourcePart
  1417. //------------------------------------------------------------------------------
  1418.  
  1419. SOM_Scope ODStorageUnit*  SOMLINK ODBaseLinkSourceAcquireSourcePart(ODBaseLinkSource *somSelf, Environment *ev)
  1420. {
  1421.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1422.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","AcquireSourcePart");
  1423.  
  1424.         if ( _fSourcePartSU != (ODStorageUnit*) kODNULL ) {
  1425.                 SOM_TRY
  1426.                 _fSourcePartSU->Acquire(ev);
  1427.                 SOM_CATCH_ALL
  1428.                 SOM_ENDTRY
  1429.         }
  1430.         return _fSourcePartSU;
  1431. }
  1432.  
  1433. //------------------------------------------------------------------------------
  1434. // ODBaseLinkSource: SetSourcePart
  1435. //------------------------------------------------------------------------------
  1436.  
  1437. SOM_Scope void  SOMLINK ODBaseLinkSourceSetSourcePart(ODBaseLinkSource *somSelf, Environment *ev,
  1438.                 ODStorageUnit* sourcePartSU)
  1439. {
  1440.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1441.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","SetSourcePart");
  1442. #ifdef _PLATFORM_MACINTOSH_
  1443.         SOM_CATCH return;
  1444. #endif
  1445.  
  1446. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1447.         SOM_TRY
  1448. #endif
  1449.  
  1450.         if ( !ODObjectsAreEqual(ev, _fSourcePartSU, sourcePartSU) )
  1451.         {
  1452.                 ODReleaseObject(ev, _fSourcePartSU);
  1453.  
  1454.                 _fSourcePartSU = sourcePartSU;
  1455.                 if ( _fSourcePartSU != (ODStorageUnit*) kODNULL )
  1456.                         _fSourcePartSU->Acquire(ev);
  1457. #ifdef _PLATFORM_OS2_
  1458. #else
  1459.                 somSelf->SetBaseLinkSourceDirty(ev, kSourcePartDirty);
  1460. #endif
  1461.         }
  1462.  
  1463.  
  1464. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1465.         SOM_CATCH_ALL
  1466.           return;
  1467.         SOM_ENDTRY
  1468. #endif
  1469. }
  1470.  
  1471. //------------------------------------------------------------------------------
  1472. // ODBaseLinkSource: ShowSourceContent
  1473. //------------------------------------------------------------------------------
  1474.  
  1475. SOM_Scope void  SOMLINK ODBaseLinkSourceShowSourceContent(ODBaseLinkSource *somSelf, Environment *ev)
  1476. {
  1477.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1478.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","ShowSourceContent");
  1479. #ifdef _PLATFORM_MACINTOSH_
  1480.         SOM_CATCH return;
  1481. #endif
  1482.  
  1483. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1484.         SOM_TRY
  1485. #endif
  1486.  
  1487.         if ( _fSourcePartSU == (ODStorageUnit*) kODNULL )
  1488.                 THROW(kODErrBrokenLinkSource);
  1489.  
  1490.         TempODPart part = somSelf->GetStorageUnit(ev)->GetDraft(ev)->AcquirePart(ev, _fSourcePartSU->GetID(ev));
  1491.         part->RevealLink(ev, (ODLinkSource*) somSelf);
  1492.  
  1493. #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
  1494.         SOM_CATCH_ALL
  1495.           return;
  1496.         SOM_ENDTRY
  1497. #endif
  1498.  
  1499.  
  1500. }
  1501.  
  1502. //------------------------------------------------------------------------------
  1503. // RemovePromisedContent
  1504. //------------------------------------------------------------------------------
  1505.  
  1506. static void RemovePromisedContent(Environment *ev, ODStorageUnit* su)
  1507. {
  1508.     // Remove value types that still contain promises
  1509.     if ( su && ODSUExistsThenFocus(ev, su, kODPropContents, kODNULL) )
  1510.     {
  1511.                 ODULong numValues = su->CountValues(ev);
  1512.                 ODULong kindIndex;
  1513.  
  1514.                 for (kindIndex = 0; kindIndex < numValues; kindIndex++)
  1515.                 {
  1516.                         su->Focus(ev, kODPropContents, kODPosUndefined, kODTypeAll, 0, kODPosNextSib);
  1517.                         if ( su->IsPromiseValue(ev) )
  1518.                                 su->Remove(ev);
  1519.                 }
  1520.         }
  1521. }
  1522.  
  1523. #if defined(_PLATFORM_OS2_)
  1524. //------------------------------------------------------------------------------
  1525. // ODBaseLinkSource: GetUpdateContinue
  1526. //------------------------------------------------------------------------------
  1527.  
  1528. SOM_Scope ODBoolean  SOMLINK ODBaseLinkSourceGetUpdateContinue(ODBaseLinkSource *somSelf, Environment *ev)
  1529. {
  1530.     ODBaseLinkSourceData *somThis = ODBaseLinkSourceGetData(somSelf);
  1531.     ODBaseLinkSourceMethodDebug("ODBaseLinkSource","GetUpdateContinue");
  1532.  
  1533.     return _fUpdateContinue;
  1534. }
  1535. #endif
  1536.  
  1537.