wasabiHelper.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #ifndef NULLSOFT_WINAMP_WASABI_HELPER_HEADER
  2. #define NULLSOFT_WINAMP_WASABI_HELPER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_wasabihelper.h"
  7. class WasabiHelper : public ifc_wasabihelper
  8. {
  9. protected:
  10. WasabiHelper(api_service *serviceManager);
  11. ~WasabiHelper();
  12. public:
  13. static HRESULT CreateInstance(api_service *serviceManager, WasabiHelper **instance);
  14. public:
  15. /* Dispatchable */
  16. size_t AddRef();
  17. size_t Release();
  18. int QueryInterface(GUID interface_guid, void **object);
  19. /* ifc_wasabihelper */
  20. HRESULT QueryWasabiInterface(const GUID *iid, void **ppi);
  21. HRESULT ReleaseWasabiInterface(const GUID *iid, void *pi);
  22. HRESULT GetServiceManager(api_service **serviceManager);
  23. HRESULT GetApplicationApi(api_application **application);
  24. HRESULT GetConfigApi(api_config ** config);
  25. HRESULT GetMemoryManager(api_memmgr **memoryManager);
  26. HRESULT GetPngLoader(svc_imageLoader **loader);
  27. HRESULT GetLanguageManager(api_language **languageManager);
  28. HRESULT GetLanguageModule(HINSTANCE *module);
  29. HRESULT GetSecurityApi(JSAPI2::api_security **security);
  30. HRESULT GetThreadpoolApi(api_threadpool **threadpool);
  31. protected:
  32. HRESULT InitLanguageSupport();
  33. protected:
  34. RECVS_DISPATCH;
  35. protected:
  36. ULONG ref;
  37. api_service *serviceManager;
  38. api_application *applicationApi;
  39. api_config *configApi;
  40. api_memmgr *memoryApi;
  41. svc_imageLoader *pngLoader;
  42. api_language *languageManager;
  43. JSAPI2::api_security *securityApi;
  44. api_threadpool *threadpoolApi;
  45. HINSTANCE languageModule;
  46. };
  47. #endif //NULLSOFT_WINAMP_WASABI_HELPER_HEADER