1
0

wasabiCallback.h 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef NULLSOFT_NOWPLAYING_PLUGIN_WASABI_CALLBACK_HEADER
  2. #define NULLSOFT_NOWPLAYING_PLUGIN_WASABI_CALLBACK_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <api/syscb/callbacks/syscb.h>
  7. #include <api/syscb/callbacks/browsercb.h>
  8. class WasabiCallback : public SysCallback
  9. {
  10. protected:
  11. WasabiCallback();
  12. ~WasabiCallback();
  13. public:
  14. static HRESULT CreateInstance(WasabiCallback **instance);
  15. public:
  16. /*** Dispatchable ***/
  17. size_t AddRef();
  18. size_t Release();
  19. int QueryInterface(GUID interface_guid, void **object);
  20. /*** SysCallback ***/
  21. FOURCC GetEventType();
  22. int Notify(int msg, intptr_t param1 = 0, intptr_t param2 = 0);
  23. protected:
  24. // set *override = true to prevent the URL from being opened
  25. // leave it alone otherwise (in case someone else wanted to override it)
  26. int OpenURL(const wchar_t *url, bool *override);
  27. protected:
  28. RECVS_DISPATCH;
  29. protected:
  30. ULONG ref;
  31. };
  32. #endif //NULLSOFT_NOWPLAYING_PLUGIN_WASABI_CALLBACK_HEADER