Add fake X_MS_MediaReceiverRegistrar RegisterDevice support.

This commit is contained in:
Justin Maggard 2014-01-31 16:25:43 -08:00
parent d248cd3a43
commit 16b0963a5b
2 changed files with 20 additions and 0 deletions

View File

@ -379,6 +379,7 @@ static const struct action X_MS_MediaReceiverRegistrarActions[] =
{ {
{"IsAuthorized", GetIsAuthorizedArgs}, /* R */ {"IsAuthorized", GetIsAuthorizedArgs}, /* R */
{"IsValidated", GetIsValidatedArgs}, /* R */ {"IsValidated", GetIsValidatedArgs}, /* R */
{"RegisterDevice", GetRegisterDeviceArgs},
{0, 0} {0, 0}
}; };

View File

@ -154,6 +154,24 @@ IsAuthorizedValidated(struct upnphttp * h, const char * action)
ClearNameValueList(&data); ClearNameValueList(&data);
} }
static void
RegisterDevice(struct upnphttp * h, const char * action)
{
static const char resp[] =
"<u:%sResponse "
"xmlns:u=\"%s\">"
"<RegistrationRespMsg>%s</RegistrationRespMsg>"
"</u:%sResponse>";
char body[512];
int bodylen;
bodylen = snprintf(body, sizeof(body), resp,
action, "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1",
uuidvalue, action);
BuildSendAndCloseSoapResp(h, body, bodylen);
}
static void static void
GetProtocolInfo(struct upnphttp * h, const char * action) GetProtocolInfo(struct upnphttp * h, const char * action)
{ {
@ -1840,6 +1858,7 @@ soapMethods[] =
{ "GetCurrentConnectionInfo", GetCurrentConnectionInfo}, { "GetCurrentConnectionInfo", GetCurrentConnectionInfo},
{ "IsAuthorized", IsAuthorizedValidated}, { "IsAuthorized", IsAuthorizedValidated},
{ "IsValidated", IsAuthorizedValidated}, { "IsValidated", IsAuthorizedValidated},
{ "RegisterDevice", RegisterDevice},
{ "X_GetFeatureList", SamsungGetFeatureList}, { "X_GetFeatureList", SamsungGetFeatureList},
{ "X_SetBookmark", SamsungSetBookmark}, { "X_SetBookmark", SamsungSetBookmark},
{ 0, 0 } { 0, 0 }