#ifdef __PRIVATE__
//#
//#	File:		Document.idl
//#
//#	Contains:	Class definition for ODDocument
//#
//#	Written by:	Vincent Lo
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <5>	  9/6/94	VL		1184154: Removed Document Properties.
//#		 <4>	 7/11/94	VL		Added Exists.
//#		 <3>	  7/5/94	VL		Fixed in/out.
//#		 <2>	 6/21/94	VL		Added functionprefix.
//#		 <1>	  6/8/94	VL		first checked in
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#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  GetDraft(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  GetBaseDraft( in ODDraftPermissions perms);
	
	ODDraft  CreateDraft(in ODDraft below,
						in ODBoolean releaseBelow);
	  
	void SaveToAPrevDraft(in ODDraft from,
						in ODDraft to);
	
	void SetBaseDraftFromForeignDraft(in ODDraft draft);
  
// private by convention

	void InitDocument(in ODContainer container,
						in  ODDocumentID id);

	ODDocument ReleaseDraft( in ODDraft draft);

#ifdef __PRIVATE__
	void* GetUserData ();
	void  SetUserData (in void *userData);
#endif
	
#ifdef __SOMIDL__
  implementation
  {
  	functionprefix = ODDocument;
    override:
		somInit,
		somUninit,
		IncrementRefCount,
        Release;
    releaseorder:
        GetContainer,
        GetID,
        GetName,
        SetName,
        CollapseDrafts,
        GetDraft,
		Exists,
		GetBaseDraft,
        CreateDraft,
        SaveToAPrevDraft,
        SetBaseDraftFromForeignDraft,
        InitDocument,
        ReleaseDraft,
#ifdef __PRIVATE__
		GetUserData,
		SetUserData;
#else
		reserved1,
		reserved2;
#endif

#ifdef __PRIVATE__
		void*	fUserData;
#endif


  };
#endif
};

#endif  // _DOCUMENT_

