api_wa5component.h 838 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __WASABI_API_WA5COMPONENT_H_
  2. #define __WASABI_API_WA5COMPONENT_H_
  3. #include <bfc/dispatch.h>
  4. class api_service;
  5. #ifdef WIN32
  6. #include <windows.h>
  7. #endif
  8. class NOVTABLE api_wa5component : public Dispatchable
  9. {
  10. public:
  11. DISPATCH_CODES
  12. {
  13. API_WA5COMPONENT_REGISTERSERVICES = 10,
  14. API_WA5COMPONENT_DEREEGISTERSERVICES = 20,
  15. };
  16. void RegisterServices(api_service *service);
  17. void DeregisterServices(api_service *service);
  18. #ifdef WIN32 // this is a kind of a hack (might be better to create a function that winamp calls to pass it)
  19. HMODULE hModule;
  20. #endif
  21. };
  22. inline void api_wa5component::RegisterServices(api_service *service)
  23. {
  24. _voidcall(API_WA5COMPONENT_REGISTERSERVICES, service);
  25. }
  26. inline void api_wa5component::DeregisterServices(api_service *service)
  27. {
  28. _voidcall(API_WA5COMPONENT_DEREEGISTERSERVICES, service);
  29. }
  30. #endif