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

  1. //#====START_GENERATED_PROLOG======================================
  2. //#
  3. //#
  4. //#   COMPONENT_NAME: oddataxfer
  5. //#
  6. //#   CLASSES: none
  7. //#
  8. //#   ORIGINS: 82,27,94
  9. //#
  10. //#
  11. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  12. //#   All Rights Reserved
  13. //#   Licensed Materials - Property of IBM
  14. //#   US Government Users Restricted Rights - Use, duplication or
  15. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //#       
  17. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //#   OR PERFORMANCE OF THIS SOFTWARE.
  24. //#
  25. //#====END_GENERATED_PROLOG========================================
  26. //#
  27. // @(#) 1.16 com/src/storage/idl/LinkSrc.idl, oddataxfer, od96os2, odos29712d 9/10/96 18:52:59 [ 3/21/97 17:20:10 ]
  28. #ifdef __PRIVATE__
  29. //#
  30. //#     File:           LinkSrc.idl
  31. //#
  32. //#     Contains:       Interface of ODLinkSource class
  33. //#
  34. //#     Owned by:       Craig Carper
  35. //#
  36. //#     Copyright:      (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  37. //#
  38. //#     Change History (most recent first):
  39. //#
  40. //#             <18>      9/1/95        CC              1280823: Override of ShowSourceContent made
  41. //#                                                                     private.
  42. //#                                                                     1278590: Added SetStatus(ODError error).
  43. //#             <17>     8/15/95        CC              1275241: IDL review.
  44. //#             <16>      8/3/95        RR              #1257260: Collapse B classes. Remove
  45. //#                                                                     somInit methods. Don't call IsInitialized
  46. //#                                                                     or SubclassResponsibility
  47. //#             <15>     7/28/95        CC              1183569: Added SetLinkSourceDirty().
  48. //#             <14>     7/14/95        TJ              Made Some TypeDefs into Structs so SOM Slim
  49. //#                                                                     can get there correct Sizes.
  50. //#             <13>      3/3/95        CC              1223861: Added GetStatus() method and
  51. //#                                                                     fStatus field.
  52. //#             <12>     1/19/95        CC              1210953 Added override of SetSourcePart.
  53. //#                                                                     1183569 Added fDirty flag.
  54. //#             <11>    12/16/94        CC              1203516 Removed ODLink parameter from
  55. //#                                                                     InitLinkSource().
  56. //#             <10>    11/30/94        RR              #1188078 Use FSSpec, not ODFileSpec in
  57. //#                                                                     private methods
  58. //#              <9>     10/7/94        CC              1191089 - CloneFromMemoryContainer()
  59. //#                                                                     returns void.
  60. //#              <8>     10/4/94        CC              1190862 - Added override of Release().
  61. //#              <7>     9/15/94        CC              1186669 - Override CloneInto().
  62. //#              <6>     8/10/94        CC              1179943 - Moved platform-independent
  63. //#                                                                     implementation into LinkSrcB.
  64. //#              <5>      8/5/94        CC              #1179160 - Added fContentChanged field.
  65. //#              <4>     6/21/94        CC              Added functionprefix.
  66. //#              <3>     6/14/94        CC              Added passthru C_xh so clients of private
  67. //#                                                                     xh file will compile.
  68. //#              <2>     6/10/94        CC              Tweek UseLinkEdition() parameters.
  69. //#              <1>      6/8/94        CG              first checked in
  70. //#              <8>      6/7/94        RR              Privatise change log
  71. //#              <7>     5/12/94        CC              Added ShowLinkSourceInfo.
  72. //#              <6>      5/4/94        CC              Adjustments to in/out/inout.
  73. //#
  74. //#     To Do:
  75. //#
  76. #else
  77. //#     Copyright:      (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  78. #endif
  79.  
  80. #ifndef _LINKSRC_
  81. #define _LINKSRC_
  82.  
  83. #ifndef _LINKSRCB_
  84. #include "LinkSrcB.idl"
  85. #endif
  86.  
  87. #ifdef _PLATFORM_OS2_
  88. #ifndef _IODDEFS_
  89. #include <IODDefs.idl>
  90. #endif
  91. #endif
  92.  
  93. //==============================================================================
  94. // Classes defined in this interface
  95. //==============================================================================
  96.  
  97. interface  ODLinkSource;
  98.  
  99. //==============================================================================
  100. // Classes used by this interface
  101. //==============================================================================
  102.  
  103. #ifdef _PLATFORM_WIN32_
  104. interface ODSession;
  105. #endif //# _PLATFORM_WIN32_
  106. interface ODStorageUnit;
  107. interface ODPart;
  108. interface ODLink;
  109.  
  110. #ifdef __PRIVATE__
  111.  
  112. //==============================================================================
  113. // Implementation types
  114. //==============================================================================
  115.  
  116.   #ifdef _PLATFORM_MACINTOSH_
  117. typedef somToken SectionHandle;
  118. typedef somToken EditionContainerSpec;
  119. typedef somToken FSSpec;                // THIS IS A BOGUS DEFINITION. DO NOT USE IN A FIELD!
  120.   #endif //# _PLATFORM_MACINTOSH_
  121.   #ifdef _PLATFORM_WIN32_
  122. typedef somToken LPVOID;
  123.  
  124. typedef somToken OLEPromiseKeeper;
  125.  
  126. typedef somToken DWORD;
  127. typedef somToken BOOL;
  128. typedef somToken time_t;
  129.   #endif //# _PLATFORM_WIN32_
  130.  
  131. #endif //# __PRIVATE__
  132.  
  133. //==============================================================================
  134. // ODLinkSource
  135. //==============================================================================
  136.  
  137. interface ODLinkSource : ODBaseLinkSource
  138. {
  139. #ifdef __PRIVATE__
  140.  
  141.         void InitLinkSource(in ODStorageUnit storageUnit,
  142.                                                 in ODPart sourcePart);
  143.  
  144.         void InitLinkSourceFromStorage(in ODStorageUnit storageUnit);
  145.  
  146.   #ifdef _PLATFORM_OS2_
  147.         void SetDescription (in ODLinkDescription desc);
  148.                 // Called by source Part to set its description.
  149.  
  150.         void GetDescription (out ODLinkDescription desc);
  151.                 // Called by source Part to get its description.
  152.  
  153.         void GetLinkConnectionData (in ODLinkConnectionID connID,
  154.                               out ODLinkConnectionData* ConnData);
  155.                 // Called by source Part or source Draft to retrieve the description of
  156.                 //   the given LinkTarget.
  157.  
  158.  
  159.         //void GetLinkTargets (out IODConnIDIterator trgtIDs);
  160.         void GetLinkConnections (out sequence<ODLinkConnectionID> connIDs);
  161.                 // Called by source Part to obtain the list of LinkTarget connection ID's
  162.                 //   in the LinkSource.
  163.  
  164.         void InitCallBackMode (in ODBoolean trackTrgt);
  165.                 // Called by Part after creation to initialize the mode of tracking
  166.                 //   LinkTargets.
  167.                 // By default LinkSource only tracks local or registered LinkTargets.
  168.  
  169.         //void RemoveLinkTarget (in IODConnectionID trgtID);
  170.         void BreakLinkConnection (in ODLinkConnectionID connID);
  171.                 // Called by source Part to break the link with the given LinkTarget.
  172.  
  173.         //void DescribeSelf ( out IODPartDescription* srcPartDesc);
  174.         void GetConnectionData (out ODLinkConnectionData* srcConnData);
  175.                 // Called by source Part to retrieve the description of itself.
  176.  
  177.   #endif // _PLATFORM_OS2_
  178.   #ifdef _PLATFORM_MACINTOSH_
  179.  
  180.         void UseLinkEdition(in EditionContainerSpec editionContainer,
  181.                                         in FSSpec *documentSpec,
  182.                                         in ODULong sectionID,
  183.                                         in ODLinkKey key);
  184.  
  185.         void ReadLinkEdition(in ODLinkKey key);
  186.  
  187.   #endif //# _PLATFORM_MACINTOSH_
  188.  
  189.   #ifdef _PLATFORM_WIN32_
  190.  
  191.         void SetLocked( in ODBoolean locked );
  192.  
  193.         ODBoolean GetLocked( );
  194.  
  195.         ODLinkKey GetCurrentKey( );
  196.  
  197.         void SetCurrentKey( in ODLinkKey key );
  198.  
  199.         void UseMoniker( in void                *pmkFull,
  200.                                          in ODLinkKey   key);
  201.  
  202.         void ReadMoniker(in ODLinkKey key);
  203.  
  204.         BOOL StoreMoniker( in ODStorageUnit             su,
  205.                                            in ODPropertyName    property,
  206.                                            in LPVOID                    pmk );
  207.  
  208.         void RestoreMoniker( in  ODStorageUnit  storageUnit,
  209.                                                  in  ODPropertyName     property,
  210.                                                  out LPVOID                     ppmk );
  211.  
  212.         void OnClose( );
  213.  
  214.         void OnDataChange( );
  215.  
  216.         void OnRename( in LPVOID        ppmk );
  217.  
  218.   #endif //# _PLATFORM_WIN32_
  219.  
  220.   #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_)
  221.         void SetStatus(in ODError error);
  222.         ODError GetStatus();
  223.   #endif // MAC or OS/2
  224.  
  225.         //# Private to implementation
  226.  
  227.         void CloneFromMemoryContainer(in ODStorageUnit contentSU,
  228.                                                                 in ODHandle containerHandle);
  229.  
  230.   #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_)
  231.         void SetLinkSourceDirty();
  232.   #endif // MAC or OS/2 or WIN32
  233.  
  234. #endif //# __PRIVATE__
  235.  
  236. #ifdef __SOMIDL__
  237.   #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  238.         implementation
  239.         {
  240.                 majorversion = 1; minorversion = 0;
  241.  
  242.                 functionprefix = ODLinkSource;
  243.  
  244.                 override:
  245.                         somUninit,
  246.                         Release,
  247.                         Externalize,
  248.                         ReleaseAll,
  249.                         CloneInto,
  250.                         SetAutoUpdate,
  251.     #ifdef __PRIVATE__
  252.                         ShowSourceContent,
  253.     #endif //# __PRIVATE__
  254.                         SetSourcePart;
  255.  
  256.                 releaseorder:
  257.                         #ifdef __PRIVATE__
  258.                                 InitLinkSource,
  259.                                 InitLinkSourceFromStorage,
  260.                           #ifdef _PLATFORM_MACINTOSH_
  261.                                 UseLinkEdition,
  262.                                 ReadLinkEdition,
  263.                           #endif //# MAC
  264.                           #if defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_)
  265.                                 reservedA,
  266.                                 reservedB,
  267.                                 SetLinkSourceDirty,
  268.                           #endif //# WIN32 or OS2
  269.                           #ifdef _PLATFORM_WIN32_
  270.                                 SetLocked,
  271.                                 GetLocked,
  272.                                 GetCurrentKey,
  273.                                 SetCurrentKey,
  274.                                 UseMoniker,
  275.                                 ReadMoniker,
  276.                                 StoreMoniker,
  277.                                 RestoreMoniker,
  278.                                 OnClose,
  279.                                 OnDataChange,
  280.                                 OnRename,
  281.                           #endif //# WIN32
  282.                           #ifdef _PLATFORM_OS2_
  283.                                 GetLinkConnectionData,
  284.                                 GetLinkConnections,
  285.                                 InitCallBackMode,
  286.                                 BreakLinkConnection,
  287.                                 GetConnectionData,
  288.                                 GetDescription,
  289.                                 SetDescription,
  290.                                 reservedJ,
  291.                                 reservedK,
  292.                                 reservedL,
  293.                                 reservedM,
  294.                                 SetStatus,
  295.                                 GetStatus,
  296.                                 reservedN,
  297.                           #endif //# OS2
  298.                           #ifdef _PLATFORM_MACINTOSH_
  299.                                 reservedC,
  300.                                 reservedD,
  301.                                 reservedE,
  302.                                 reservedF,
  303.                                 reservedG,
  304.                                 reservedH,
  305.                                 reservedI,
  306.                                 reservedJ,
  307.                                 reservedK,
  308.                                 reservedL,
  309.                                 reservedM,
  310.                                 SetStatus,
  311.                                 GetStatus,
  312.                                 SetLinkSourceDirty,
  313.                           #endif //# MAC or OS2
  314.                           #ifdef _PLATFORM_AIX_
  315.                                 reservedA,
  316.                                 reservedB,
  317.                                 reservedC,
  318.                                 reservedD,
  319.                                 reservedE,
  320.                                 reservedF,
  321.                                 reservedG,
  322.                                 reservedH,
  323.                                 reservedI,
  324.                                 reservedJ,
  325.                                 reservedK,
  326.                                 reservedL,
  327.                                 reservedM,
  328.                                 reservedN,
  329.                                 reservedO,
  330.                                 reservedP,
  331.                           #endif //# AIX
  332.                                 CloneFromMemoryContainer;
  333.                         #else
  334.                                 reserved1,
  335.                                 reserved2,
  336.                                 reserved3,
  337.                                 reserved4,
  338.                                 reserved5,
  339.                                 reserved6,
  340.                                 reserved7,
  341.                                 reserved8,
  342.                                 reserved9,
  343.                                 reserved10,
  344.                                 reserved11,
  345.                                 reserved12,
  346.                                 reserved13,
  347.                                 reserved14,
  348.                                 reserved15,
  349.                                 reserved16,
  350.                                 reserved17,
  351.                                 reserved18,
  352.                                 reserved19;
  353.                         #endif
  354.  
  355.  
  356.                 #ifdef __PRIVATE__
  357.                         passthru C_xh = ""
  358.                                                         "#ifdef _PLATFORM_MACINTOSH_"
  359.                                                         "#ifndef __EDITIONS__"
  360.                                                         "#include <Editions.h>"
  361.                                                         "#endif"
  362.                                                         ""
  363.                                                         "#ifndef __FILES__"
  364.                                                         "#include <Files.h>"
  365.                                                         "#endif"
  366.                                                         "#endif"
  367.                                                         ""
  368.                                                         "#ifdef _PLATFORM_OS2_"
  369.                                                         "#ifndef _ODTYPESB_"
  370.                                                         "#include <odtypesb.xh>"
  371.                                                         "#endif"
  372.                                                         "#include <ioddefs.xh>"
  373.                                                         "#include <ICIDItr.xh>"
  374.                                                         "#endif // _PLATFORM_OS2_"
  375.                                                         ""
  376.                                                         "#ifdef _PLATFORM_WIN32_"
  377.                                                         "#define kODMoniker     \"Ole2Moniker\" "
  378.                                                         "#define kODLinkContent \"OpenDoc:LinkContent\" "
  379.                                                         "#ifndef __TIME_H__"
  380.                                                         "#include <time.h>"
  381.                                                         "#endif"
  382.                                                         "#ifndef _SOM_OLEPromiseKeeper_xh"
  383.                                                         "#include <oledpkpr.xh>"
  384.                                                         "#endif"
  385.                                                         "#endif"
  386.                                                         "";
  387.                         passthru C_h =
  388.                                                         ""
  389.                                                         "#ifdef _PLATFORM_WIN32_"
  390.                                                         "#define kODMoniker     \"Ole2Moniker\" "
  391.                                                         "#define kODLinkContent \"OpenDoc:LinkContent\" "
  392.                                                         "#ifndef __TIME_H__"
  393.                                                         "#include <time.h>"
  394.                                                         "#endif"
  395.                                                         "#ifndef _SOM_OLEPromiseKeeper_xh"
  396.                                                         "#include <oledpkpr.h>"
  397.                                                         "#endif"
  398.                                                         "#endif"
  399.                                                         "";
  400.                    #ifdef _PLATFORM_MACINTOSH_
  401.                         SectionHandle   fSection;
  402.                    #endif //# _PLATFORM_MACINTOSH_
  403.                         ODError                 fStatus;
  404.                         ODBoolean               fDirty;
  405.                    #ifdef _PLATFORM_WIN32_
  406.                         ODStorageUnit    fContentSU;     // storage unit containing link's content
  407.                         time_t           fChangeTime;    // date and time link was last updated
  408.                         ODBoolean        fAutoUpdate;    // true if link should be exported on save
  409.                         ODLink           fLink;          // associated link object
  410.                         ODStorageUnit    fSourcePartSU;  // storage unit of source part
  411.                         ODBoolean        fLocked;        // TRUE if we are locked
  412.                         ODLinkKey        fCurrentKey;    // The current link key
  413.                         LPVOID           fpmkFull;       // Full moniker of this link spec
  414.                         LPVOID           fpmkRelative;   // Relative moniker of the link spec
  415.                         LPVOID           fpDataObj;      // IDataObject for the link source
  416.                         LPVOID           fpAdviseSink;   // Advise sink
  417.                         DWORD            fdwConn;        // Advise holder connection id
  418.                         ODBoolean        fSourceNeedsClosing; // we opened the source document and need to close
  419.                         LPVOID           fSourceDocumentIPersistFile;   // interface pointer to source document
  420.                         OLEPromiseKeeper *fPromiseKeeper;// Promise keeper object
  421.                                 ODSession        fSession;
  422.                         ODULong                  fChangeCount;   // Anti-recursion measures...
  423.                         ODULong                  fChangeLimit;
  424.                         ODBoolean                fContentChanged;
  425.                   #endif //# _PLATFORM_WIN32_
  426.                 #endif //# __PRIVATE__
  427.         };
  428.   #endif //# _PLATFORM_MACINTOSH_ or WIN32 or OS2
  429. #endif //# __SOMIDL_
  430. };
  431.  
  432. #endif // _LINKSRC_
  433.