Bug 1700051: part 31.4) Move `mSoftTextValid` to `SoftText`. r=smaug
[gecko.git] / ipc / mscom / IHandlerProvider.h
blob76963fb9f6032f0a1f09e26f9afdecaf430d3b0e
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_mscom_IHandlerProvider_h
8 #define mozilla_mscom_IHandlerProvider_h
10 #include "mozilla/NotNull.h"
11 #include "mozilla/mscom/Ptr.h"
13 #include <objidl.h>
15 namespace mozilla {
16 namespace mscom {
18 struct IInterceptor;
20 struct HandlerProvider {
21 virtual STDMETHODIMP GetHandler(NotNull<CLSID*> aHandlerClsid) = 0;
22 virtual STDMETHODIMP GetHandlerPayloadSize(
23 NotNull<IInterceptor*> aInterceptor, NotNull<DWORD*> aOutPayloadSize) = 0;
24 virtual STDMETHODIMP WriteHandlerPayload(NotNull<IInterceptor*> aInterceptor,
25 NotNull<IStream*> aStream) = 0;
26 virtual STDMETHODIMP_(REFIID) MarshalAs(REFIID aIid) = 0;
27 virtual STDMETHODIMP DisconnectHandlerRemotes() = 0;
29 /**
30 * Determine whether this interface might be supported by objects using
31 * this HandlerProvider.
32 * This is used to avoid unnecessary cross-thread QueryInterface calls for
33 * interfaces known to be unsupported.
34 * Return S_OK if the interface might be supported, E_NOINTERFACE if it
35 * definitely isn't supported.
37 virtual STDMETHODIMP IsInterfaceMaybeSupported(REFIID aIid) { return S_OK; }
40 struct IHandlerProvider : public IUnknown, public HandlerProvider {
41 virtual STDMETHODIMP_(REFIID)
42 GetEffectiveOutParamIid(REFIID aCallIid, ULONG aCallMethod) = 0;
43 virtual STDMETHODIMP NewInstance(
44 REFIID aIid, InterceptorTargetPtr<IUnknown> aTarget,
45 NotNull<IHandlerProvider**> aOutNewPayload) = 0;
48 } // namespace mscom
49 } // namespace mozilla
51 #endif // mozilla_mscom_IHandlerProvider_h