home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12osr1.exe / src / DocMgr.idl < prev    next >
Text File  |  1997-03-21  |  8KB  |  260 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. #ifdef __PRIVATE__
  113.     PlatformFile*    NewFileContainer(inout ODContainer container,
  114.                     in char* fileName);
  115.     void        NewMemoryContainer(inout ODContainer container);
  116.     void        CreateDocument(in ODContainer newContainer, 
  117.                     in ODType partKind);
  118.     void        OpenFile(in PlatformFile* file, 
  119.                     in ODUShort actionFlag);
  120.     void        OpenContainer(in ODContainer container);
  121.     char*        OpenRootPart();
  122.     PlatformFile*    CreateUntitledFile(in char* fileName);
  123.     void         RemoveChanges(in ODDraft draft);
  124.     void        SetSession(in ODSession session);
  125.     void        SetWindowState(in ODWindowState windowState);
  126.     void        SetDraftList(in DraftInfoRec* draftList);
  127.     ODBoolean        IsStationery(in ODDraft draft);
  128.     void        SetStationery(in ODDraft draft);
  129.     void        UnsetStationery(in ODDraft draft);
  130.     void        CreateWorkingDraft();
  131.     void        ResetDateModByInfo(in ODStorageUnit su);
  132.     ODContainer        GetContainer();
  133.     void        ContainerSaveACopyAs(in ODDraft draft, 
  134.                     in ODContainer newContainer);
  135.     PlatformFile*    CopyStationery();
  136.     ODBoolean            IsReadOnlyDocument(in PlatformFile *file);
  137. #endif
  138.  
  139. #ifdef __SOMIDL__
  140.     implementation
  141.     {
  142.         majorversion = 1; minorversion = 0;
  143.  
  144.         functionprefix = DocumentManager;
  145.  
  146.         releaseorder:
  147.             Initialize,
  148.             OpenDocumentFromFile,
  149.             OpenDocumentFromMemory,
  150.             CreateDocumentInFile,
  151.             CreateDocumentInMemory,
  152.             CreateDocumentAsStationery,
  153.         GetDocument,
  154.             SaveDocument,
  155.             CloseDocument,
  156.             CloseWindow,
  157.             CreateDraft,
  158.             OpenDraft,
  159.             CloseDraft,
  160.             SaveDraft,
  161.             DeleteDraft,
  162.             GetLatestCreatedDraft,
  163.             GetDraft,
  164.             GetDraftList,
  165.             DeleteDraftList,
  166.             HasWriteAccess,
  167.         InternalizeHistory,
  168.             Revert,
  169.             SaveACopyAs,
  170.             #ifdef _PLATFORM_WIN32_
  171.                 SetOleWrapper,
  172.                 GetOleWrapper,
  173.             #endif
  174.             GetFileName,
  175.             SetFileName,
  176.             GetPartKindName,
  177.             SetPartKindName,
  178.             #ifdef __PRIVATE__
  179.                 NewFileContainer,
  180.                 NewMemoryContainer,
  181.                 CreateDocument,
  182.                 OpenFile,
  183.                 OpenContainer,
  184.                 OpenRootPart,
  185.                 CreateUntitledFile,
  186.                 RemoveChanges,
  187.                 SetSession,
  188.                 SetWindowState,
  189.                 SetDraftList,
  190.                 IsStationery,
  191.                 SetStationery,
  192.                 UnsetStationery,
  193.                 CreateWorkingDraft,
  194.                 ResetDateModByInfo,
  195.         ContainerSaveACopyAs,
  196.                 GetContainer,
  197.                 CopyStationery,
  198.                 IsReadOnlyDocument;
  199.             #else
  200.                 reserved1,
  201.                 reserved2,
  202.                 reserved3,
  203.                 reserved4,
  204.                 reserved5,
  205.                 reserved6,
  206.                 reserved7,
  207.                 reserved8,
  208.                 reserved9,
  209.                 reserved10,
  210.                 reserved11,
  211.                 reserved12,
  212.                 reserved13,
  213.                 reserved14,
  214.                 reserved15,
  215.                 reserved16,
  216.                 reserved17,
  217.                 reserved18,
  218.                 reserved19,
  219.                 reserved20;
  220.             #endif
  221.  
  222.             passthru C_xh = "#include <PlfmFile.h>"
  223.                 "#ifndef _ODTYPES_"
  224.                 "#include \"ODTypes.h\""
  225.                 "#endif"
  226.                 "#ifndef _DRAFTREC_"
  227.                 "#include \"DraftRec.h\""
  228.                 "#endif"
  229.             #ifdef _PLATFORM_WIN32_
  230.                 "class OleWrapper;"
  231.             #endif
  232.                 "";
  233.  
  234.             #ifdef _PLATFORM_WIN32_
  235.             passthru C_xih = "class OleWrapper;"
  236.                  "";
  237.             #endif
  238.  
  239.         #ifdef __PRIVATE__
  240.             ODSession        fSession;
  241.             ODWindowState    fWindowState;
  242.             ODContainer        fContainer;
  243.             ODDocument        fDocument;
  244.             ODDraft        fDraft;
  245.             ODDraftPermissions    fDraftPermissions;
  246.         DraftInfoRec        *fDraftList;
  247.             #ifdef _PLATFORM_WIN32_
  248.               OleWrapper    *fOleWrapper;
  249.             #endif
  250.             char        fFileName[256];
  251.             char        fPartKindName[256];
  252.             ODBoolean           fUnsavedDocument;
  253.         #endif
  254.   };
  255. #endif
  256. };
  257.  
  258.  
  259. #endif // _DOCMGRSHELL_
  260.