Jacek Caban : ieframe: Added IHttpSecurity implementation.

Alexandre Julliard julliard at winehq.org
Mon Jun 4 13:27:13 CDT 2012


Module: wine
Branch: master
Commit: 36c9de5c528ac88548280e39b102cdfbbafe66b6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=36c9de5c528ac88548280e39b102cdfbbafe66b6

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Jun  4 15:48:52 2012 +0200

ieframe: Added IHttpSecurity implementation.

---

 dlls/ieframe/navigate.c |   59 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/dlls/ieframe/navigate.c b/dlls/ieframe/navigate.c
index dac1077..dd4a976 100644
--- a/dlls/ieframe/navigate.c
+++ b/dlls/ieframe/navigate.c
@@ -38,6 +38,7 @@ static const WCHAR emptyW[] = {0};
 typedef struct {
     IBindStatusCallback  IBindStatusCallback_iface;
     IHttpNegotiate       IHttpNegotiate_iface;
+    IHttpSecurity        IHttpSecurity_iface;
 
     LONG ref;
 
@@ -164,6 +165,12 @@ static HRESULT WINAPI BindStatusCallback_QueryInterface(IBindStatusCallback *ifa
     }else if(IsEqualGUID(&IID_IHttpNegotiate, riid)) {
         TRACE("(%p)->(IID_IHttpNegotiate %p)\n", This, ppv);
         *ppv = &This->IHttpNegotiate_iface;
+    }else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) {
+        TRACE("(%p)->(IID_IWindowForBindingUI %p)\n", This, ppv);
+        *ppv = &This->IHttpSecurity_iface;
+    }else if(IsEqualGUID(&IID_IHttpSecurity, riid)) {
+        TRACE("(%p)->(IID_IHttpSecurity %p)\n", This, ppv);
+        *ppv = &This->IHttpSecurity_iface;
     }else {
         *ppv = NULL;
         WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
@@ -475,6 +482,57 @@ static const IHttpNegotiateVtbl HttpNegotiateVtbl = {
     HttpNegotiate_OnResponse
 };
 
+static inline BindStatusCallback *impl_from_IHttpSecurity(IHttpSecurity *iface)
+{
+    return CONTAINING_RECORD(iface, BindStatusCallback, IHttpSecurity_iface);
+}
+
+static HRESULT WINAPI HttpSecurity_QueryInterface(IHttpSecurity *iface, REFIID riid, void **ppv)
+{
+    BindStatusCallback *This = impl_from_IHttpSecurity(iface);
+    return IBindStatusCallback_QueryInterface(&This->IBindStatusCallback_iface, riid, ppv);
+}
+
+static ULONG WINAPI HttpSecurity_AddRef(IHttpSecurity *iface)
+{
+    BindStatusCallback *This = impl_from_IHttpSecurity(iface);
+    return IBindStatusCallback_AddRef(&This->IBindStatusCallback_iface);
+}
+
+static ULONG WINAPI HttpSecurity_Release(IHttpSecurity *iface)
+{
+    BindStatusCallback *This = impl_from_IHttpSecurity(iface);
+    return IBindStatusCallback_Release(&This->IBindStatusCallback_iface);
+}
+
+static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd)
+{
+    BindStatusCallback *This = impl_from_IHttpSecurity(iface);
+
+    TRACE("(%p)->(%s %p)\n", This, debugstr_guid(rguidReason), phwnd);
+
+    if(!This->doc_host)
+        return E_FAIL;
+
+    *phwnd = This->doc_host->frame_hwnd;
+    return S_OK;
+}
+
+static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem)
+{
+    BindStatusCallback *This = impl_from_IHttpSecurity(iface);
+    FIXME("(%p)->(%u)\n", This, dwProblem);
+    return S_FALSE;
+}
+
+static const IHttpSecurityVtbl HttpSecurityVtbl = {
+    HttpSecurity_QueryInterface,
+    HttpSecurity_AddRef,
+    HttpSecurity_Release,
+    HttpSecurity_GetWindow,
+    HttpSecurity_OnSecurityProblem
+};
+
 static BindStatusCallback *create_callback(DocHost *doc_host, LPCWSTR url, PBYTE post_data,
         ULONG post_data_len, LPCWSTR headers)
 {
@@ -482,6 +540,7 @@ static BindStatusCallback *create_callback(DocHost *doc_host, LPCWSTR url, PBYTE
 
     ret->IBindStatusCallback_iface.lpVtbl = &BindStatusCallbackVtbl;
     ret->IHttpNegotiate_iface.lpVtbl      = &HttpNegotiateVtbl;
+    ret->IHttpSecurity_iface.lpVtbl       = &HttpSecurityVtbl;
 
     ret->ref = 1;
     ret->url = heap_strdupW(url);




More information about the wine-cvs mailing list