#ifdef __PRIVATE__
//#
//#	File:		LinkB.idl				** DO NOT REMERGE WITH APPLE CODE **
//#
//#	Contains:	Base Link Interface
//#
//#	Written by:	Craig Carper
//#	Ported by:	Chris Andrew
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#	          	c 1995 by Novell, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#	          	c 1995 by Novell, Inc., all rights reserved.
#endif

#ifndef _LINKB_
#define _LINKB_

#ifndef _PSTOBJ_
#include "PstObj.idl"
#endif

//==============================================================================
// Theory of Operation
//==============================================================================

/*
  This class is used to represent the destination side of OpenDoc links.
  ODDrafts create and own these links. The source ODPart will ask the draft
  to create an ODLinkSource and an ODLink pair, and return the ODLink
  object to the the destination part.  The destination part uses the ODLink
  object to extract the contents of the link.
*/

//==============================================================================
// Classes defined in this interface
//==============================================================================

interface  ODBaseLink;

//==============================================================================
// Classes used by this interface
//==============================================================================

interface	ODLinkSource;
interface	ODStorageUnit;
interface	ODPart;
interface	ODPartList;
interface	ODDraft;
interface	ODFacet;

//==============================================================================
// ODLink
//==============================================================================

interface ODBaseLink :  ODPersistentObject
{
	ODBoolean Lock(in ODULong wait, out ODLinkKey key);
					
	void Unlock(in ODLinkKey key);
	
	ODStorageUnit GetContentStorageUnit(in ODLinkKey key);
	
	void RegisterDependent(in ODPart clientPart, in ODChangeID id);
							
	void UnregisterDependent(in ODPart clientPart);
	
	ODChangeID GetChangeID();
	
	ODTime GetChangeTime();
	
	ODError GetStatus();
	
	void ShowSourceContent();
	
	ODBoolean ShowLinkDestinationInfo(
					in ODFacet facet,
					in ODLinkInfo info,
					out ODLinkInfoResult infoResult);

	ODLinkSource GetLinkSource();
	
	#ifdef __SOMIDL__
	implementation
	{
		releaseorder:
			Lock,
			Unlock,
			GetContentStorageUnit,
			RegisterDependent,
			UnregisterDependent,
			GetChangeID,
			GetChangeTime,
			GetStatus,
			ShowSourceContent,
			ShowLinkDestinationInfo,
			GetLinkSource;

		majorversion = 1; minorversion = 0;
	};
	
#endif //# __SOMIDL__
};

#endif //# _LINKB_
