summaryrefslogtreecommitdiffstats
path: root/ipc/mscom/IHandlerProvider.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /ipc/mscom/IHandlerProvider.h
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ipc/mscom/IHandlerProvider.h')
-rw-r--r--ipc/mscom/IHandlerProvider.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/ipc/mscom/IHandlerProvider.h b/ipc/mscom/IHandlerProvider.h
new file mode 100644
index 0000000000..76963fb9f6
--- /dev/null
+++ b/ipc/mscom/IHandlerProvider.h
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef mozilla_mscom_IHandlerProvider_h
+#define mozilla_mscom_IHandlerProvider_h
+
+#include "mozilla/NotNull.h"
+#include "mozilla/mscom/Ptr.h"
+
+#include <objidl.h>
+
+namespace mozilla {
+namespace mscom {
+
+struct IInterceptor;
+
+struct HandlerProvider {
+ virtual STDMETHODIMP GetHandler(NotNull<CLSID*> aHandlerClsid) = 0;
+ virtual STDMETHODIMP GetHandlerPayloadSize(
+ NotNull<IInterceptor*> aInterceptor, NotNull<DWORD*> aOutPayloadSize) = 0;
+ virtual STDMETHODIMP WriteHandlerPayload(NotNull<IInterceptor*> aInterceptor,
+ NotNull<IStream*> aStream) = 0;
+ virtual STDMETHODIMP_(REFIID) MarshalAs(REFIID aIid) = 0;
+ virtual STDMETHODIMP DisconnectHandlerRemotes() = 0;
+
+ /**
+ * Determine whether this interface might be supported by objects using
+ * this HandlerProvider.
+ * This is used to avoid unnecessary cross-thread QueryInterface calls for
+ * interfaces known to be unsupported.
+ * Return S_OK if the interface might be supported, E_NOINTERFACE if it
+ * definitely isn't supported.
+ */
+ virtual STDMETHODIMP IsInterfaceMaybeSupported(REFIID aIid) { return S_OK; }
+};
+
+struct IHandlerProvider : public IUnknown, public HandlerProvider {
+ virtual STDMETHODIMP_(REFIID)
+ GetEffectiveOutParamIid(REFIID aCallIid, ULONG aCallMethod) = 0;
+ virtual STDMETHODIMP NewInstance(
+ REFIID aIid, InterceptorTargetPtr<IUnknown> aTarget,
+ NotNull<IHandlerProvider**> aOutNewPayload) = 0;
+};
+
+} // namespace mscom
+} // namespace mozilla
+
+#endif // mozilla_mscom_IHandlerProvider_h