aboutsummaryrefslogtreecommitdiff
path: root/Src/playlist/ScriptObjectFactory.cpp
blob: 5e947b6895c3d250d599a3520832ee0f6944b582 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include "ScriptObjectFactory.h"
#include "api__playlist.h"
#include "ScriptObjectService.h"

ScriptObjectService svc;
static const char serviceName[] = "Playlist Maki Objects";

// {2406A46C-9740-4af7-A0EB-A544AAB8F00C}
static const GUID playlist_script_object_guid = 
{ 0x2406a46c, 0x9740, 0x4af7, { 0xa0, 0xeb, 0xa5, 0x44, 0xaa, 0xb8, 0xf0, 0xc } };


FOURCC ScriptObjectFactory::GetServiceType()
{
	return svc.getServiceType();
}

const char *ScriptObjectFactory::GetServiceName()
{
	return serviceName;
}

GUID ScriptObjectFactory::GetGUID()
{
	return playlist_script_object_guid;
}

void *ScriptObjectFactory::GetInterface(int global_lock)
{
//	if (global_lock)
//		WASABI_API_SVC->service_lock(this, (void *)ifc);
	return &svc;
}

int ScriptObjectFactory::SupportNonLockingInterface()
{
	return 1;
}

int ScriptObjectFactory::ReleaseInterface(void *ifc)
{
	//WASABI_API_SVC->service_unlock(ifc);
	return 1;
}

const char *ScriptObjectFactory::GetTestString()
{
	return 0;
}

int ScriptObjectFactory::ServiceNotify(int msg, int param1, int param2)
{
	return 1;
}

#define CBCLASS ScriptObjectFactory
START_DISPATCH;
CB(WASERVICEFACTORY_GETSERVICETYPE, GetServiceType)
CB(WASERVICEFACTORY_GETSERVICENAME, GetServiceName)
CB(WASERVICEFACTORY_GETGUID, GetGUID)
CB(WASERVICEFACTORY_GETINTERFACE, GetInterface)
CB(WASERVICEFACTORY_SUPPORTNONLOCKINGGETINTERFACE, SupportNonLockingInterface) 
CB(WASERVICEFACTORY_RELEASEINTERFACE, ReleaseInterface)
CB(WASERVICEFACTORY_GETTESTSTRING, GetTestString)
CB(WASERVICEFACTORY_SERVICENOTIFY, ServiceNotify)
END_DISPATCH;
#undef CBCLASS