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

  1. /* @(#) 1.20 com/src/storage/idl/Link.idl, oddataxfer, od96os2, odos29712d 10/31/96 07:56:42 [3/21/97 17:20:08] */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: oddataxfer
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27,94
  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. #ifdef __PRIVATE__
  30. //#
  31. //#     File:           Link.idl
  32. //#
  33. //#     Contains:       Interface of ODLink class
  34. //#
  35. //#     Owned by:       Craig Carper
  36. //#
  37. //#     Copyright:      (R) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  38. //#
  39. //#     Change History (most recent first):
  40. //#
  41. //#             <19>     8/15/95        CC              1275241: IDL review.
  42. //#             <18>      8/3/95        RR              #1257260: Collapse B classes. Remove
  43. //#                                                                     somInit methods. Don't call IsInitialized
  44. //#                                                                     or SubclassResponsibility
  45. //#             <17>     7/28/95        CC              1183569: Added SetLinkDirty method.
  46. //#             <16>     7/27/95        CC              1259986: Added SectionHandle parameter to
  47. //#                                                                     WriteLinkEdition.
  48. //#             <15>     7/21/95        CC              1153788: GetTextValue changed to
  49. //#                                                                     GetPlatformValue.
  50. //#             <14>     7/14/95        TJ              Made Some TypeDefs into Structs so SOM Slim
  51. //#                                                                     can get there correct Sizes.
  52. //#             <13>      3/3/95        CC              1223861, 1153949: Override
  53. //#                                                                     ShowLinkDestinationInfo().
  54. //#             <12>     1/19/95        CC              1183569 Added fDirty flag.
  55. //#             <11>    12/22/94        CC              1207987 Added DeleteLinkEdition().
  56. //#             <10>    12/16/94        CC              1203516Removed ODLinkSource parameter from
  57. //#                                                                     InitLink().
  58. //#              <9>    11/30/94        RR              #1188078 Use FSSpec, not ODFileSpec in
  59. //#                                                                     private methods
  60. //#              <8>     10/4/94        CC              1190862 - Added override of Release().
  61. //#              <7>     9/15/94        CC              1186669 - Override CloneInto().
  62. //#              <6>      9/6/94        CC              Override of UpdateDependents is private.
  63. //#              <5>     8/10/94        CC              1179943 - Moved platform-independent
  64. //#                                                                     implementation into LinkSrcB.
  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/9/94        CC              Changed ODFileSpec parms to ODFileSpec*.
  69. //#              <1>      6/8/94        CG              first checked in
  70. //#              <9>      6/7/94        RR              Privatise change log
  71. //#              <8>     5/12/94        CC              Added ShowLinkDestinationInfo.
  72. //#              <7>      5/4/94        CC              Adjustments to in/out/inout; override of
  73. //#                                                                     UpdateDependents() made private.
  74. //#
  75. //#     To Do:
  76. //#
  77. #else
  78. //#     Copyright:      (R) 1993 - 1995 by Apple Computer, Inc., all rights reserved.
  79. #endif
  80.  
  81. #ifndef _LINK_
  82. #define _LINK_
  83.  
  84. #ifndef _LINKB_
  85. #include "LinkB.idl"
  86. #endif
  87.  
  88. #ifdef _PLATFORM_OS2_
  89.   #ifndef _IODDEFS_
  90.   #include <IODDefs.idl>
  91.   #endif
  92. #endif
  93.  
  94. //==============================================================================
  95. // Theory of Operation (Copied from Feb-13 build)
  96. //==============================================================================
  97.  
  98. /*
  99.   This class is used to represent the destination side of OpenDoc links.
  100.   ODDrafts create and own these links. The source ODPart will ask the draft
  101.   to create an ODLinkSource and an ODLink pair, and return the ODLink
  102.   object to the the destination part.  The destination part uses the ODLink
  103.   object to extract the contents of the link.
  104. */
  105.  
  106. //==============================================================================
  107. // Classes defined in this interface
  108. //==============================================================================
  109.  
  110. interface  ODLink;
  111.  
  112. //==============================================================================
  113. // Classes used by this interface
  114. //==============================================================================
  115.  
  116. interface       ODStorageUnit;
  117. interface       ODLinkSource;
  118.  
  119. #ifdef __PRIVATE__
  120.  
  121. //==============================================================================
  122. // Implementation types
  123. //==============================================================================
  124.  
  125. // #ifdef _PLATFORM_MACINTOSH_
  126. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  127. typedef somToken AliasHandle;
  128. typedef somToken SectionHandle;
  129. typedef somToken EditionContainerSpec;
  130. #endif //# _PLATFORM_MACINTOSH_ or _PLATFORM_OS2_
  131. typedef somToken FSSpec;                // THIS IS A BOGUS DEFINITION. DO NOT USE IN A FIELD!
  132.  
  133. #ifdef _PLATFORM_WIN32_
  134. typedef somToken ODPartList;
  135. typedef somToken LPVOID;
  136. #endif //# _PLATFORM_WIN32_
  137.  
  138. #endif //# __PRIVATE__
  139.  
  140. //==============================================================================
  141. // ODLink
  142. //==============================================================================
  143.  
  144. interface ODLink : ODBaseLink
  145. {
  146. #ifdef _PLATFORM_OS2_
  147.         void SetDescription (in ODLinkDescription Desc);
  148.            // called by target Part to set its description.
  149.  
  150.         void GetDescription (out ODLinkDescription Desc);
  151.            // called by target Part to retrieve the description of itself.
  152.  
  153.         ODBoolean IsRegistered();
  154.            // Returns whether of not this LinkTarget is registered to receive automatic updates.
  155.  
  156. #endif // _PLATFORM_OS2_
  157. #ifdef __PRIVATE__
  158.  
  159.         void InitLink(in ODStorageUnit storageUnit);
  160.  
  161.         void InitLinkFromStorage(in ODStorageUnit storageUnit);
  162.  
  163. #ifdef _PLATFORM_OS2_
  164.         void GetLinkSourceConnectionData (out ODLinkConnectionData* srcConnData);
  165.            // called by the draft to retrieve the description of the
  166.            // source content to which this link target is linked
  167.  
  168.         void GetConnectionData (out ODLinkConnectionData* ConnData);
  169.            // called by the draft to retreive the description of the link
  170.  
  171. #endif // _PLATFORM_OS2_
  172.  
  173. #ifdef _PLATFORM_MACINTOSH_
  174.  
  175.         AliasHandle CreateLinkEdition(in EditionContainerSpec editionContainer,
  176.                                                                         in FSSpec *documentSpec,
  177.                                                                         in ODULong sectionID,
  178.                                                                         in ODLinkKey key);
  179.  
  180.         AliasHandle GetLinkEdition(in ODLinkKey key);
  181.  
  182.         void DeleteLinkEdition(in ODLinkKey key);
  183.  
  184.         void UpdateLinkEdition(in ODLinkKey key);
  185.  
  186.         void WriteLinkEdition(in SectionHandle section,
  187.                                                         in FSSpec *documentSpec,
  188.                                                         in ODLinkKey key);
  189.  
  190. #endif //# _PLATFORM_MACINTOSH_
  191. #ifdef _PLATFORM_WIN32_
  192.  
  193.         ODHandle CloneIntoMemoryContainer(in ODLinkKey key);
  194.  
  195.         void RefreshDataObject(in ODLinkKey key);
  196.  
  197.         void UseItemName( in char *pszItemName );
  198.  
  199.         char* GetItemName( );
  200.  
  201.         LPVOID GetDataObject( in ODLinkKey key );
  202.  
  203. #endif //# _PLATFORM_WIN32_
  204.         //# Private to implementation
  205.  
  206. #ifdef _PLATFORM_MACINTOSH_
  207.         ODHandle GetPlatformValue(in ODPlatformType platformType, in ODLinkKey key);
  208.         ODHandle CloneToMemoryContainer(in ODLinkKey key);
  209.  
  210. #endif // _PLATFORM_MACINTOSH_
  211.         void SetLinkDirty();
  212. #ifdef _PLATFORM_OS2_
  213.         ODHandle CloneToMemoryContainer(in ODLinkKey key);
  214.  
  215. #endif // _PLATFORM_OS2_
  216.  
  217. #endif //# __PRIVATE__
  218.  
  219. #ifdef __SOMIDL__
  220. #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  221.         implementation
  222.         {
  223.                 majorversion = 1; minorversion = 0;
  224.  
  225.                 functionprefix = ODLink;
  226.  
  227.                 override:
  228.                 #ifdef __PRIVATE__
  229.                         UpdateDependents,
  230.                 #endif
  231.                         somUninit,
  232.                         Release,
  233.                         Externalize,
  234.                         ReleaseAll,
  235.                 #if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_WIN32_)
  236.                         ShowLinkDestinationInfo,
  237.                 #endif
  238.                         CloneInto;
  239.  
  240.                 releaseorder:
  241.                 #ifdef _PLATFORM_OS2_
  242.                         SetDescription,
  243.                         GetDescription,
  244.                         IsRegistered,
  245.                 #endif
  246.                 #ifdef __PRIVATE__
  247.                   #ifdef _PLATFORM_MACINTOSH_
  248.                         InitLink,
  249.                         InitLinkFromStorage,
  250.                         CreateLinkEdition,
  251.                         GetLinkEdition,
  252.                         DeleteLinkEdition,
  253.                         UpdateLinkEdition,
  254.                         GetPlatformValue,
  255.                         CloneToMemoryContainer,
  256.                         WriteLinkEdition,
  257.                         SetLinkDirty,
  258.                   #endif //# _PLATFORM_MACINTOSH_
  259.                   #ifdef _PLATFORM_OS2_
  260.                         InitLink,
  261.                         InitLinkFromStorage,
  262.                         CloneToMemoryContainer,
  263.                         GetConnectionData,
  264.                         GetLinkSourceConnectionData,
  265.                         SetLinkDirty,
  266.                         ReservedE;
  267.                   #endif //# _PLATFORM_OS2_
  268.                   #ifdef _PLATFORM_WIN32_
  269.                         InitLink,
  270.                         InitLinkFromStorage,
  271.                         GetPlatformValue,
  272.                         ReservedA,
  273.                         CloneIntoMemoryContainer,
  274.                         RefreshDataObject,
  275.                         UseItemName,
  276.                         GetItemName,
  277.                         GetDataObject,
  278.                         SetLinkDirty;
  279.                   #endif //# _PLATFORM_WIN32_
  280.                   #ifdef _PLATFORM_AIX_
  281.                         InitLink,
  282.                         InitLinkFromStorage,
  283.                         GetPlatformValue,
  284.                         SetLinkDirty,
  285.                         CloneToMemoryContainer,
  286.                         ReservedB,
  287.                         ReservedC,
  288.                         ReservedD,
  289.                         ReservedE,
  290.                         ReservedF;
  291.                   #endif //# _PLATFORM_AIX_
  292.                 #else
  293.                         reserved1,
  294.                         reserved2,
  295.                         reserved3,
  296.                         reserved4,
  297.                         reserved5,
  298.                         reserved6,
  299.                         reserved7,
  300.                         reserved8,
  301.                         reserved9,
  302.                         reserved10;
  303.                 #endif
  304.  
  305.         #ifdef __PRIVATE__
  306.                         passthru C_xh = ""
  307.                                                         "#ifdef _PLATFORM_MACINTOSH_"
  308.                                                         "#ifndef __EDITIONS__"
  309.                                                         "#include <Editions.h>"
  310.                                                         "#endif"
  311.                                                         ""
  312.                                                         "#ifndef __FILES__"
  313.                                                         "#include <Files.h>"
  314.                                                         "#endif"
  315.                                                         ""
  316.                                                         "#ifndef __ALIASES__"
  317.                                                         "#include <Aliases.h>"
  318.                                                         "#endif"
  319.                                                         "#endif"
  320.                                                         ""
  321.                                                         "#ifdef _PLATFORM_OS2_"
  322.                                                         "#ifndef _ODTYPESB_"
  323.                                                         "#include <ODTypesB.xh>"
  324.                                                         "#endif"
  325.                                                         ""
  326.                                                         "#include <IODDefs.xh>"
  327.                                                         "typedef unsigned long SectionHandle;"
  328.                                                         "typedef unsigned long EditionContainerSpec;"
  329.                                                         "#endif"
  330.                                                         "";
  331.                 #if defined(_PLATFORM_MACINTOSH_) || defined (_PLATFORM_OS2_) || defined(_PLATFORM_AIX_)
  332.                         SectionHandle   fSection;
  333.                 #endif //# _PLATFORM_MACINTOSH_
  334.                 #ifdef _PLATFORM_WIN32_
  335.                         char*           fpszItemName;   // OLE item moniker name
  336.                         LPVOID          fpDataObject;   // OLE data object
  337.                 #endif //# _PLATFORM_WIN32_
  338.                         ODBoolean               fDirty;
  339.         #else  //# __PRIVATE__
  340.                         passthru C_xh = ""
  341.                                                         "#ifdef _PLATFORM_OS2_"
  342.                                                         "#ifndef _ODTYPESB_"
  343.                                                         "#include <ODTypesB.xh>"
  344.                                                         "#endif"
  345.                                                         "#endif"
  346.                                                         "";
  347.  
  348.         #endif //# __PRIVATE__
  349.         };
  350. #endif //# _PLATFORM_MACINTOSH_ or _PLATFORM_WIN32_ or _PLATFORM_OS2_
  351. #endif //# __SOMIDL__
  352. };
  353.  
  354. #endif // _LINK_
  355.