// GPAX.idl : IDL source for GPAX.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (GPAX.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";
#include "olectl.h"
	

[
	uuid(E64FAC7F-0134-4A75-A7DA-80D53EBC56A6),
	version(1.0),
	helpstring("GPAX ActiveX Control")
]

library GPAXLib
{
	importlib("stdole2.tlb");

    // Forward declare all types defined in this typelib
    interface IGPAX;
    dispinterface IGPAXEvents;

    const int DISPID_SRC				= 100;
    const int DISPID_AutoStart			= 101;
	const int DISPID_DownloadProgress	= 102;


	//IDispatch interface
	[
		odl,
		uuid(E2A9A937-BB35-47E0-8942-964806299AB4),
		helpstring("GPAC ActiveX Control"),
		dual,
		hidden,
		oleautomation
	]
	interface IGPAX : IDispatch
	{
		/*functions*/
		[helpstring("Play Movie")] HRESULT Play();
		[helpstring("Pause/Resume Movie")] HRESULT Pause();
		[helpstring("Stop Movie")] HRESULT Stop();
		[helpstring("Update Scene")] HRESULT Update([in] BSTR mtype, [in] BSTR updates);
		[helpstring("Switch Quality")] HRESULT QualitySwitch ([in] int switch_up);
		[helpstring("Change URL")] HRESULT SetURL ([in] BSTR url);


		/*properties*/
        [id(DISPID_SRC), propget, helpstring("Get/Set the media source")]
        HRESULT src([out, retval] BSTR* url);
        [id(DISPID_SRC), propput, helpstring("Get/Set the media source")]
        HRESULT src([in] BSTR url);

        [id(DISPID_AutoStart), propget, helpstring("Get/Set automatic playback upon load")]
        HRESULT AutoStart([out, retval] VARIANT_BOOL* autoplay);
        [id(DISPID_AutoStart), propput, helpstring("Get/Set automatic playback upon load")]
        HRESULT AutoStart([in] VARIANT_BOOL autoplay);

		[id(DISPID_DownloadProgress), propget, helpstring("Get/Set download progress")]
        HRESULT DownloadProgress([out, retval] INT* downloadProgress);
        [id(DISPID_DownloadProgress), propput, helpstring("Get/Set download progress")]
        HRESULT DownloadProgress([in] INT downloadProgress);
	};


	//event interface
	[
		uuid(1FDA32FC-4C9A-461F-B33B-0715B0343006),
		helpstring("GPAX Control Events")
	]
	dispinterface IGPAXEvents
	{
		properties:
		methods:
	};


	//AX control
	[
		uuid(181D18E6-4DC1-4B55-B72E-BE2A10064995),
		helpstring("GPAC Control"),
		control
	]
	coclass GPAX
	{
		[default] interface IGPAX;
		[default, source] dispinterface IGPAXEvents;
	};
};
