1
0

ifc_omservicemanager.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef NULLSOFT_WINAMP_OMSERVICE_MANAGER_INTERFACE_HEADER
  2. #define NULLSOFT_WINAMP_OMSERVICE_MANAGER_INTERFACE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <bfc/dispatch.h>
  7. // {BB0A9154-6D31-413b-96FB-9466E535E0C4}
  8. static const GUID IFC_OmServiceManager =
  9. { 0xbb0a9154, 0x6d31, 0x413b, { 0x96, 0xfb, 0x94, 0x66, 0xe5, 0x35, 0xe0, 0xc4 } };
  10. class ifc_omservice;
  11. class ifc_omstorage;
  12. class ifc_omstorageenumerator;
  13. class ifc_omservicehost;
  14. class ifc_omserviceeventmngr;
  15. class __declspec(novtable) ifc_omservicemanager : public Dispatchable
  16. {
  17. protected:
  18. ifc_omservicemanager() {}
  19. ~ifc_omservicemanager() {}
  20. public:
  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(unsigned int serviceId, ifc_omservicehost *host, ifc_omservice **serviceOut);
  26. public:
  27. DISPATCH_CODES
  28. {
  29. API_REGISTERSTORAGE = 10,
  30. API_UNREGISTERSTORAGE = 20,
  31. API_QUERYSTORAGE = 30,
  32. API_ENUMSTORAGE = 40,
  33. API_CREATESERVICE = 100,
  34. };
  35. };
  36. inline HRESULT ifc_omservicemanager::RegisterStorage(ifc_omstorage *storage)
  37. {
  38. return _call(API_REGISTERSTORAGE, (HRESULT)E_NOTIMPL, storage);
  39. }
  40. inline HRESULT ifc_omservicemanager::UnregisterStorage(const GUID *storageId)
  41. {
  42. return _call(API_UNREGISTERSTORAGE, (HRESULT)E_NOTIMPL, storageId);
  43. }
  44. inline HRESULT ifc_omservicemanager::QueryStorage(const GUID *storageId, ifc_omstorage **storageOut)
  45. {
  46. return _call(API_QUERYSTORAGE, (HRESULT)E_NOTIMPL, storageId, storageOut);
  47. }
  48. inline HRESULT ifc_omservicemanager::EnumStorage(const GUID *filterType, UINT filterCapabilities, ifc_omstorageenumerator **enumOut)
  49. {
  50. return _call(API_ENUMSTORAGE, (HRESULT)E_NOTIMPL, filterType, filterCapabilities, enumOut);
  51. }
  52. inline HRESULT ifc_omservicemanager::CreateService(UINT serviceId, ifc_omservicehost *host, ifc_omservice **serviceOut)
  53. {
  54. return _call(API_CREATESERVICE, (HRESULT)E_NOTIMPL, serviceId, host, serviceOut);
  55. }
  56. #endif //NULLSOFT_WINAMP_OMSERVICE_MANAGER_INTERFACE_HEADER