/* @(#)Z 1.5 com/src/storage/idl/Draft.idl, odstorage, od96nt, odnt9712d 97/03/21 16:48:47 (96/10/28 13:40:39) */


#ifndef _DRAFT_
#define _DRAFT_

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

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

//==============================================================================
// Classes used by this interface
//==============================================================================
interface   ODCanvas;
interface   ODDocument;
interface   ODFrame;
interface   ODLink;
interface   ODLinkSource;
interface   ODLinkIterator;
interface   ODLinkSourceIterator;
interface   ODLinkSpec;
interface   ODPart;
interface   ODShape;
interface   ODStorageUnit;
interface	ODPersistentObject;
interface	ODPartWrapper;

//==============================================================================
// ODDraft
//==============================================================================

interface ODDraft :  ODRefCntObject
{

	ODDocument   GetDocument();

	ODDraftID    GetID();

	ODStorageUnit   AcquireDraftProperties();

	ODDraftPermissions  GetPermissions();

	ODStorageUnit   CreateStorageUnit();

	ODStorageUnit   AcquireStorageUnit(in ODStorageUnitID id);

	void      RemoveStorageUnit(in ODStorageUnit storageUnit);

	ODBoolean    IsValidID(in ODID id);

	ODDraftKey    BeginClone(in ODDraft destDraft, in ODFrame destFrame, in ODCloneKind kind);

	void      EndClone(in ODDraftKey key);

	void      AbortClone(in ODDraftKey key);

	ODID Clone(in ODDraftKey key, in ODID fromObjectID, in ODID toObjectID, in ODID scope);

	ODID WeakClone(in ODDraftKey key, in ODID objectID, in ODID toObjectID, in ODID scope);

	ODBoolean    ChangedFromPrev();

	void      SetChangedFromPrev();

	void      RemoveFromDocument();

	ODDraft     RemoveChanges();

	ODDraft     Externalize();

	ODDraft     SaveToAPrevious(in ODDraft to);

	ODFrame CreateFrame(
			in ODObjectType	frameType,
			in ODFrame		containingFrame,
			in ODShape		frameShape,
			in ODCanvas		biasCanvas,
			in ODPart		part,
			in ODTypeToken	viewType,
			in ODTypeToken	presentation,
			in ODBoolean	isSubframe,
			in ODBoolean	isOverlaid);

	ODFrame AcquireFrame(in ODStorageUnitID id);

	void RemoveFrame(in ODFrame frame);

	ODPart CreatePart(in ODType partType,
						in ODEditor optionalEditor);

	ODPart AcquirePart(in ODStorageUnitID id);

	void ReleasePart(in ODPart part);

	void RemovePart(in ODPart part);

	ODLinkSpec CreateLinkSpec (in ODPart part, in ODByteArray data);

	ODLinkSource CreateLinkSource(in ODPart part);

	ODLinkSource AcquireLinkSource(in ODStorageUnitID id);

	ODLink AcquireLink(in ODStorageUnitID id,
					in ODLinkSpec linkSpec);

	void        RemoveLink(in ODLink link);

	void        RemoveLinkSource(in ODLinkSource link);

	ODPersistentObjectID	GetPersistentObjectID(in ODPersistentObject object,
									in ODObjectType objectType);

	ODPersistentObject AcquirePersistentObject(in ODPersistentObjectID objectID,
											out ODObjectType objectType);


#ifdef __SOMIDL__
  implementation
  {
	majorversion = 1; minorversion = 0;
  	functionprefix = ODDraft;

    override:
		somUninit,
        Acquire,
        Release;
    releaseorder:
        GetDocument,
        GetID,
        GetName,
        SetName,
        AcquireDraftProperties,
        GetPermissions,
        CreateStorageUnit,
        AcquireStorageUnit,
        RemoveStorageUnit,
        BeginClone,
        EndClone,
        AbortClone,
        Clone,
		WeakClone,
        ChangedFromPrev,
        SetChangedFromPrev,
        RemoveFromDocument,
        RemoveChanges,
        Externalize,
        SaveToAPrevious,
        CreateFrame,
        AcquireFrame,
        RemoveFrame,
        CreatePart,
        AcquirePart,
        RemovePart,
        CreateLinkSpec,
        CreateLinkSource,
        AcquireLinkSource,
        AcquireLink,
        RemoveLink,
        RemoveLinkSource,
        GetPersistentObjectID,
        AcquirePersistentObject,
        ReleasePart,
		IsValidID,
		reserved1,
		reserved2,
		reserved3,
		reserved4,
		reserved5,
		reserved6,
		reserved7,
		reserved8,
		reserved9,
		reserved10,
#ifdef _PLATFORM_OS2_
    reserved11,
    reserved12,
    reserved13;
#else
    reserved11;
#endif
};
#endif
};

#endif  // _DRAFT_
