/* @(#)Z 1.4 com/src/storage/idl/Document.idl, odstorage, od96nt, odnt9712d 97/03/21 16:48:46 (96/10/29 09:32:18) */


#ifndef _DOCUMENT_
#define _DOCUMENT_

#ifndef _REFCTOBJ_
#include "RefCtObj.idl"
#endif

//==============================================================================
// Classes defined in this interface
//==============================================================================
interface   ODDocument;

//==============================================================================
// Classes used by this interface
//==============================================================================
interface   ODContainer;
interface	ODDraft;
interface	ODStorageUnit;

//==============================================================================
// ODDocument
//==============================================================================

interface ODDocument :  ODRefCntObject 
{
	ODContainer  GetContainer();

	ODDocumentID GetID();

	ODDocumentName GetName();

	void SetName(in ODDocumentName name);

	ODDocument CollapseDrafts(in ODDraft from,
								in ODDraft to);

	ODDraft  AcquireDraft(in ODDraftPermissions perms, 
						in	ODDraftID id,
						in	ODDraft draft, 
						in	ODPositionCode posCode, 
						in	ODBoolean release);

	ODBoolean  Exists(in ODDraftID id,
						in	ODDraft draft, 
						in	ODPositionCode posCode);

	ODDraft  AcquireBaseDraft( in ODDraftPermissions perms);

	ODDraft  CreateDraft(in ODDraft below,
						in ODBoolean releaseBelow);

	void SaveToAPrevDraft(in ODDraft from,
						in ODDraft to);

	void SetBaseDraftFromForeignDraft(in ODDraft draft);


#ifdef __SOMIDL__
  implementation
  {
	majorversion = 1; minorversion = 0;
  	functionprefix = ODDocument;
    override:
		somUninit,
		Acquire,
        Release;
    releaseorder:
        GetContainer,
        GetID,
        GetName,
        SetName,
        CollapseDrafts,
        AcquireDraft,
		Exists,
		AcquireBaseDraft,
        CreateDraft,
        SaveToAPrevDraft,
        SetBaseDraftFromForeignDraft,
		reserved1,
		reserved2;
  };
#endif
};

#endif  // _DOCUMENT_

