service.h 989 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  3. #pragma once
  4. #endif
  5. #include <wtypes.h>
  6. #include "../ombrowser/ifc_omservice.h"
  7. #define SERVICE_SIGN_IN 750
  8. #define SERVICE_SOURCES 751
  9. #define SERVICE_LABS 752
  10. class OmService : public ifc_omservice
  11. {
  12. protected:
  13. OmService(UINT nId);
  14. ~OmService();
  15. public:
  16. static HRESULT CreateInstance(UINT nId, LPCWSTR pszName, 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. };