serviceList.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef NULLSOFT_WINAMP_OMSERVICE_LIST_ENUMERATOR_HEADER
  2. #define NULLSOFT_WINAMP_OMSERVICE_LIST_ENUMERATOR_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include "./ifc_omserviceenum.h"
  8. #include <vector>
  9. class ifc_omservice;
  10. class OmServiceList : public ifc_omserviceenum
  11. {
  12. protected:
  13. OmServiceList();
  14. ~OmServiceList();
  15. public:
  16. static HRESULT CreateInstance(OmServiceList **instance);
  17. public:
  18. /* Dispatchable */
  19. size_t AddRef();
  20. size_t Release();
  21. int QueryInterface(GUID interface_guid, void **object);
  22. /* ifc_omserviceenum */
  23. HRESULT Next(unsigned long listSize, ifc_omservice **elementList, unsigned long *elementCount);
  24. HRESULT Reset(void);
  25. HRESULT Skip(unsigned long elementCount);
  26. public:
  27. HRESULT Add(ifc_omservice *service);
  28. HRESULT Remove(size_t index);
  29. HRESULT Clear();
  30. protected:
  31. typedef std::vector<ifc_omservice*> SvcList;
  32. protected:
  33. size_t ref;
  34. SvcList list;
  35. size_t cursor;
  36. protected:
  37. RECVS_DISPATCH;
  38. };
  39. #endif //NULLSOFT_WINAMP_OMSERVICE_LIST_ENUMERATOR_HEADER