Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f4d3dd2c
Commit
f4d3dd2c
authored
May 18, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
May 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi: Add initial implementation of IWSDXMLContext and WSDXMLCreateContext.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7ea08923
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
134 additions
and
1 deletion
+134
-1
wsdapi.spec
dlls/wsdapi/wsdapi.spec
+1
-1
xml.c
dlls/wsdapi/xml.c
+131
-0
wsdxml.idl
include/wsdxml.idl
+2
-0
No files found.
dlls/wsdapi/wsdapi.spec
View file @
f4d3dd2c
...
...
@@ -40,6 +40,6 @@
@ stdcall WSDXMLAddSibling(ptr ptr)
@ stdcall WSDXMLBuildAnyForSingleElement(ptr ptr ptr)
@ stdcall WSDXMLCleanupElement(ptr)
@ st
ub WSDXMLCreateContext
@ st
dcall WSDXMLCreateContext(ptr)
@ stub WSDXMLGetNameFromBuiltinNamespace
@ stub WSDXMLGetValueFromAny
dlls/wsdapi/xml.c
View file @
f4d3dd2c
...
...
@@ -213,3 +213,134 @@ HRESULT WINAPI WSDXMLCleanupElement(WSDXML_ELEMENT *pAny)
WSDFreeLinkedMemory
(
pAny
);
return
S_OK
;
}
/* IWSDXMLContext implementation */
typedef
struct
IWSDXMLContextImpl
{
IWSDXMLContext
IWSDXMLContext_iface
;
LONG
ref
;
}
IWSDXMLContextImpl
;
static
inline
IWSDXMLContextImpl
*
impl_from_IWSDXMLContext
(
IWSDXMLContext
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
IWSDXMLContextImpl
,
IWSDXMLContext_iface
);
}
static
HRESULT
WINAPI
IWSDXMLContextImpl_QueryInterface
(
IWSDXMLContext
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
IWSDXMLContextImpl
*
This
=
impl_from_IWSDXMLContext
(
iface
);
TRACE
(
"(%p, %s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
if
(
!
ppv
)
{
WARN
(
"Invalid parameter
\n
"
);
return
E_INVALIDARG
;
}
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IWSDXMLContext
))
{
*
ppv
=
&
This
->
IWSDXMLContext_iface
;
}
else
{
WARN
(
"Unknown IID %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
IWSDXMLContextImpl_AddRef
(
IWSDXMLContext
*
iface
)
{
IWSDXMLContextImpl
*
This
=
impl_from_IWSDXMLContext
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
IWSDXMLContextImpl_Release
(
IWSDXMLContext
*
iface
)
{
IWSDXMLContextImpl
*
This
=
impl_from_IWSDXMLContext
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
WSDFreeLinkedMemory
(
This
);
}
return
ref
;
}
static
HRESULT
WINAPI
IWSDXMLContextImpl_AddNamespace
(
IWSDXMLContext
*
iface
,
LPCWSTR
pszUri
,
LPCWSTR
pszSuggestedPrefix
,
WSDXML_NAMESPACE
**
ppNamespace
)
{
FIXME
(
"(%p, %s, %s, %p)
\n
"
,
iface
,
debugstr_w
(
pszUri
),
debugstr_w
(
pszSuggestedPrefix
),
ppNamespace
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IWSDXMLContextImpl_AddNameToNamespace
(
IWSDXMLContext
*
iface
,
LPCWSTR
pszUri
,
LPCWSTR
pszName
,
WSDXML_NAME
**
ppName
)
{
FIXME
(
"(%p, %s, %s, %p)
\n
"
,
iface
,
debugstr_w
(
pszUri
),
debugstr_w
(
pszName
),
ppName
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IWSDXMLContextImpl_SetNamespaces
(
IWSDXMLContext
*
iface
,
const
PCWSDXML_NAMESPACE
*
pNamespaces
,
WORD
wNamespacesCount
,
BYTE
bLayerNumber
)
{
FIXME
(
"(%p, %p, %d, %d)
\n
"
,
iface
,
pNamespaces
,
wNamespacesCount
,
bLayerNumber
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
IWSDXMLContextImpl_SetTypes
(
IWSDXMLContext
*
iface
,
const
PCWSDXML_TYPE
*
pTypes
,
DWORD
dwTypesCount
,
BYTE
bLayerNumber
)
{
FIXME
(
"(%p, %p, %d, %d)
\n
"
,
iface
,
pTypes
,
dwTypesCount
,
bLayerNumber
);
return
E_NOTIMPL
;
}
static
const
IWSDXMLContextVtbl
xmlcontext_vtbl
=
{
IWSDXMLContextImpl_QueryInterface
,
IWSDXMLContextImpl_AddRef
,
IWSDXMLContextImpl_Release
,
IWSDXMLContextImpl_AddNamespace
,
IWSDXMLContextImpl_AddNameToNamespace
,
IWSDXMLContextImpl_SetNamespaces
,
IWSDXMLContextImpl_SetTypes
};
HRESULT
WINAPI
WSDXMLCreateContext
(
IWSDXMLContext
**
ppContext
)
{
IWSDXMLContextImpl
*
obj
;
TRACE
(
"(%p)"
,
ppContext
);
if
(
ppContext
==
NULL
)
{
WARN
(
"Invalid parameter: ppContext == NULL
\n
"
);
return
E_POINTER
;
}
*
ppContext
=
NULL
;
obj
=
WSDAllocateLinkedMemory
(
NULL
,
sizeof
(
*
obj
));
if
(
!
obj
)
{
return
E_OUTOFMEMORY
;
}
obj
->
IWSDXMLContext_iface
.
lpVtbl
=
&
xmlcontext_vtbl
;
obj
->
ref
=
1
;
*
ppContext
=
&
obj
->
IWSDXMLContext_iface
;
TRACE
(
"Returning iface %p
\n
"
,
*
ppContext
);
return
S_OK
;
}
include/wsdxml.idl
View file @
f4d3dd2c
...
...
@@ -39,3 +39,5 @@ interface IWSDXMLContext : IUnknown
HRESULT
SetTypes
(
[
in
,
size_is
(
dwTypesCount
)
]
const
PCWSDXML_TYPE
*
pTypes
,
[
in
]
DWORD
dwTypesCount
,
[
in
]
BYTE
bLayerNumber
)
;
}
;
cpp_quote
(
"HRESULT WINAPI WSDXMLCreateContext(IWSDXMLContext **ppContext);"
)
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