home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / DocMgr.idl < prev    next >
Text File  |  1997-04-02  |  6KB  |  196 lines

  1. /* @(#)Z 1.38 com/src/docshell/idl/DocMgr.idl, odshell, od96os2, odos29712d 97/03/21 17:37:27 (97/03/05 14:37:15) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odshell
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 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. #ifndef _DOCMGRSHELL_
  30. #define _DOCMGRSHELL_
  31.  
  32. #include <somobj.idl>
  33. #include <mlink.idl>
  34.  
  35. #ifndef _ODTYPESM_
  36. #include "ODTypesM.idl"
  37. #endif
  38.  
  39. //==============================================================================
  40. // Classes defined in this interface
  41. //==============================================================================
  42.  
  43. interface   DocumentManager;
  44.  
  45. //==============================================================================
  46. // Classes used by this interface
  47. //==============================================================================
  48.  
  49. interface   ODSession;
  50. interface   ODContainer;
  51. interface   ODDocument;
  52. interface   ODDraft;
  53. interface   ODPart;
  54. interface   ODWindowState;
  55. interface   ODPlatformWindow;
  56. interface   ODStorageUnit;
  57.  
  58. //==============================================================================
  59. // Implementation Types
  60. //==============================================================================
  61.  
  62. typedef somToken PlatformFile;
  63. typedef somToken DraftInfoRec;
  64. #ifdef _PLATFORM_WIN32_
  65.     typedef somToken OleWrapper;
  66.     typedef somToken IStream;
  67. #endif
  68.  
  69. //==============================================================================
  70. // DocumentManager
  71. //==============================================================================
  72.  
  73. interface DocumentManager :  somf_MLinkable
  74. {
  75.     void        Initialize(in ODSession session);
  76.     char*         OpenDocumentFromFile(in char *fileName, 
  77.                     in ODUShort actionFlag);
  78.     char*         OpenDocumentFromMemory(in ODHandle handle);
  79.     void        CreateDocumentInFile(in ODType kindName, 
  80.                     in char* fileName);
  81.     void        CreateDocumentInMemory(in ODType kindName);
  82.     void        CreateDocumentAsStationery(in ODType kindName, 
  83.                     in char* fileName);
  84.     ODDocument         GetDocument();
  85.     void        SaveDocument();
  86.     void        CloseDocument(in ODULong saveOption);
  87.     ODBoolean        CloseWindow(in ODPlatformWindow pwindow, 
  88.                     in ODBoolean confirm);
  89.     void         CreateDraft(in ODULong draftNum, in ODIText modUser,
  90.                     in ODIText comment);
  91.     ODBoolean         OpenDraft(in ODDraft draft, in ODBoolean toBeRelease);
  92.     void         CloseDraft(in ODDraft draft);
  93.     void         SaveDraft();
  94.     ODBoolean         DeleteDraft(in DraftInfoRec* draftInfoRec);
  95.     ODDraft        GetLatestCreatedDraft();
  96.     ODDraft         GetDraft();
  97.     DraftInfoRec*    GetDraftList();
  98.     void        DeleteDraftList();
  99.     ODBoolean         HasWriteAccess();
  100.     void        InternalizeHistory();
  101.     void         Revert();
  102.     void        SaveACopyAs(in ODDraft draft, inout PlatformFile file); 
  103.     #ifdef _PLATFORM_WIN32_
  104.         void        SetOleWrapper(in OleWrapper *oleWrapper);
  105.         OleWrapper*    GetOleWrapper();
  106.     #endif
  107.     char*        GetFileName();
  108.     void        SetFileName(in char *fileName);
  109.     char*        GetPartKindName();
  110.     void        SetPartKindName(in char *kindName);
  111.  
  112.  
  113. #ifdef __SOMIDL__
  114.     implementation
  115.     {
  116.         majorversion = 1; minorversion = 0;
  117.  
  118.         functionprefix = DocumentManager;
  119.  
  120.         releaseorder:
  121.             Initialize,
  122.             OpenDocumentFromFile,
  123.             OpenDocumentFromMemory,
  124.             CreateDocumentInFile,
  125.             CreateDocumentInMemory,
  126.             CreateDocumentAsStationery,
  127.         GetDocument,
  128.             SaveDocument,
  129.             CloseDocument,
  130.             CloseWindow,
  131.             CreateDraft,
  132.             OpenDraft,
  133.             CloseDraft,
  134.             SaveDraft,
  135.             DeleteDraft,
  136.             GetLatestCreatedDraft,
  137.             GetDraft,
  138.             GetDraftList,
  139.             DeleteDraftList,
  140.             HasWriteAccess,
  141.         InternalizeHistory,
  142.             Revert,
  143.             SaveACopyAs,
  144.             #ifdef _PLATFORM_WIN32_
  145.                 SetOleWrapper,
  146.                 GetOleWrapper,
  147.             #endif
  148.             GetFileName,
  149.             SetFileName,
  150.             GetPartKindName,
  151.             SetPartKindName,
  152.                 reserved1,
  153.                 reserved2,
  154.                 reserved3,
  155.                 reserved4,
  156.                 reserved5,
  157.                 reserved6,
  158.                 reserved7,
  159.                 reserved8,
  160.                 reserved9,
  161.                 reserved10,
  162.                 reserved11,
  163.                 reserved12,
  164.                 reserved13,
  165.                 reserved14,
  166.                 reserved15,
  167.                 reserved16,
  168.                 reserved17,
  169.                 reserved18,
  170.                 reserved19,
  171.                 reserved20;
  172.  
  173.             passthru C_xh = "#include <PlfmFile.h>"
  174.                 "#ifndef _ODTYPES_"
  175.                 "#include \"ODTypes.h\""
  176.                 "#endif"
  177.                 "#ifndef _DRAFTREC_"
  178.                 "#include \"DraftRec.h\""
  179.                 "#endif"
  180.             #ifdef _PLATFORM_WIN32_
  181.                 "class OleWrapper;"
  182.             #endif
  183.                 "";
  184.  
  185.             #ifdef _PLATFORM_WIN32_
  186.             passthru C_xih = "class OleWrapper;"
  187.                  "";
  188.             #endif
  189.  
  190.   };
  191. #endif
  192. };
  193.  
  194.  
  195. #endif // _DOCMGRSHELL_
  196.