diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/omBrowser/ifc_omstorageasync.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/omBrowser/ifc_omstorageasync.h')
-rw-r--r-- | Src/omBrowser/ifc_omstorageasync.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Src/omBrowser/ifc_omstorageasync.h b/Src/omBrowser/ifc_omstorageasync.h new file mode 100644 index 00000000..9246294a --- /dev/null +++ b/Src/omBrowser/ifc_omstorageasync.h @@ -0,0 +1,62 @@ +#ifndef NULLSOFT_WINAMP_OMSTORAGE_ASYNC_INTERFACE_HEADER +#define NULLSOFT_WINAMP_OMSTORAGE_ASYNC_INTERFACE_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include <bfc/dispatch.h> + +// {5D6C5C55-E744-4936-A31D-B9D8C0F4EF86} +static const GUID IFC_OmStorageAsync = +{ 0x5d6c5c55, 0xe744, 0x4936, { 0xa3, 0x1d, 0xb9, 0xd8, 0xc0, 0xf4, 0xef, 0x86 } }; + +class __declspec(novtable) ifc_omstorageasync : public Dispatchable +{ +public: + typedef void (CALLBACK *AsyncCallback)(ifc_omstorageasync *result); + + typedef enum + { + stateReady = 0, + stateInitializing = 1, + stateConnecting = 2, + stateReceiving = 3, + stateCompleted = 4, + stateAborting = 5, + } States; + +protected: + ifc_omstorageasync() {} + ~ifc_omstorageasync() {} + +public: + HRESULT GetState(unsigned int *state); + HRESULT GetWaitHandle(HANDLE *handle); + HRESULT GetData(void **data); + +public: + DISPATCH_CODES + { + API_GETSTATE = 10, + API_GETWAITHANDLE = 20, + API_GETDATA = 30, + }; +}; + +inline HRESULT ifc_omstorageasync::GetWaitHandle(HANDLE *handle) +{ + return _call(API_GETWAITHANDLE, (HRESULT)E_NOTIMPL, handle); +} + +inline HRESULT ifc_omstorageasync::GetData(void **data) +{ + return _call(API_GETDATA, (HRESULT)E_NOTIMPL, data); +} + +inline HRESULT ifc_omstorageasync::GetState(unsigned int *state) +{ + return _call(API_GETSTATE, (HRESULT)E_NOTIMPL, state); +} + +#endif //NULLSOFT_WINAMP_OMSTORAGE_ASYNC_INTERFACE_HEADER
\ No newline at end of file |