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



[
	object,
	uuid(88736181-463B-425B-A60D-A392AB6BE476),
	dual, 
	nonextensible,
	helpstring("Primary interface for Strawberry Prolog"),
	pointer_default(unique)
]
interface IStrawberrySvr : IDispatch{
	[propget, id(1), helpstring("prolog program path")] HRESULT program([out, retval] BSTR* pVal);
	[propput, id(1), helpstring("prolog program path")] HRESULT program([in] BSTR newVal);

	[id(2), helpstring("compile the program")] HRESULT compile([out,retval] LONG* plResult);

	[propget, id(3), helpstring("the name of a predicate")] HRESULT predicate([out, retval] BSTR* pVal);
	[propput, id(3), helpstring("the name of a predicate")] HRESULT predicate([in] BSTR newVal);

	[propget, id(4), helpstring("the only argument of the predicate")] HRESULT arguments([out, retval] BSTR* pVal);
	[propput, id(4), helpstring("the only argument of the predicate")] HRESULT arguments([in] BSTR newVal);

	[id(5), helpstring("call the compiled program")] HRESULT call([out,retval] LONG* plResult);

	[propget, id(6), helpstring("result returned after call")] HRESULT result([out, retval] VARIANT* pVal);
	[propput, id(6), helpstring("result returned after call")] HRESULT result([in] VARIANT newVal);
	
	//GetTypeInfoCount - todo: plamen - do we need it
};//IStrawberrySvr



[ uuid(225AE543-A2CE-11D1-A58A-444553540000), version(2.92) ]
library Strawberry
{
	//importlib("stdole32.tlb");
	importlib("stdole2.tlb");


	[
		uuid(AC70B698-E5AC-4e78-A634-EEFEF1B7C56D),
		helpstring("Primary events interface for Strawberry Prolog")
	]
	dispinterface _IStrawberrySvrEvents
	{
		properties:
		methods:
		[id(1), helpstring("event")] HRESULT event(VARIANT Val1,VARIANT Val2,VARIANT Val3,[out, retval] VARIANT* pVal);
	};//_IStrawberrySvrEvents


	[
		uuid(ECD21404-C8F2-4202-BDFD-DBCBC7A5063C),
		helpstring("Primary Class for Strawberry Prolog")
	]
	coclass Server
	{
		[default] interface IStrawberrySvr;
		[default, source] dispinterface _IStrawberrySvrEvents;
	};//Server

};//library Strawberry
