1
0

ifc_wa5component.h 946 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __WASABI_IFC_WA5COMPONENT_H_
  2. #define __WASABI_IFC_WA5COMPONENT_H_
  3. #include <bfc/dispatch.h>
  4. class api_service;
  5. #ifdef WIN32
  6. #include <windows.h>
  7. #endif
  8. class NOVTABLE ifc_wa5component : public Dispatchable
  9. {
  10. public:
  11. DISPATCH_CODES
  12. {
  13. API_WA5COMPONENT_REGISTERSERVICES = 10,
  14. API_WA5COMPONENT_REGISTERSERVICES_SAFE_MODE = 15,
  15. API_WA5COMPONENT_DEREEGISTERSERVICES = 20,
  16. };
  17. void RegisterServices( api_service *service );
  18. void DeregisterServices( api_service *service );
  19. #ifdef WIN32
  20. HMODULE hModule;
  21. #else
  22. void *dlLibrary; // pointer returned from dlopen
  23. #endif
  24. };
  25. inline void ifc_wa5component::RegisterServices( api_service *service )
  26. {
  27. _voidcall( API_WA5COMPONENT_REGISTERSERVICES, service );
  28. }
  29. inline void ifc_wa5component::DeregisterServices( api_service *service )
  30. {
  31. _voidcall( API_WA5COMPONENT_DEREEGISTERSERVICES, service );
  32. }
  33. extern "C" typedef ifc_wa5component *(*GETCOMPONENT_FUNC)();
  34. #endif