service.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef NULLSOFT_NOWPLAYING_PLUGIN_SERVICE_HEADER
  2. #define NULLSOFT_NOWPLAYING_PLUGIN_SERVICE_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include <ifc_omservice.h>
  8. #define SERVICE_ID 101
  9. #define SERVICE_HOMEURL L"http://client.winamp.com/nowplaying?v=5.9&icid=navigationtree"
  10. class OmService : public ifc_omservice
  11. {
  12. protected:
  13. OmService(UINT nId);
  14. ~OmService();
  15. public:
  16. static HRESULT CreateInstance(OmService **instance);
  17. public:
  18. /* Dispatchable */
  19. size_t AddRef();
  20. size_t Release();
  21. int QueryInterface(GUID interface_guid, void **object);
  22. /* ifc_omservice */
  23. unsigned int GetId();
  24. HRESULT GetName(wchar_t *pszBuffer, int cchBufferMax);
  25. HRESULT GetUrl(wchar_t *pszBuffer, int cchBufferMax);
  26. HRESULT GetExternal(IDispatch **ppDispatch);
  27. HRESULT GetIcon(wchar_t *pszBuffer, int cchBufferMax);
  28. public:
  29. HRESULT SetName(LPCWSTR pszName);
  30. HRESULT SetUrl(LPCWSTR pszUrl);
  31. HRESULT SetIcon(LPCWSTR pszIcon);
  32. protected:
  33. RECVS_DISPATCH;
  34. protected:
  35. ULONG ref;
  36. UINT id;
  37. LPWSTR name;
  38. LPWSTR url;
  39. LPWSTR icon;
  40. };
  41. #endif //NULLSOFT_NOWPLAYING_PLUGIN_SERVICE_HEADER