1
0

storageHandlerEnum.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef NULLSOFT_ONLINEMEDIA_PLUGIN_STORAGE_HANDLER_ENUMERATOR_HEADER
  2. #define NULLSOFT_ONLINEMEDIA_PLUGIN_STORAGE_HANDLER_ENUMERATOR_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include "./ifc_omstoragehandlerenum.h"
  7. #include "./ifc_omstoragehelper.h"
  8. #include <vector>
  9. class StorageHandlerEnum : public ifc_omstoragehandlerenum
  10. {
  11. protected:
  12. StorageHandlerEnum();
  13. ~StorageHandlerEnum();
  14. public:
  15. static HRESULT CreateInstance(StorageHandlerEnum **instance);
  16. static HRESULT CreateFromTemplate(const ifc_omstoragehelper::TemplateRecord *recordList, size_t recordCount, StorageHandlerEnum **instance);
  17. public:
  18. /* Dispatchable */
  19. size_t AddRef();
  20. size_t Release();
  21. int QueryInterface(GUID interface_guid, void **object);
  22. /* ifc_omstoragehandlerenum */
  23. HRESULT Next(ULONG listSize, ifc_omstoragehandler **elementList, ULONG *elementCount);
  24. HRESULT Reset(void);
  25. HRESULT Skip(ULONG elementCount);
  26. public:
  27. HRESULT AddHandler(ifc_omstoragehandler *handler);
  28. protected:
  29. typedef std::vector<ifc_omstoragehandler*> HandlerList;
  30. protected:
  31. ULONG ref;
  32. HandlerList handlerList;
  33. size_t index;
  34. protected:
  35. RECVS_DISPATCH;
  36. };
  37. #endif //NULLSOFT_ONLINEMEDIA_PLUGIN_STORAGE_HANDLER_ENUMERATOR_HEADER