diff options
Diffstat (limited to 'Src/omBrowser/ifc_omstoragehelper.h')
-rw-r--r-- | Src/omBrowser/ifc_omstoragehelper.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/Src/omBrowser/ifc_omstoragehelper.h b/Src/omBrowser/ifc_omstoragehelper.h new file mode 100644 index 00000000..06a839ed --- /dev/null +++ b/Src/omBrowser/ifc_omstoragehelper.h @@ -0,0 +1,55 @@ +#ifndef NULLSOFT_WINAMP_OMSTORAGE_HELPER_INTERFACE_HEADER +#define NULLSOFT_WINAMP_OMSTORAGE_HELPER_INTERFACE_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include <bfc/dispatch.h> + +// {47243D54-37F3-4493-8643-BE75205E6CBF} +static const GUID IFC_OmStorageHelper = +{ 0x47243d54, 0x37f3, 0x4493, { 0x86, 0x43, 0xbe, 0x75, 0x20, 0x5e, 0x6c, 0xbf } }; + +class ifc_omservice; +class ifc_omstoragehandler; +class ifc_omstoragehandlerenum; + +class __declspec(novtable) ifc_omstoragehelper : public Dispatchable +{ +public: + typedef void (CALLBACK *HandlerProc)(ifc_omservice * /*service*/, const wchar_t * /*pszKey*/, const wchar_t * /*pszValue*/); + + typedef struct __TemplateRecord + { + LPCWSTR key; + HandlerProc handler; + } TemplateRecord; + +protected: + ifc_omstoragehelper() {} + ~ifc_omstoragehelper() {} + +public: + HRESULT CreateHandler(const wchar_t *key, HandlerProc proc, ifc_omstoragehandler **handler); + HRESULT CreateEnumerator(const TemplateRecord *recordList, size_t recordCount, ifc_omstoragehandlerenum **enumerator); + +public: + DISPATCH_CODES + { + API_CREATEHANDLER = 10, + API_CREATEENUMERATOR = 20, + }; +}; + +inline HRESULT ifc_omstoragehelper::CreateHandler(const wchar_t *key, HandlerProc proc, ifc_omstoragehandler **handler) +{ + return _call(API_CREATEHANDLER, (HRESULT)E_NOTIMPL, key, proc, handler); +} + +inline HRESULT ifc_omstoragehelper::CreateEnumerator(const TemplateRecord *recordList, size_t recordCount, ifc_omstoragehandlerenum **enumerator) +{ + return _call(API_CREATEENUMERATOR, (HRESULT)E_NOTIMPL, recordList, recordCount, enumerator); +} + +#endif //NULLSOFT_WINAMP_OMSTORAGE_HELPER_INTERFACE_HEADER
\ No newline at end of file |