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
399c1427
Commit
399c1427
authored
Apr 26, 2018
by
Owen Rudge
Committed by
Alexandre Julliard
Apr 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi: Implement UnPublish.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
60fad890
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
3 deletions
+86
-3
discovery.c
dlls/wsdapi/discovery.c
+11
-3
soap.c
dlls/wsdapi/soap.c
+72
-0
wsdapi_internal.h
dlls/wsdapi/wsdapi_internal.h
+3
-0
No files found.
dlls/wsdapi/discovery.c
View file @
399c1427
...
...
@@ -195,10 +195,18 @@ static HRESULT WINAPI IWSDiscoveryPublisherImpl_Publish(IWSDiscoveryPublisher *T
static
HRESULT
WINAPI
IWSDiscoveryPublisherImpl_UnPublish
(
IWSDiscoveryPublisher
*
This
,
LPCWSTR
pszId
,
ULONGLONG
ullInstanceId
,
ULONGLONG
ullMessageNumber
,
LPCWSTR
pszSessionId
,
const
WSDXML_ELEMENT
*
pAny
)
{
FIXME
(
"(%p, %s, %s, %s, %s, %p)
\n
"
,
This
,
debugstr_w
(
pszId
),
wine_dbgstr_longlong
(
ullInstanceId
),
wine_dbgstr_longlong
(
ullMessageNumber
),
debugstr_w
(
pszSessionId
),
pAny
);
IWSDiscoveryPublisherImpl
*
impl
=
impl_from_IWSDiscoveryPublisher
(
This
);
return
E_NOTIMPL
;
TRACE
(
"(%p, %s, %s, %s, %s, %p)
\n
"
,
This
,
debugstr_w
(
pszId
),
wine_dbgstr_longlong
(
ullInstanceId
),
wine_dbgstr_longlong
(
ullMessageNumber
),
debugstr_w
(
pszSessionId
),
pAny
);
if
((
!
impl
->
publisherStarted
)
||
(
pszId
==
NULL
)
||
(
lstrlenW
(
pszId
)
>
WSD_MAX_TEXT_LENGTH
)
||
((
pszSessionId
!=
NULL
)
&&
(
lstrlenW
(
pszSessionId
)
>
WSD_MAX_TEXT_LENGTH
)))
{
return
E_INVALIDARG
;
}
return
send_bye_message
(
impl
,
pszId
,
ullInstanceId
,
ullMessageNumber
,
pszSessionId
,
pAny
);
}
static
HRESULT
WINAPI
IWSDiscoveryPublisherImpl_MatchProbe
(
IWSDiscoveryPublisher
*
This
,
const
WSD_SOAP_MESSAGE
*
pProbeMessage
,
...
...
dlls/wsdapi/soap.c
View file @
399c1427
...
...
@@ -45,6 +45,13 @@ static const WCHAR actionHello[] = {
'd'
,
'i'
,
's'
,
'c'
,
'o'
,
'v'
,
'e'
,
'r'
,
'y'
,
'/'
,
'H'
,
'e'
,
'l'
,
'l'
,
'o'
,
0
};
static
const
WCHAR
actionBye
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
's'
,
'c'
,
'h'
,
'e'
,
'm'
,
'a'
,
's'
,
'.'
,
'x'
,
'm'
,
'l'
,
's'
,
'o'
,
'a'
,
'p'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
'w'
,
's'
,
'/'
,
'2'
,
'0'
,
'0'
,
'5'
,
'/'
,
'0'
,
'4'
,
'/'
,
'd'
,
'i'
,
's'
,
'c'
,
'o'
,
'v'
,
'e'
,
'r'
,
'y'
,
'/'
,
'B'
,
'y'
,
'e'
,
0
};
static
const
WCHAR
addressingNsUri
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
's'
,
'c'
,
'h'
,
'e'
,
'm'
,
'a'
,
's'
,
'.'
,
'x'
,
'm'
,
'l'
,
's'
,
'o'
,
'a'
,
'p'
,
'.'
,
'o'
,
'r'
,
'g'
,
'/'
,
...
...
@@ -75,6 +82,7 @@ static const WCHAR sequenceIdString[] = { 'S','e','q','u','e','n','c','e','I','d
static
const
WCHAR
emptyString
[]
=
{
0
};
static
const
WCHAR
bodyString
[]
=
{
'B'
,
'o'
,
'd'
,
'y'
,
0
};
static
const
WCHAR
helloString
[]
=
{
'H'
,
'e'
,
'l'
,
'l'
,
'o'
,
0
};
static
const
WCHAR
byeString
[]
=
{
'B'
,
'y'
,
'e'
,
0
};
static
const
WCHAR
endpointReferenceString
[]
=
{
'E'
,
'n'
,
'd'
,
'p'
,
'o'
,
'i'
,
'n'
,
't'
,
'R'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'n'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
addressString
[]
=
{
'A'
,
'd'
,
'd'
,
'r'
,
'e'
,
's'
,
's'
,
0
};
static
const
WCHAR
referenceParametersString
[]
=
{
'R'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'n'
,
'c'
,
'e'
,
'P'
,
'a'
,
'r'
,
'a'
,
'm'
,
'e'
,
't'
,
'e'
,
'r'
,
's'
,
0
};
...
...
@@ -1008,3 +1016,67 @@ cleanup:
return
ret
;
}
HRESULT
send_bye_message
(
IWSDiscoveryPublisherImpl
*
impl
,
LPCWSTR
id
,
ULONGLONG
instance_id
,
ULONGLONG
msg_num
,
LPCWSTR
session_id
,
const
WSDXML_ELEMENT
*
any
)
{
WSDXML_ELEMENT
*
body_element
=
NULL
,
*
bye_element
,
*
endpoint_reference_element
;
struct
list
*
discovered_namespaces
=
NULL
;
WSDXML_NAME
*
body_name
=
NULL
;
WSD_SOAP_HEADER
soap_header
;
WSD_APP_SEQUENCE
sequence
;
WCHAR
message_id
[
64
];
HRESULT
ret
=
E_OUTOFMEMORY
;
sequence
.
InstanceId
=
instance_id
;
sequence
.
MessageNumber
=
msg_num
;
sequence
.
SequenceId
=
session_id
;
if
(
!
create_guid
(
message_id
))
goto
failed
;
discovered_namespaces
=
WSDAllocateLinkedMemory
(
NULL
,
sizeof
(
struct
list
));
if
(
!
discovered_namespaces
)
goto
failed
;
list_init
(
discovered_namespaces
);
populate_soap_header
(
&
soap_header
,
discoveryTo
,
actionBye
,
message_id
,
&
sequence
,
NULL
);
ret
=
IWSDXMLContext_AddNameToNamespace
(
impl
->
xmlContext
,
envelopeNsUri
,
bodyString
,
&
body_name
);
if
(
FAILED
(
ret
))
goto
cleanup
;
/* <soap:Body>, <wsd:Bye> */
ret
=
WSDXMLBuildAnyForSingleElement
(
body_name
,
NULL
,
&
body_element
);
if
(
FAILED
(
ret
))
goto
cleanup
;
ret
=
add_child_element
(
impl
->
xmlContext
,
body_element
,
discoveryNsUri
,
byeString
,
NULL
,
&
bye_element
);
if
(
FAILED
(
ret
))
goto
cleanup
;
/* <wsa:EndpointReference>, <wsa:Address> */
ret
=
add_child_element
(
impl
->
xmlContext
,
bye_element
,
addressingNsUri
,
endpointReferenceString
,
NULL
,
&
endpoint_reference_element
);
if
(
FAILED
(
ret
))
goto
cleanup
;
ret
=
add_child_element
(
impl
->
xmlContext
,
endpoint_reference_element
,
addressingNsUri
,
addressString
,
id
,
NULL
);
if
(
FAILED
(
ret
))
goto
cleanup
;
/* Write any body elements */
if
(
any
!=
NULL
)
{
ret
=
duplicate_element
(
bye_element
,
any
,
discovered_namespaces
);
if
(
FAILED
(
ret
))
goto
cleanup
;
}
/* Write and send the message */
ret
=
write_and_send_message
(
impl
,
&
soap_header
,
body_element
,
discovered_namespaces
,
NULL
,
0
);
goto
cleanup
;
failed:
ret
=
E_OUTOFMEMORY
;
cleanup:
WSDFreeLinkedMemory
(
body_name
);
WSDFreeLinkedMemory
(
body_element
);
WSDFreeLinkedMemory
(
discovered_namespaces
);
return
ret
;
}
dlls/wsdapi/wsdapi_internal.h
View file @
399c1427
...
...
@@ -62,6 +62,9 @@ HRESULT send_hello_message(IWSDiscoveryPublisherImpl *impl, LPCWSTR id, ULONGLON
const
WSD_URI_LIST
*
xaddrs_list
,
const
WSDXML_ELEMENT
*
hdr_any
,
const
WSDXML_ELEMENT
*
ref_param_any
,
const
WSDXML_ELEMENT
*
endpoint_ref_any
,
const
WSDXML_ELEMENT
*
any
);
HRESULT
send_bye_message
(
IWSDiscoveryPublisherImpl
*
impl
,
LPCWSTR
id
,
ULONGLONG
instance_id
,
ULONGLONG
msg_num
,
LPCWSTR
session_id
,
const
WSDXML_ELEMENT
*
any
);
HRESULT
register_namespaces
(
IWSDXMLContext
*
xml_context
);
/* xml.c */
...
...
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