1
0

serviceManager.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef NULLSOFT_WINAMP_OMSERVICE_MANAGER_HEADER
  2. #define NULLSOFT_WINAMP_OMSERVICE_MANAGER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_omservicemanager.h"
  7. #include <vector>
  8. class OmServiceManager : public ifc_omservicemanager
  9. {
  10. protected:
  11. OmServiceManager();
  12. ~OmServiceManager();
  13. public:
  14. static OmServiceManager *CreateInstance();
  15. public:
  16. /* Dispatchable */
  17. size_t AddRef();
  18. size_t Release();
  19. int QueryInterface(GUID interface_guid, void **object);
  20. /* ifc_omservice */
  21. HRESULT RegisterStorage(ifc_omstorage *storage);
  22. HRESULT UnregisterStorage(const GUID *storageId);
  23. HRESULT QueryStorage(const GUID *storageId, ifc_omstorage **storageOut);
  24. HRESULT EnumStorage(const GUID *filterType, UINT filterCapabilities, ifc_omstorageenumerator **enumOut);
  25. HRESULT CreateService(UINT serviceId, ifc_omservicehost *host, ifc_omservice **serviceOut);
  26. protected:
  27. HRESULT RegisterDefaultStorage();
  28. protected:
  29. RECVS_DISPATCH;
  30. protected:
  31. typedef std::vector<ifc_omstorage*> StorageList;
  32. protected:
  33. ULONG ref;
  34. BOOL registerStorage;
  35. StorageList storageList;
  36. };
  37. #endif //NULLSOFT_WINAMP_OMSERVICE_MANAGER_HEADER