From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Plugins/Library/ml_webdev/serviceHost.h | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Src/Plugins/Library/ml_webdev/serviceHost.h (limited to 'Src/Plugins/Library/ml_webdev/serviceHost.h') diff --git a/Src/Plugins/Library/ml_webdev/serviceHost.h b/Src/Plugins/Library/ml_webdev/serviceHost.h new file mode 100644 index 00000000..7dbce0e7 --- /dev/null +++ b/Src/Plugins/Library/ml_webdev/serviceHost.h @@ -0,0 +1,55 @@ +#ifndef NULLSOFT_WEBDEV_PLUGIN_SERVICE_HOST_HEADER +#define NULLSOFT_WEBDEV_PLUGIN_SERVICE_HOST_HEADER + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +#include +#include +#include + +#define MPIID_OMSVCHOST 10 +#define MPIID_OMSVCEVENT 20 + +class WebDevServiceHost : public MultiPatch, + public MultiPatch +{ + +protected: + WebDevServiceHost(); + ~WebDevServiceHost(); + +public: + static HRESULT CreateInstance(WebDevServiceHost **instance); + static HRESULT GetCachedInstance(WebDevServiceHost **instance); + static HRESULT ReleseCache(); + +public: + /* Dispatchable */ + size_t AddRef(); + size_t Release(); + int QueryInterface(GUID interface_guid, void **object); + + /* ifc_omservicehost */ + HRESULT GetExternal(ifc_omservice *service, IDispatch **ppDispatch); + HRESULT GetBasePath(ifc_omservice *service, LPWSTR pszBuffer, UINT cchBufferMax); + HRESULT GetDefaultName(ifc_omservice *service, LPWSTR pszBuffer, UINT cchBufferMax); + HRESULT QueryCommandState(ifc_omservice *service, HWND hBrowser, const GUID *commandGroup, UINT commandId); + HRESULT ExecuteCommand(ifc_omservice *service, HWND hBrowser, const GUID *commandGroup, UINT commandId, ULONG_PTR commandArg); + HRESULT GetUrl(ifc_omservice *service, LPWSTR pszBuffer, UINT cchBufferMax); + + /* ifc_omsvceventhandler */ + void ServiceChange(ifc_omservice *service, UINT nModified); + +protected: + ULONG ref; + +protected: + RECVS_MULTIPATCH; +}; + + + + +#endif //NULLSOFT_WEBDEV_PLUGIN_SERVICE_HOST_HEADER \ No newline at end of file -- cgit