1
0

RSSCOM.h 821 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef NULLSOFT_PODCAST_PLUGIN_RSS_COM_HEADER
  2. #define NULLSOFT_PODCAST_PLUGIN_RSS_COM_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include <atomic>
  8. #include "../nu/dispatchTable.h"
  9. class RssCOM : public IDispatch
  10. {
  11. public:
  12. typedef enum
  13. {
  14. DISPATCH_SUBSCRIBE = 0,
  15. } DispatchCodes;
  16. protected:
  17. RssCOM();
  18. ~RssCOM();
  19. public:
  20. static HRESULT CreateInstance(RssCOM **instance);
  21. static HRESULT SubscribeUrl(BSTR url, VARIANT FAR *result);
  22. static LPCWSTR GetName();
  23. /* IUnknown*/
  24. STDMETHOD(QueryInterface)(REFIID riid, PVOID *ppvObject);
  25. STDMETHOD_(ULONG, AddRef)(void);
  26. STDMETHOD_(ULONG, Release)(void);
  27. protected:
  28. DISPTABLE_INCLUDE();
  29. DISPHANDLER_REGISTER(OnSubscribe);
  30. std::atomic<std::size_t> _ref = 1;
  31. };
  32. #endif //NULLSOFT_PODCAST_PLUGIN_RSS_COM_HEADER