Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
955685a7
Commit
955685a7
authored
Feb 19, 2011
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Feb 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3: Add IObjectSafety support to IXMLHTTPRequest.
parent
2f22a504
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
httprequest.c
dlls/msxml3/httprequest.c
+75
-0
domdoc.c
dlls/msxml3/tests/domdoc.c
+0
-0
No files found.
dlls/msxml3/httprequest.c
View file @
955685a7
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#include "winuser.h"
#include "winuser.h"
#include "ole2.h"
#include "ole2.h"
#include "msxml6.h"
#include "msxml6.h"
#include "objsafe.h"
#include "msxml_private.h"
#include "msxml_private.h"
...
@@ -62,6 +63,7 @@ typedef struct
...
@@ -62,6 +63,7 @@ typedef struct
{
{
IXMLHTTPRequest
IXMLHTTPRequest_iface
;
IXMLHTTPRequest
IXMLHTTPRequest_iface
;
IObjectWithSite
IObjectWithSite_iface
;
IObjectWithSite
IObjectWithSite_iface
;
IObjectSafety
IObjectSafety_iface
;
LONG
ref
;
LONG
ref
;
READYSTATE
state
;
READYSTATE
state
;
...
@@ -85,6 +87,9 @@ typedef struct
...
@@ -85,6 +87,9 @@ typedef struct
/* IObjectWithSite*/
/* IObjectWithSite*/
IUnknown
*
site
;
IUnknown
*
site
;
/* IObjectSafety */
DWORD
safeopt
;
}
httprequest
;
}
httprequest
;
static
inline
httprequest
*
impl_from_IXMLHTTPRequest
(
IXMLHTTPRequest
*
iface
)
static
inline
httprequest
*
impl_from_IXMLHTTPRequest
(
IXMLHTTPRequest
*
iface
)
...
@@ -97,6 +102,11 @@ static inline httprequest *impl_from_IObjectWithSite(IObjectWithSite *iface)
...
@@ -97,6 +102,11 @@ static inline httprequest *impl_from_IObjectWithSite(IObjectWithSite *iface)
return
CONTAINING_RECORD
(
iface
,
httprequest
,
IObjectWithSite_iface
);
return
CONTAINING_RECORD
(
iface
,
httprequest
,
IObjectWithSite_iface
);
}
}
static
inline
httprequest
*
impl_from_IObjectSafety
(
IObjectSafety
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
httprequest
,
IObjectSafety_iface
);
}
static
void
httprequest_setreadystate
(
httprequest
*
This
,
READYSTATE
state
)
static
void
httprequest_setreadystate
(
httprequest
*
This
,
READYSTATE
state
)
{
{
READYSTATE
last
=
This
->
state
;
READYSTATE
last
=
This
->
state
;
...
@@ -516,6 +526,10 @@ static HRESULT WINAPI httprequest_QueryInterface(IXMLHTTPRequest *iface, REFIID
...
@@ -516,6 +526,10 @@ static HRESULT WINAPI httprequest_QueryInterface(IXMLHTTPRequest *iface, REFIID
{
{
*
ppvObject
=
&
This
->
IObjectWithSite_iface
;
*
ppvObject
=
&
This
->
IObjectWithSite_iface
;
}
}
else
if
(
IsEqualGUID
(
&
IID_IObjectSafety
,
riid
))
{
*
ppvObject
=
&
This
->
IObjectSafety_iface
;
}
else
else
{
{
TRACE
(
"Unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
TRACE
(
"Unsupported interface %s
\n
"
,
debugstr_guid
(
riid
));
...
@@ -1067,6 +1081,65 @@ static const IObjectWithSiteVtbl httprequestObjectSite =
...
@@ -1067,6 +1081,65 @@ static const IObjectWithSiteVtbl httprequestObjectSite =
httprequest_ObjectWithSite_GetSite
httprequest_ObjectWithSite_GetSite
};
};
/* IObjectSafety */
static
HRESULT
WINAPI
httprequest_Safety_QueryInterface
(
IObjectSafety
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
httprequest
*
This
=
impl_from_IObjectSafety
(
iface
);
return
IXMLHTTPRequest_QueryInterface
(
(
IXMLHTTPRequest
*
)
This
,
riid
,
ppv
);
}
static
ULONG
WINAPI
httprequest_Safety_AddRef
(
IObjectSafety
*
iface
)
{
httprequest
*
This
=
impl_from_IObjectSafety
(
iface
);
return
IXMLHTTPRequest_AddRef
((
IXMLHTTPRequest
*
)
This
);
}
static
ULONG
WINAPI
httprequest_Safety_Release
(
IObjectSafety
*
iface
)
{
httprequest
*
This
=
impl_from_IObjectSafety
(
iface
);
return
IXMLHTTPRequest_Release
((
IXMLHTTPRequest
*
)
This
);
}
#define SAFETY_SUPPORTED_OPTIONS (INTERFACESAFE_FOR_UNTRUSTED_CALLER|INTERFACESAFE_FOR_UNTRUSTED_DATA|INTERFACE_USES_SECURITY_MANAGER)
static
HRESULT
WINAPI
httprequest_Safety_GetInterfaceSafetyOptions
(
IObjectSafety
*
iface
,
REFIID
riid
,
DWORD
*
supported
,
DWORD
*
enabled
)
{
httprequest
*
This
=
impl_from_IObjectSafety
(
iface
);
TRACE
(
"(%p)->(%s %p %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
supported
,
enabled
);
if
(
!
supported
||
!
enabled
)
return
E_POINTER
;
*
supported
=
SAFETY_SUPPORTED_OPTIONS
;
*
enabled
=
This
->
safeopt
;
return
S_OK
;
}
static
HRESULT
WINAPI
httprequest_Safety_SetInterfaceSafetyOptions
(
IObjectSafety
*
iface
,
REFIID
riid
,
DWORD
mask
,
DWORD
enabled
)
{
httprequest
*
This
=
impl_from_IObjectSafety
(
iface
);
TRACE
(
"(%p)->(%s %x %x)
\n
"
,
This
,
debugstr_guid
(
riid
),
mask
,
enabled
);
if
((
mask
&
~
SAFETY_SUPPORTED_OPTIONS
)
!=
0
)
return
E_FAIL
;
This
->
safeopt
=
enabled
&
mask
&
SAFETY_SUPPORTED_OPTIONS
;
return
S_OK
;
}
#undef SAFETY_SUPPORTED_OPTIONS
static
const
IObjectSafetyVtbl
httprequestObjectSafety
=
{
httprequest_Safety_QueryInterface
,
httprequest_Safety_AddRef
,
httprequest_Safety_Release
,
httprequest_Safety_GetInterfaceSafetyOptions
,
httprequest_Safety_SetInterfaceSafetyOptions
};
HRESULT
XMLHTTPRequest_create
(
IUnknown
*
pUnkOuter
,
void
**
ppObj
)
HRESULT
XMLHTTPRequest_create
(
IUnknown
*
pUnkOuter
,
void
**
ppObj
)
{
{
httprequest
*
req
;
httprequest
*
req
;
...
@@ -1080,6 +1153,7 @@ HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **ppObj)
...
@@ -1080,6 +1153,7 @@ HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **ppObj)
req
->
IXMLHTTPRequest_iface
.
lpVtbl
=
&
dimimpl_vtbl
;
req
->
IXMLHTTPRequest_iface
.
lpVtbl
=
&
dimimpl_vtbl
;
req
->
IObjectWithSite_iface
.
lpVtbl
=
&
httprequestObjectSite
;
req
->
IObjectWithSite_iface
.
lpVtbl
=
&
httprequestObjectSite
;
req
->
IObjectSafety_iface
.
lpVtbl
=
&
httprequestObjectSafety
;
req
->
ref
=
1
;
req
->
ref
=
1
;
req
->
async
=
FALSE
;
req
->
async
=
FALSE
;
...
@@ -1094,6 +1168,7 @@ HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **ppObj)
...
@@ -1094,6 +1168,7 @@ HRESULT XMLHTTPRequest_create(IUnknown *pUnkOuter, void **ppObj)
req
->
reqheader_size
=
0
;
req
->
reqheader_size
=
0
;
list_init
(
&
req
->
reqheaders
);
list_init
(
&
req
->
reqheaders
);
req
->
site
=
NULL
;
req
->
site
=
NULL
;
req
->
safeopt
=
0
;
*
ppObj
=
&
req
->
IXMLHTTPRequest_iface
;
*
ppObj
=
&
req
->
IXMLHTTPRequest_iface
;
...
...
dlls/msxml3/tests/domdoc.c
View file @
955685a7
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment