"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "upnpdescgen.c" between
minidlna-1.1.5.tar.gz and minidlna-1.2.0.tar.gz

About: ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.

upnpdescgen.c  (minidlna-1.1.5):upnpdescgen.c  (minidlna-1.2.0)
skipping to change at line 118 skipping to change at line 118
0, 0,
"", /* 48 */ "", /* 48 */
0 0
}; };
static const char xmlver[] = static const char xmlver[] =
"<?xml version=\"1.0\"?>\r\n"; "<?xml version=\"1.0\"?>\r\n";
static const char root_service[] = static const char root_service[] =
"scpd xmlns=\"urn:schemas-upnp-org:service-1-0\""; "scpd xmlns=\"urn:schemas-upnp-org:service-1-0\"";
static const char root_device[] = static const char root_device[] =
"root xmlns=\"urn:schemas-upnp-org:device-1-0\"" "root xmlns=\"urn:schemas-upnp-org:device-1-0\"";
#if PNPX
" xmlns:pnpx=\"http://schemas.microsoft.com/windows/pnpx/2005/11\""
" xmlns:df=\"http://schemas.microsoft.com/windows/2008/09/devicefoundatio
n\""
#endif
;
/* root Description of the UPnP Device */ /* root Description of the UPnP Device */
static const struct XMLElt rootDesc[] = static const struct XMLElt rootDesc[] =
{ {
{root_device, INITHELPER(1,2)}, {root_device, INITHELPER(1,2)},
{"specVersion", INITHELPER(3,2)}, {"specVersion", INITHELPER(3,2)},
{"device", INITHELPER(5,(14+PNPX))}, {"device", INITHELPER(5,(14))},
{"/major", "1"}, {"/major", "1"},
{"/minor", "0"}, {"/minor", "0"},
{"/deviceType", "urn:schemas-upnp-org:device:MediaServer:1"}, {"/deviceType", "urn:schemas-upnp-org:device:MediaServer:1"},
#if PNPX == 5
{"/pnpx:X_hardwareId", pnpx_hwid},
{"/pnpx:X_compatibleId", "MS_DigitalMediaDeviceClass_DMS_V001"},
{"/pnpx:X_deviceCategory", "MediaDevices"},
{"/df:X_deviceCategory", "Multimedia.DMS"},
{"/microsoft:magicPacketWakeSupported xmlns:microsoft=\"urn:schemas-micro
soft-com:WMPNSS-1-0\"", "0"},
#endif
{"/friendlyName", friendly_name}, /* required */ {"/friendlyName", friendly_name}, /* required */
{"/manufacturer", ROOTDEV_MANUFACTURER}, /* required */ {"/manufacturer", ROOTDEV_MANUFACTURER}, /* required */
{"/manufacturerURL", ROOTDEV_MANUFACTURERURL}, /* optional */ {"/manufacturerURL", ROOTDEV_MANUFACTURERURL}, /* optional */
{"/modelDescription", ROOTDEV_MODELDESCRIPTION}, /* recommended */ {"/modelDescription", ROOTDEV_MODELDESCRIPTION}, /* recommended */
{"/modelName", modelname}, /* required */ {"/modelName", modelname}, /* required */
{"/modelNumber", modelnumber}, {"/modelNumber", modelnumber},
{"/modelURL", ROOTDEV_MODELURL}, {"/modelURL", ROOTDEV_MODELURL},
{"/serialNumber", serialnumber}, {"/serialNumber", serialnumber},
{"/UDN", uuidvalue}, /* required */ {"/UDN", uuidvalue}, /* required */
{"/dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\"", "DMS-1 .50"}, {"/dlna:X_DLNADOC xmlns:dlna=\"urn:schemas-dlna-org:device-1-0\"", "DMS-1 .50"},
{"/presentationURL", presentationurl}, /* recommended */ {"/presentationURL", presentationurl}, /* recommended */
{"iconList", INITHELPER((19+PNPX),4)}, {"iconList", INITHELPER((19),4)},
{"serviceList", INITHELPER((43+PNPX),3)}, {"serviceList", INITHELPER((43),3)},
{"icon", INITHELPER((23+PNPX),5)}, {"icon", INITHELPER((23),5)},
{"icon", INITHELPER((28+PNPX),5)}, {"icon", INITHELPER((28),5)},
{"icon", INITHELPER((33+PNPX),5)}, {"icon", INITHELPER((33),5)},
{"icon", INITHELPER((38+PNPX),5)}, {"icon", INITHELPER((38),5)},
{"/mimetype", "image/png"}, {"/mimetype", "image/png"},
{"/width", "48"}, {"/width", "48"},
{"/height", "48"}, {"/height", "48"},
{"/depth", "24"}, {"/depth", "24"},
{"/url", "/icons/sm.png"}, {"/url", "/icons/sm.png"},
{"/mimetype", "image/png"}, {"/mimetype", "image/png"},
{"/width", "120"}, {"/width", "120"},
{"/height", "120"}, {"/height", "120"},
{"/depth", "24"}, {"/depth", "24"},
{"/url", "/icons/lrg.png"}, {"/url", "/icons/lrg.png"},
{"/mimetype", "image/jpeg"}, {"/mimetype", "image/jpeg"},
{"/width", "48"}, {"/width", "48"},
{"/height", "48"}, {"/height", "48"},
{"/depth", "24"}, {"/depth", "24"},
{"/url", "/icons/sm.jpg"}, {"/url", "/icons/sm.jpg"},
{"/mimetype", "image/jpeg"}, {"/mimetype", "image/jpeg"},
{"/width", "120"}, {"/width", "120"},
{"/height", "120"}, {"/height", "120"},
{"/depth", "24"}, {"/depth", "24"},
{"/url", "/icons/lrg.jpg"}, {"/url", "/icons/lrg.jpg"},
{"service", INITHELPER((46+PNPX),5)}, {"service", INITHELPER((46),5)},
{"service", INITHELPER((51+PNPX),5)}, {"service", INITHELPER((51),5)},
{"service", INITHELPER((56+PNPX),5)}, {"service", INITHELPER((56),5)},
{"/serviceType", "urn:schemas-upnp-org:service:ContentDirectory:1"}, {"/serviceType", "urn:schemas-upnp-org:service:ContentDirectory:1"},
{"/serviceId", "urn:upnp-org:serviceId:ContentDirectory"}, {"/serviceId", "urn:upnp-org:serviceId:ContentDirectory"},
{"/controlURL", CONTENTDIRECTORY_CONTROLURL}, {"/controlURL", CONTENTDIRECTORY_CONTROLURL},
{"/eventSubURL", CONTENTDIRECTORY_EVENTURL}, {"/eventSubURL", CONTENTDIRECTORY_EVENTURL},
{"/SCPDURL", CONTENTDIRECTORY_PATH}, {"/SCPDURL", CONTENTDIRECTORY_PATH},
{"/serviceType", "urn:schemas-upnp-org:service:ConnectionManager:1"}, {"/serviceType", "urn:schemas-upnp-org:service:ConnectionManager:1"},
{"/serviceId", "urn:upnp-org:serviceId:ConnectionManager"}, {"/serviceId", "urn:upnp-org:serviceId:ConnectionManager"},
{"/controlURL", CONNECTIONMGR_CONTROLURL}, {"/controlURL", CONNECTIONMGR_CONTROLURL},
{"/eventSubURL", CONNECTIONMGR_EVENTURL}, {"/eventSubURL", CONNECTIONMGR_EVENTURL},
{"/SCPDURL", CONNECTIONMGR_PATH}, {"/SCPDURL", CONNECTIONMGR_PATH},
skipping to change at line 207 skipping to change at line 195
}; };
/* For ConnectionManager */ /* For ConnectionManager */
static const struct argument GetProtocolInfoArgs[] = static const struct argument GetProtocolInfoArgs[] =
{ {
{"Source", 2, 0}, {"Source", 2, 0},
{"Sink", 2, 1}, {"Sink", 2, 1},
{NULL, 0, 0} {NULL, 0, 0}
}; };
static const struct argument PrepareForConnectionArgs[] =
{
{"RemoteProtocolInfo", 1, 6},
{"PeerConnectionManager", 1, 4},
{"PeerConnectionID", 1, 7},
{"Direction", 1, 5},
{"ConnectionID", 2, 7},
{"AVTransportID", 2, 8},
{"RcsID", 2, 9},
{NULL, 0, 0}
};
static const struct argument ConnectionCompleteArgs[] =
{
{"ConnectionID", 1, 7},
{NULL, 0, 0}
};
static const struct argument GetCurrentConnectionIDsArgs[] = static const struct argument GetCurrentConnectionIDsArgs[] =
{ {
{"ConnectionIDs", 2, 2}, {"ConnectionIDs", 2, 2},
{NULL, 0, 0} {NULL, 0, 0}
}; };
static const struct argument GetCurrentConnectionInfoArgs[] = static const struct argument GetCurrentConnectionInfoArgs[] =
{ {
{"ConnectionID", 1, 7}, {"ConnectionID", 1, 7},
{"RcsID", 2, 9}, {"RcsID", 2, 9},
skipping to change at line 247 skipping to change at line 217
{"PeerConnectionManager", 2, 4}, {"PeerConnectionManager", 2, 4},
{"PeerConnectionID", 2, 7}, {"PeerConnectionID", 2, 7},
{"Direction", 2, 5}, {"Direction", 2, 5},
{"Status", 2, 3}, {"Status", 2, 3},
{NULL, 0, 0} {NULL, 0, 0}
}; };
static const struct action ConnectionManagerActions[] = static const struct action ConnectionManagerActions[] =
{ {
{"GetProtocolInfo", GetProtocolInfoArgs}, /* R */ {"GetProtocolInfo", GetProtocolInfoArgs}, /* R */
//OPTIONAL {"PrepareForConnection", PrepareForConnectionArgs}, /* R */
//OPTIONAL {"ConnectionComplete", ConnectionCompleteArgs}, /* R */
{"GetCurrentConnectionIDs", GetCurrentConnectionIDsArgs}, /* R */ {"GetCurrentConnectionIDs", GetCurrentConnectionIDsArgs}, /* R */
{"GetCurrentConnectionInfo", GetCurrentConnectionInfoArgs}, /* R */ {"GetCurrentConnectionInfo", GetCurrentConnectionInfoArgs}, /* R */
{0, 0} {0, 0}
}; };
static const struct stateVar ConnectionManagerVars[] = static const struct stateVar ConnectionManagerVars[] =
{ {
{"SourceProtocolInfo", 0|EVENTED, 0, 0, 44}, /* required */ {"SourceProtocolInfo", 0|EVENTED, 0, 0, 44}, /* required */
{"SinkProtocolInfo", 0|EVENTED, 0, 0, 48}, /* required */ {"SinkProtocolInfo", 0|EVENTED, 0, 0, 48}, /* required */
{"CurrentConnectionIDs", 0|EVENTED, 0, 0, 46}, /* required */ {"CurrentConnectionIDs", 0|EVENTED, 0, 0, 46}, /* required */
skipping to change at line 271 skipping to change at line 239
{"A_ARG_TYPE_Direction", 0, 0, 33}, /* required */ {"A_ARG_TYPE_Direction", 0, 0, 33}, /* required */
{"A_ARG_TYPE_ProtocolInfo", 0, 0}, /* required */ {"A_ARG_TYPE_ProtocolInfo", 0, 0}, /* required */
{"A_ARG_TYPE_ConnectionID", 4, 0}, /* required */ {"A_ARG_TYPE_ConnectionID", 4, 0}, /* required */
{"A_ARG_TYPE_AVTransportID", 4, 0}, /* required */ {"A_ARG_TYPE_AVTransportID", 4, 0}, /* required */
{"A_ARG_TYPE_RcsID", 4, 0}, /* required */ {"A_ARG_TYPE_RcsID", 4, 0}, /* required */
{0, 0} {0, 0}
}; };
static const struct argument GetSearchCapabilitiesArgs[] = static const struct argument GetSearchCapabilitiesArgs[] =
{ {
{"SearchCaps", 2, 10}, {"SearchCaps", 2, 11},
{0, 0} {0, 0}
}; };
static const struct argument GetSortCapabilitiesArgs[] = static const struct argument GetSortCapabilitiesArgs[] =
{ {
{"SortCaps", 2, 11}, {"SortCaps", 2, 12},
{0, 0} {0, 0}
}; };
static const struct argument GetSystemUpdateIDArgs[] = static const struct argument GetSystemUpdateIDArgs[] =
{ {
{"Id", 2, 12}, {"Id", 2, 13},
{0, 0}
};
static const struct argument UpdateObjectArgs[] =
{
{"ObjectID", 1, 1},
{"CurrentTagValue", 1, 10},
{"NewTagValue", 1, 10},
{0, 0} {0, 0}
}; };
static const struct argument BrowseArgs[] = static const struct argument BrowseArgs[] =
{ {
{"ObjectID", 1, 1}, {"ObjectID", 1, 1},
{"BrowseFlag", 1, 4}, {"BrowseFlag", 1, 4},
{"Filter", 1, 5}, {"Filter", 1, 5},
{"StartingIndex", 1, 7}, {"StartingIndex", 1, 7},
{"RequestedCount", 1, 8}, {"RequestedCount", 1, 8},
skipping to change at line 324 skipping to change at line 300
{0, 0} {0, 0}
}; };
static const struct action ContentDirectoryActions[] = static const struct action ContentDirectoryActions[] =
{ {
{"GetSearchCapabilities", GetSearchCapabilitiesArgs}, /* R */ {"GetSearchCapabilities", GetSearchCapabilitiesArgs}, /* R */
{"GetSortCapabilities", GetSortCapabilitiesArgs}, /* R */ {"GetSortCapabilities", GetSortCapabilitiesArgs}, /* R */
{"GetSystemUpdateID", GetSystemUpdateIDArgs}, /* R */ {"GetSystemUpdateID", GetSystemUpdateIDArgs}, /* R */
{"Browse", BrowseArgs}, /* R */ {"Browse", BrowseArgs}, /* R */
{"Search", SearchArgs}, /* O */ {"Search", SearchArgs}, /* O */
{"UpdateObject", UpdateObjectArgs}, /* O */
#if 0 // Not implementing optional features yet... #if 0 // Not implementing optional features yet...
{"CreateObject", CreateObjectArgs}, /* O */ {"CreateObject", CreateObjectArgs}, /* O */
{"DestroyObject", DestroyObjectArgs}, /* O */ {"DestroyObject", DestroyObjectArgs}, /* O */
{"UpdateObject", UpdateObjectArgs}, /* O */
{"ImportResource", ImportResourceArgs}, /* O */ {"ImportResource", ImportResourceArgs}, /* O */
{"ExportResource", ExportResourceArgs}, /* O */ {"ExportResource", ExportResourceArgs}, /* O */
{"StopTransferResource", StopTransferResourceArgs}, /* O */ {"StopTransferResource", StopTransferResourceArgs}, /* O */
{"GetTransferProgress", GetTransferProgressArgs}, /* O */ {"GetTransferProgress", GetTransferProgressArgs}, /* O */
{"DeleteResource", DeleteResourceArgs}, /* O */ {"DeleteResource", DeleteResourceArgs}, /* O */
{"CreateReference", CreateReferenceArgs}, /* O */ {"CreateReference", CreateReferenceArgs}, /* O */
#endif #endif
{0, 0} {0, 0}
}; };
skipping to change at line 351 skipping to change at line 327
{"A_ARG_TYPE_ObjectID", 0, 0}, {"A_ARG_TYPE_ObjectID", 0, 0},
{"A_ARG_TYPE_Result", 0, 0}, {"A_ARG_TYPE_Result", 0, 0},
{"A_ARG_TYPE_SearchCriteria", 0, 0}, {"A_ARG_TYPE_SearchCriteria", 0, 0},
{"A_ARG_TYPE_BrowseFlag", 0, 0, 36}, {"A_ARG_TYPE_BrowseFlag", 0, 0, 36},
/* Allowed Values : BrowseMetadata / BrowseDirectChildren */ /* Allowed Values : BrowseMetadata / BrowseDirectChildren */
{"A_ARG_TYPE_Filter", 0, 0}, /* 5 */ {"A_ARG_TYPE_Filter", 0, 0}, /* 5 */
{"A_ARG_TYPE_SortCriteria", 0, 0}, {"A_ARG_TYPE_SortCriteria", 0, 0},
{"A_ARG_TYPE_Index", 3, 0}, {"A_ARG_TYPE_Index", 3, 0},
{"A_ARG_TYPE_Count", 3, 0}, {"A_ARG_TYPE_Count", 3, 0},
{"A_ARG_TYPE_UpdateID", 3, 0}, {"A_ARG_TYPE_UpdateID", 3, 0},
{"A_ARG_TYPE_TagValueList", 0, 0},
{"SearchCapabilities", 0, 0}, {"SearchCapabilities", 0, 0},
{"SortCapabilities", 0, 0}, {"SortCapabilities", 0, 0},
{"SystemUpdateID", 3|EVENTED, 0, 0, 255}, {"SystemUpdateID", 3|EVENTED, 0, 0, 255},
{0, 0} {0, 0}
}; };
static const struct argument GetIsAuthorizedArgs[] = static const struct argument GetIsAuthorizedArgs[] =
{ {
{"DeviceID", 1, 0}, {"DeviceID", 1, 0},
{"Result", 2, 3}, {"Result", 2, 3},
skipping to change at line 587 skipping to change at line 564
int tmplen; int tmplen;
struct XMLElt samsungRootDesc[sizeof(rootDesc)/sizeof(struct XMLElt)]; struct XMLElt samsungRootDesc[sizeof(rootDesc)/sizeof(struct XMLElt)];
tmplen = 2560; tmplen = 2560;
str = (char *)malloc(tmplen); str = (char *)malloc(tmplen);
if(str == NULL) if(str == NULL)
return NULL; return NULL;
* len = strlen(xmlver); * len = strlen(xmlver);
memcpy(str, xmlver, *len + 1); memcpy(str, xmlver, *len + 1);
/* Replace the optional modelURL and manufacturerURL fields with Samsung foo */ /* Replace the optional modelURL and manufacturerURL fields with Samsung foo */
memcpy(&samsungRootDesc, &rootDesc, sizeof(rootDesc)); memcpy(&samsungRootDesc, &rootDesc, sizeof(rootDesc));
samsungRootDesc[8+PNPX].eltname = "/sec:ProductCap"; samsungRootDesc[8].eltname = "/sec:ProductCap";
samsungRootDesc[8+PNPX].data = "smi,DCM10,getMediaInfo.sec,getCaptionInfo samsungRootDesc[8].data = "smi,DCM10,getMediaInfo.sec,getCaptionInfo.sec"
.sec"; ;
samsungRootDesc[12+PNPX].eltname = "/sec:X_ProductCap"; samsungRootDesc[12].eltname = "/sec:X_ProductCap";
samsungRootDesc[12+PNPX].data = "smi,DCM10,getMediaInfo.sec,getCaptionInf samsungRootDesc[12].data = "smi,DCM10,getMediaInfo.sec,getCaptionInfo.sec
o.sec"; ";
str = genXML(str, len, &tmplen, samsungRootDesc); str = genXML(str, len, &tmplen, samsungRootDesc);
str[*len] = '\0'; str[*len] = '\0';
return str; return str;
} }
/* genServiceDesc() : /* genServiceDesc() :
* Generate service description with allowed methods and * Generate service description with allowed methods and
* related variables. */ * related variables. */
static char * static char *
genServiceDesc(int * len, const struct serviceDesc * s) genServiceDesc(int * len, const struct serviceDesc * s)
 End of changes. 14 change blocks. 
55 lines changed or deleted 30 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS