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 static const GUID IID_INotifyDBEvents =
32 { 0xdb526cc0, 0xd188, 0x11cd, { 0xad, 0x48, 0x00, 0xaa, 0x00, 0x3c, 0x9c, 0xb6 } };
34 /**********************************************************************
35 * Implement the IConnectionPointContainer interface
38 static HRESULT WINAPI WBCPC_QueryInterface(LPCONNECTIONPOINTCONTAINER iface,
39 REFIID riid, LPVOID *ppobj)
41 ICOM_THIS(IConnectionPointContainerImpl, iface);
43 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
47 static ULONG WINAPI WBCPC_AddRef(LPCONNECTIONPOINTCONTAINER iface)
49 ICOM_THIS(IConnectionPointContainerImpl, iface);
55 static ULONG WINAPI WBCPC_Release(LPCONNECTIONPOINTCONTAINER iface)
57 ICOM_THIS(IConnectionPointContainerImpl, iface);
59 /* static class, won't be freed */
64 /* Get a list of connection points inside this container. */
65 static HRESULT WINAPI WBCPC_EnumConnectionPoints(LPCONNECTIONPOINTCONTAINER iface,
66 LPENUMCONNECTIONPOINTS *ppEnum)
68 FIXME("stub: IEnumConnectionPoints = %p\n", *ppEnum);
72 /* Retrieve the connection point in this container associated with the
73 * riid interface. When events occur in the control, the control can
74 * call backwards into its embedding site, through these interfaces.
76 static HRESULT WINAPI WBCPC_FindConnectionPoint(LPCONNECTIONPOINTCONTAINER iface,
77 REFIID riid, LPCONNECTIONPOINT *ppCP)
79 TRACE(": IID = %s, IConnectionPoint = %p\n", debugstr_guid(riid), *ppCP);
81 /* For now, return the same IConnectionPoint object for both
82 * event interface requests.
84 if (IsEqualGUID (&IID_INotifyDBEvents, riid))
86 TRACE("Returning connection point %p for IID_INotifyDBEvents\n",
87 &SHDOCVW_ConnectionPoint);
88 *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
91 else if (IsEqualGUID (&IID_IPropertyNotifySink, riid))
93 TRACE("Returning connection point %p for IID_IPropertyNotifySink\n",
94 &SHDOCVW_ConnectionPoint);
95 *ppCP = (LPCONNECTIONPOINT)&SHDOCVW_ConnectionPoint;
102 /**********************************************************************
103 * IConnectionPointContainer virtual function table for IE Web Browser component
106 static ICOM_VTABLE(IConnectionPointContainer) WBCPC_Vtbl =
108 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
109 WBCPC_QueryInterface,
112 WBCPC_EnumConnectionPoints,
113 WBCPC_FindConnectionPoint
116 IConnectionPointContainerImpl SHDOCVW_ConnectionPointContainer = { &WBCPC_Vtbl, 1 };
119 /**********************************************************************
120 * Implement the IConnectionPoint interface
123 static HRESULT WINAPI WBCP_QueryInterface(LPCONNECTIONPOINT iface,
124 REFIID riid, LPVOID *ppobj)
126 ICOM_THIS(IConnectionPointImpl, iface);
128 FIXME("(%p)->(%s,%p),stub!\n", This, debugstr_guid(riid), ppobj);
129 return E_NOINTERFACE;
132 static ULONG WINAPI WBCP_AddRef(LPCONNECTIONPOINT iface)
134 ICOM_THIS(IConnectionPointImpl, iface);
137 return ++(This->ref);
140 static ULONG WINAPI WBCP_Release(LPCONNECTIONPOINT iface)
142 ICOM_THIS(IConnectionPointImpl, iface);
144 /* static class, won't be freed */
146 return --(This->ref);
149 static HRESULT WINAPI WBCP_GetConnectionInterface(LPCONNECTIONPOINT iface, IID* pIId)
151 FIXME("stub: %s\n", debugstr_guid(pIId));
155 /* Get this connection point's owning container */
156 static HRESULT WINAPI
157 WBCP_GetConnectionPointContainer(LPCONNECTIONPOINT iface,
158 LPCONNECTIONPOINTCONTAINER *ppCPC)
160 FIXME("stub: IConnectionPointContainer = %p\n", *ppCPC);
164 /* Connect the pUnkSink event-handling implementation (in the control site)
165 * to this connection point. Return a handle to this connection in
166 * pdwCookie (for later use in Unadvise()).
168 static HRESULT WINAPI WBCP_Advise(LPCONNECTIONPOINT iface,
169 LPUNKNOWN pUnkSink, DWORD *pdwCookie)
171 static int new_cookie;
173 FIXME("stub: IUnknown = %p, connection cookie = %ld\n", pUnkSink, *pdwCookie);
175 *pdwCookie = ++new_cookie;
176 TRACE ("Returning cookie = %ld\n", *pdwCookie);
181 /* Disconnect this implementation from the connection point. */
182 static HRESULT WINAPI WBCP_Unadvise(LPCONNECTIONPOINT iface,
185 FIXME("stub: cookie to disconnect = %lx\n", dwCookie);
189 /* Get a list of connections in this connection point. */
190 static HRESULT WINAPI WBCP_EnumConnections(LPCONNECTIONPOINT iface,
191 LPENUMCONNECTIONS *ppEnum)
193 FIXME("stub: IEnumConnections = %p\n", *ppEnum);
197 /**********************************************************************
198 * IConnectionPoint virtual function table for IE Web Browser component
201 static ICOM_VTABLE(IConnectionPoint) WBCP_Vtbl =
203 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
207 WBCP_GetConnectionInterface,
208 WBCP_GetConnectionPointContainer,
214 IConnectionPointImpl SHDOCVW_ConnectionPoint = { &WBCP_Vtbl, 1 };