1
0

utility.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef NULLSOFT_WINAMP_OMUTILITY_HEADER
  2. #define NULLSOFT_WINAMP_OMUTILITY_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_omutility.h"
  7. class CacheManager;
  8. class MlNavigationHelper;
  9. class GraphicsObject;
  10. class StorageHelper;
  11. class OmUtility : public ifc_omutility
  12. {
  13. protected:
  14. OmUtility();
  15. ~OmUtility();
  16. public:
  17. static OmUtility *CreateInstance();
  18. public:
  19. /* Dispatchable */
  20. size_t AddRef();
  21. size_t Release();
  22. int QueryInterface(GUID interface_guid, void **object);
  23. /* ifc_omutility */
  24. HRESULT EnsurePathExist(LPCWSTR pszDirectory);
  25. HRESULT MakeResourcePath(LPWSTR pszBuffer, UINT cchBufferMax, HINSTANCE hInstance, LPCWSTR pszType, LPCWSTR pszName, UINT uFlags);
  26. HRESULT GetCacheManager(ifc_omcachemanager **cacheManager);
  27. HRESULT GetMlNavigationHelper(HWND hLibrary, ifc_mlnavigationhelper **helper);
  28. HRESULT QueryImageLoader(HINSTANCE hInstance, LPCWSTR pszName, BOOL fPremultiply, ifc_omimageloader **imageLoader);
  29. HRESULT GetGraphics(ifc_omgraphics **graphics);
  30. HRESULT PostMainThreadCallback(ThreadCallback callback, ULONG_PTR param);
  31. HRESULT PostMainThreadCallback2(ThreadCallback2 callback, Dispatchable *object, ULONG_PTR param1, ULONG_PTR param2);
  32. HRESULT GetStorageHelper(ifc_omstoragehelper **helper);
  33. protected:
  34. RECVS_DISPATCH;
  35. protected:
  36. ULONG ref;
  37. CacheManager *cacheManager;
  38. MlNavigationHelper *navigationHelper;
  39. GraphicsObject *graphicsObject;
  40. StorageHelper *storageHelper;
  41. HWND hListener;
  42. };
  43. #endif //NULLSOFT_WINAMP_OMUTILITY_HEADER