aboutsummaryrefslogtreecommitdiff
path: root/Src/Agave/Component/ifc_wa5component.h
blob: fb0a1b548536fd2e84e7b1976d7b4b3330442701 (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
#ifndef __WASABI_IFC_WA5COMPONENT_H_
#define __WASABI_IFC_WA5COMPONENT_H_

#include <bfc/dispatch.h>

class api_service;
#ifdef WIN32
#include <windows.h>
#endif

class NOVTABLE ifc_wa5component : public Dispatchable
{
public:
	DISPATCH_CODES
	{
		API_WA5COMPONENT_REGISTERSERVICES           = 10,
		API_WA5COMPONENT_REGISTERSERVICES_SAFE_MODE = 15,
		API_WA5COMPONENT_DEREEGISTERSERVICES        = 20,
	};

	void RegisterServices( api_service *service );
	void DeregisterServices( api_service *service );

#ifdef WIN32 
	HMODULE hModule;
#else
	void *dlLibrary; // pointer returned from dlopen
#endif
};

inline void ifc_wa5component::RegisterServices( api_service *service )
{
	_voidcall( API_WA5COMPONENT_REGISTERSERVICES, service );
}

inline void ifc_wa5component::DeregisterServices( api_service *service )
{
	_voidcall( API_WA5COMPONENT_DEREEGISTERSERVICES, service );
}

extern "C" typedef ifc_wa5component *(*GETCOMPONENT_FUNC)();

#endif