1
0

storageHandler.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef NULLSOFT_ONLINEMEDIA_PLUGIN_STORAGE_HANDLER_HEADER
  2. #define NULLSOFT_ONLINEMEDIA_PLUGIN_STORAGE_HANDLER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_omstoragehandler.h"
  7. #include "./ifc_omstoragehelper.h"
  8. class ifc_omservice;
  9. class StorageHandler : public ifc_omstoragehandler
  10. {
  11. public:
  12. typedef enum
  13. {
  14. flagCopyKey = 0x00000001,
  15. } Flags;
  16. protected:
  17. StorageHandler(LPCWSTR pszKey, ifc_omstoragehelper::HandlerProc handlerProc, UINT flags);
  18. ~StorageHandler();
  19. public:
  20. static HRESULT CreateInstance(LPCWSTR pszKey, ifc_omstoragehelper::HandlerProc handlerProc, UINT flags, StorageHandler **instance);
  21. public:
  22. /* Dispatchable */
  23. size_t AddRef();
  24. size_t Release();
  25. int QueryInterface(GUID interface_guid, void **object);
  26. /* ifc_omstoragehandler */
  27. HRESULT GetKey(LPCWSTR *ppKey);
  28. void Invoke(ifc_omservice *service, LPCWSTR pszKey, LPCWSTR pszValue);
  29. protected:
  30. ULONG ref;
  31. LPWSTR key;
  32. ifc_omstoragehelper::HandlerProc handler;
  33. UINT flags;
  34. protected:
  35. RECVS_DISPATCH;
  36. };
  37. #endif //NULLSOFT_ONLINEMEDIA_PLUGIN_STORAGE_HANDLER_HEADER