#ifdef __PRIVATE__
//#
//#	File:		LinkSrcB.idl			** DO NOT REMERGE WITH APPLE CODE **
//#
//#	Contains:	Interface for Link Source base class
//#
//#	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 _LINKSRCB_
#define _LINKSRCB_

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

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

/*
  This class is used to represent the source 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  ODBaseLinkSource;

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

interface ODStorageUnit;
interface ODPart;
interface ODPartList;
interface ODLink;
interface ODDraft;
interface ODFacet;

//==============================================================================
// ODBaseLinkSource
//==============================================================================

interface ODBaseLinkSource :  ODPersistentObject
{
	ODBoolean Lock(in ODULong wait,
					out ODLinkKey key);
	
	void Unlock(in ODLinkKey key);
	
	void Clear(in ODChangeID id, in ODLinkKey key);
	
	ODStorageUnit GetContentStorageUnit(in ODLinkKey key);
	
	void ContentChanged(in ODChangeID id, in ODLinkKey key);
	
	void ShowSourceContent();
	
	ODBoolean ShowLinkSourceInfo(
					in ODFacet facet,
					in ODChangeID change,
					out ODLinkInfoResult infoResult);

	ODChangeID GetChangeID();

	ODTime GetChangeTime();

	ODLink GetLink();

	ODBoolean IsAutoUpdate();

	void SetAutoUpdate( in ODBoolean automatic );

	void SetSourcePart( in ODStorageUnit sourcePartSU );

	#ifdef __SOMIDL__
	implementation
	{
		releaseorder:
			Lock,
			Unlock,
			Clear,
			GetContentStorageUnit,
			ContentChanged,
			GetChangeID,
			SetAutoUpdate,
			IsAutoUpdate,
			GetLink,
			SetSourcePart,
			ShowSourceContent,
			GetChangeTime,
			ShowLinkSourceInfo;

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

#endif //# _LINKSRCB_
