//
// CVS_Coworker.idl : IDL source for CVS_Coworker
//
// This file will be processed by the MIDL tool to
// produce the type library (CVS_Coworker.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

typedef
[
	uuid(10E5359F-F454-11D2-B442-0080C6F9179D),
	helpstring("CVS compare option"),
]
enum CvsOption {
	// IsFileDifferent() options
	[helpstring("Compare contents")]		cvsOptionCompareContents	= 1,
	[helpstring("Compare checksum")]		cvsOptionCompareChecksum	= 2,
	[helpstring("Compare timestamp")]		cvsOptionCompareTimestamp	= 3
} CvsOption;

typedef
[
	uuid(10E5359E-F454-11D2-B442-0080C6F9179D),
	helpstring("CVS commands"),
]
enum CvsCommand {
	// HasAdvancedOptionsForCommand() options
	[helpstring("Command update")]			cvsCommandUpdate		= 0,
	[helpstring("Command checkout")]		cvsCommandCheckout		= 1,
	[helpstring("Command checkin")]			cvsCommandCheckin		= 2,
	[helpstring("Command uncheckout")]		cvsCommandUncheckout		= 3,
	[helpstring("Command add")]			cvsCommandAdd			= 4,
	[helpstring("Command remove")]			cvsCommandRemove		= 5,
	[helpstring("Command diff")]			cvsCommandDiff			= 6,
	[helpstring("Command history")]			cvsCommandHistory		= 7,
	[helpstring("Command rename")]			cvsCommandRename		= 8,
	[helpstring("Command properties")]		cvsCommandProperties		= 9,
	[helpstring("Command options")]			cvsCommandOptions		= 10
} CvsCommand;

[
	object,
	uuid(10E5359C-F454-11D2-B442-0080C6F9179D),
	oleautomation,
	helpstring("ICvsCoworker Interface"),
	pointer_default(unique)
]
interface ICvsCoworker : IUnknown
{
	[helpstring("method GetLastError")]
	HRESULT GetLastError(
		[in] int handle,
		[out] int* piError
		);
	[helpstring("method GetErrorMessage")]
	HRESULT GetErrorMessage(
		[in] int handle,
		[in] int iError,
		[in] int cbErrorBuffer,
		[out, string, size_is(cbErrorBuffer)] char* sErrorBuffer
		);
	[helpstring("method OpenProject")]
	HRESULT OpenProject(
		[out] int* pHandle,
		[in, string] const char* sUsername,
		[in, string] const char* sProjectName,
		[in, string] const char* sProjectHome
		);
	[helpstring("method GetProject")]
	HRESULT GetProject(
		[out] int* pHandle,
		[in] const char* sUsername,
		[in] int cbProjectNameBuffer,
		[in, out, string, size_is(cbProjectNameBuffer)] char* sProjectName,
		[in] int cbProjectHomeBuffer,
		[in, out, string, size_is(cbProjectHomeBuffer)] char* sProjectHome,
		[in] BOOL bAllowPathChange,
		[in] BOOL bAllowNewProject,
		[out] BOOL* pbNewProject
		);
	[helpstring("method UpdateFiles")]
	HRESULT UpdateFiles(
		[in] int handle,
		[in, string] const char* sFilenames,
		[in] BOOL bDirectories,
		[in] BOOL bRecurse
		);
	[helpstring("method CheckoutFiles")]
	HRESULT CheckoutFiles(
		[in] int handle,
		[in, string] const char* sFilenames
		);
	[helpstring("method CheckinFiles")]
	HRESULT CheckinFiles(
		[in] int handle,
		[in, string] const char* sFilenames,
		[in] BOOL bKeepCheckedOut
		);
	[helpstring("method UncheckoutFiles")]
	HRESULT UncheckoutFiles(
		[in] int handle,
		[in, string] const char* sFilenames
		);
	[helpstring("method AddFiles")]
	HRESULT AddFiles(
		[in] int handle,
		[in, string] const char* sOptionsAndFilenames,
		[in, string] const char* sComment
		);
	[helpstring("method RemoveFiles")]
	HRESULT RemoveFiles(
		[in] int handle,
		[in, string] const char* sFilenames
		);
	[helpstring("method RenameFile")]
	HRESULT RenameFile(
		[in] int handle,
		[in, string] const char* sOldFilename,
		[in, string] const char* sNewFilename
		);
	[helpstring("method DiffFile")]
	HRESULT DiffFile(
		[in] int handle,
		[in, string] const char* sFilename,
		[in] BOOL bIgnoreCase,
		[in] BOOL bIgnoreBlanks
		);
	[helpstring("method ShowFileHistory")]
	HRESULT ShowFileHistory(
		[in] int handle,
		[in, string] const char* sFilenames
		);
	[helpstring("method ShowFileProperties")]
	HRESULT ShowFileProperties(
		[in] int handle,
		[in, string] const char* sFilename
		);
	[helpstring("method ShowUserInterface")]
	HRESULT ShowUserInterface(
		[in] int handle,
		[in, string] const char* sFilenames
		);
	[helpstring("method HasAdvancedOptionsForCommand")]
	HRESULT HasAdvancedOptionsForCommand(
		[in] int handle,
		[in] CvsCommand command,
		[out, retval] BOOL* pbAdvancedOptions
		);
	[helpstring("method ShowAdvancedOptionsForCommand")]
	HRESULT ShowAdvancedOptionsForCommand(
		[in] int handle,
		[in] CvsCommand command
		);
	[helpstring("method GetFileChanges")]
	HRESULT GetFileChanges(
		[in] int handle,
		[in] int cbFilenameBuffer,
		[out, string, size_is(cbFilenameBuffer)] char* sFilenameBuffer);
	[helpstring("method GetFilesToAdd")]
	HRESULT GetFilesToAdd(
		[in] int handle,
		[in] int cbFilenamesBuffer,
		[out, string, size_is(cbFilenamesBuffer)] char* sFilenamesBuffer
		);
	[helpstring("method CloseProject")]
	HRESULT CloseProject([in] int handle);
};

[
	uuid(10E53590-F454-11D2-B442-0080C6F9179D),
	version(1.0),
	helpstring("CVS_Coworker 1.0 Type Library")
]
library CVS_COWORKERLib
{
	importlib("stdole32.tlb");
	importlib("stdole2.tlb");

	[
		uuid(10E5359D-F454-11D2-B442-0080C6F9179D),
		helpstring("CvsCoworker Class")
	]
	coclass CvsCoworker
	{
		[default] interface ICvsCoworker;
	};
};
