2 * Implementation of event-related interfaces for IE Web Browser control:
4 * - IConnectionPointContainer
7 * Copyright 2001 John R. Sheets (for CodeWeavers)
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(shdocvw);
31 /**********************************************************************
32 * Implement the IConnectionPointContainer interface
35 static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface,
36 REFIID riid, LPVOID *ppobj)
38 ICOM_THIS(IConnectionPointContainerImpl, iface);
40 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
44 static ULONG WINAPI WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface)
46 ICOM_THIS(IConnectionPointContainerImpl, iface);
52 static ULONG WINAPI WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface)
54 ICOM_THIS(IConnectionPointContainerImpl, iface);
56 /* static class, won't be freed */
61 /* Get a list of connection points inside this container. */
62 static HRESULT WINAPI WBCPC_EnumConnectionPoints(LPCONNECTIONPOINTCONTAINER iface,
63 LPENUMCONNECTIONPOINTS *ppEnum)
65 FIXME("stub: IEnumConnectionPoints = %p\n", *ppEnum);
69 /* Retrieve the connection point in this container associated with the
70 * riid interface. When events occur in the control, the control can
71 * call backwards into its embedding site, through these interfaces.
73 static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface,
74 REFIID riid, LPCONNECTIONPOINT *ppCP)
76 TRACE(": IID = %s, IConnectionPoint = %p\n", debugstr_guid(riid), *ppCP);
78 /* For now, return the same IConnectionPoint object for both
79 * event interface requests.
81 if (IsEqualGUID (&IID_INotifyDBEvents, riid))
83 TRACE("Returning connection point %p for IID_INotifyDBEvents\n",
84 &SHDOCVW_ConnectionPoint);
85 *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
88 else if (IsEqualGUID (&IID_IPropertyNotifySink, riid))
90 TRACE("Returning connection point %p for IID_IPropertyNotifySink\n",
91 &SHDOCVW_ConnectionPoint);
92 *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
99 /**********************************************************************
100 * IConnectionPointContainer virtual function table for IE Web Browser component
103 static ICOM_VTABLE(IConnectionPointContainer) WBCPC_Vtbl =
105 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
106 WBCPC_QueryInterface,
109 WBCPC_EnumConnectionPoints,
110 WBCPC_FindConnectionPoint
113 IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer = { &WBCPC_Vtbl, 1 };
116 /**********************************************************************
117 * Implement the IConnectionPoint interface
120 static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
121 REFIID riid, LPVOID *ppobj)
123 ICOM_THIS(IConnectionPointImpl, iface);
125 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
126 return E_NOINTERFACE;
129 static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
131 ICOM_THIS(IConnectionPointImpl, iface);
134 return ++(This->ref);
137 static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
139 ICOM_THIS(IConnectionPointImpl, iface);
141 /* static class, won't be freed */
143 return --(This->ref);
146 static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId)
148 FIXME("stub: %s\n", debugstr_guid(pIId));
152 /* Get this connection point's owning container */
153 static HRESULT WINAPI
154 WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
155 LPCONNECTIONPOINTCONTAINER *ppCPC)
157 FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC);
161 /* Connect the pUnkSink event-handling implementation (in the control site)
162 * to this connection point. Return a handle to this connection in
163 * pdwCookie (for later use in Unadvise()).
165 static HRESULT WINAPI WBCP_Advise(LPCONNECTIONPOINT iface,
166 LPUNKNOWN pUnkSink, DWORD *pdwCookie)
168 static int new_cookie;
170 FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
172 *pdwCookie = ++new_cookie;
173 TRACE ("Returning cookie = %ld\n", *pdwCookie);
178 /* Disconnect this implementation from the connection point. */
179 static HRESULT WINAPI WBCP_Unadvise(LPCONNECTIONPOINT iface,
182 FIXME("stub: cookie to disconnect = %ld\n", dwCookie);
186 /* Get a list of connections in this connection point. */
187 static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface,
188 LPENUMCONNECTIONS *ppEnum)
190 FIXME("stub: IEnumConnections = %p\n", *ppEnum);
194 /**********************************************************************
195 * IConnectionPoint virtual function table for IE Web Browser component
198 static ICOM_VTABLE(IConnectionPoint) WBCP_Vtbl =
200 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
204 WBCP_GetConnectionInterface,
205 WBCP_GetConnectionPointContainer,
211 IConnectionPointImpl SHDOCVW_ConnectionPoint = { &WBCP_Vtbl, 1 };