00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef CDIDLLITE_H
00010 #define CDIDLLITE_H
00011
00012 #include <cybergarage/xml/cxml.h>
00013
00014
00015
00016
00017 #define DIDL_LITE_NAME "DIDL-Lite"
00018 #define DIDL_LITE_XMLNS "xmlns"
00019 #define DIDL_LITE_XMLNS_URL "urn:schemas-upnp-org:metadata-1-0/DIDL-Lite"
00020 #define DIDL_LITE_XMLNS_DC "xmlns:dc"
00021 #define DIDL_LITE_XMLNS_DC_URL "http://purl.org/dc/elements/1.1"
00022 #define DIDL_LITE_XMLNS_UPNP "xmlns:upnp"
00023 #define DIDL_LITE_XMLNS_UPNP_URL "urn:schemas-upnp-org:metadata-1-0/upnp"
00024
00025
00026
00027
00028 #define DIDL_LITE_CONTAINER "container"
00029 #define DIDL_LITE_CONTAINER_SEARCHABLE "searchable"
00030 #define DIDL_LITE_CONTAINER_CHILDCOUNT "childCount"
00031
00036 static const char* searchable_deprecated = "searchable";
00037 static inline const char* didl_lite_searchable_deprecated()
00038 {
00039 fprintf(stderr, "\nWarning: Deprecated clinkc-av macro DIDL_LITE_SEARCHABLE used!\n");
00040 return searchable_deprecated;
00041 }
00042 #define DIDL_LITE_SEARCHABLE didl_lite_searchable_deprecated()
00043
00048 static const char* childcount_deprecated = "childCount";
00049 static inline const char* didl_lite_childcount_deprecated()
00050 {
00051 fprintf(stderr, "\nWarning: Deprecated clinkc-av macro DIDL_LITE_CHILDCOUNT used!\n");
00052 return childcount_deprecated;
00053 }
00054 #define DIDL_LITE_CHILDCOUNT didl_lite_childcount_deprecated()
00055
00056
00057
00058
00059 #define DIDL_LITE_ITEM "item"
00060 #define DIDL_LITE_ITEM_ID "id"
00061 #define DIDL_LITE_ITEM_REFID "refID"
00062
00067 static const char* id_deprecated = "id";
00068 static inline const char* didl_lite_id_deprecated()
00069 {
00070 fprintf(stderr, "\nWarning: Deprecated clinkc-av macro DIDL_LITE_ID used!\n");
00071 return id_deprecated;
00072 }
00073 #define DIDL_LITE_ID didl_lite_id_deprecated()
00074
00079 static const char* parentid_deprecated = "parentID";
00080 static inline const char* didl_lite_parentid_deprecated()
00081 {
00082 fprintf(stderr, "\nWarning: Deprecated clinkc-av macro DIDL_LITE_PARENTID used!\n");
00083 return parentid_deprecated;
00084 }
00085 #define DIDL_LITE_PARENTID didl_lite_parentid_deprecated()
00086
00091 static const char* resticted_deprecated = "restricted";
00092 static inline const char* didl_lite_resticted_deprecated()
00093 {
00094 fprintf(stderr, "\nWarning: Deprecated clinkc-av macro DIDL_LITE_RESTICTED used!\n");
00095 return resticted_deprecated;
00096 }
00097 #define DIDL_LITE_RESTICTED didl_lite_resticted_deprecated()
00098
00099
00100
00101
00102 #define DIDL_LITE_OBJECT_ID "id"
00103 #define DIDL_LITE_OBJECT_PARENTID "parentID"
00104 #define DIDL_LITE_OBJECT_RESTRICTED "restricted"
00105
00106
00107
00108
00109 #define DIDL_LITE_DESC "desc"
00110
00111
00112
00113
00114 #define DIDL_LITE_RES "res"
00115 #define DIDL_LITE_RES_SIZE "size"
00116 #define DIDL_LITE_RES_DURATION "duration"
00117 #define DIDL_LITE_RES_BITRATE "bitrate"
00118 #define DIDL_LITE_RES_SAMPLEFREQUENCY "sampleFrequency"
00119 #define DIDL_LITE_RES_BITSPERSAMPLE "bitsPerSample"
00120 #define DIDL_LITE_RES_NRAUDIOCHANNELS "nrAudioChannels"
00121 #define DIDL_LITE_RES_RESOLUTION "resolution"
00122 #define DIDL_LITE_RES_COLORDEPTH "colorDepth"
00123 #define DIDL_LITE_RES_PROTOCOLINFO "protocolInfo"
00124 #define DIDL_LITE_RES_PROTECTION "protection"
00125 #define DIDL_LITE_RES_IMPORTURI "importUri"
00126
00127
00128
00129
00130 #define DIDL_LITE_UPNP_ACTOR "upnp:actor"
00131 #define DIDL_LITE_UPNP_ACTOR_ROLE "role"
00132 #define DIDL_LITE_UPNP_ALBUM "upnp:album"
00133 #define DIDL_LITE_UPNP_ALBUMARTURI "upnp:albumArtURI"
00134 #define DIDL_LITE_UPNP_ARTIST "upnp:artist"
00135 #define DIDL_LITE_UPNP_ARTIST_ROLE "role"
00136 #define DIDL_LITE_UPNP_ARTISTDISCOGRAPHYURI "upnp:artistDiscographyURI"
00137 #define DIDL_LITE_UPNP_AUTHOR "upnp:author"
00138 #define DIDL_LITE_UPNP_AUTHOR_ROLE "role"
00139 #define DIDL_LITE_UPNP_CHANNELNAME "upnp:channelName"
00140 #define DIDL_LITE_UPNP_CHANNELNR "upnp:channelNr"
00141 #define DIDL_LITE_UPNP_CLASS "upnp:class"
00142 #define DIDL_LITE_UPNP_CREATECLASS "upnp:createClass"
00143 #define DIDL_LITE_UPNP_CREATECLASS_INCLUDEDERIVED "includeDerived"
00144 #define DIDL_LITE_UPNP_CREATECLASS_NAME "name"
00145 #define DIDL_LITE_UPNP_DIRECTOR "upnp:director"
00146 #define DIDL_LITE_UPNP_DVDREGIONCODE "upnp:DVDRegionCode"
00147 #define DIDL_LITE_UPNP_GENRE "upnp:genre"
00148 #define DIDL_LITE_UPNP_ICON "upnp:icon"
00149 #define DIDL_LITE_UPNP_LONGDESCRIPTION "upnp:longDescription"
00150 #define DIDL_LITE_UPNP_LYRICSURI "upnp:lyricsURI"
00151 #define DIDL_LITE_UPNP_ORIGINALTRACKNUMBER "upnp:originalTrackNumber"
00152 #define DIDL_LITE_UPNP_PLAYLIST "upnp:playlist"
00153 #define DIDL_LITE_UPNP_PRODUCER "upnp:producer"
00154 #define DIDL_LITE_UPNP_PROTECTION "upnp:protection"
00155 #define DIDL_LITE_UPNP_RADIOBAND "upnp:radioBand"
00156 #define DIDL_LITE_UPNP_RADIOCALLSIGN "upnp:radioCallSign"
00157 #define DIDL_LITE_UPNP_RADIOSTATIONID "upnp:radioStationID"
00158 #define DIDL_LITE_UPNP_RATING "upnp:rating"
00159 #define DIDL_LITE_UPNP_REGION "upnp:region"
00160 #define DIDL_LITE_UPNP_SCHEDULEDENDTIME "upnp:scheduledEndTime"
00161 #define DIDL_LITE_UPNP_SCHEDULEDSTARTTIME "upnp:scheduledStartTime"
00162 #define DIDL_LITE_UPNP_SEARCHCLASS "upnp:searchClass"
00163 #define DIDL_LITE_UPNP_SEARCHCLASS_INCLUDEDERIVED "includeDerived"
00164 #define DIDL_LITE_UPNP_SEARCHCLASS_NAME "name"
00165 #define DIDL_LITE_UPNP_STORAGEFREE "upnp:storageFree"
00166 #define DIDL_LITE_UPNP_STORAGEMAXPARTITION "upnp:storageMaxPartition"
00167 #define DIDL_LITE_UPNP_STORAGEMEDIUM "upnp:storageMedium"
00168 #define DIDL_LITE_UPNP_STORAGETOTAL "upnp:storageTotal"
00169 #define DIDL_LITE_UPNP_STORAGEUSED "upnp:storageUsed"
00170 #define DIDL_LITE_UPNP_TOC "upnp:toc"
00171 #define DIDL_LITE_UPNP_USERANNOTATION "upnp:userAnnotation"
00172 #define DIDL_LITE_UPNP_WRITESTATUS "upnp:writeStatus"
00173
00174
00175
00176
00177 #define DIDL_LITE_DC_CONTRIBUTOR "dc:contributor"
00178 #define DIDL_LITE_DC_CREATOR "dc:creator"
00179 #define DIDL_LITE_DC_DATE "dc:date"
00180 #define DIDL_LITE_DC_DESCRIPTION "dc:description"
00181 #define DIDL_LITE_DC_LANGUAGE "dc:language"
00182 #define DIDL_LITE_DC_PUBLISHER "dc:publisher"
00183 #define DIDL_LITE_DC_RELATION "dc:relation"
00184 #define DIDL_LITE_DC_RIGHTS "dc:rights"
00185 #define DIDL_LITE_DC_TITLE "dc:title"
00186
00187
00188
00189
00190 #define DIDL_LITE_OBJECT "object"
00191
00192 #define DIDL_LITE_OBJECT_ITEM "object.item"
00193 #define DIDL_LITE_OBJECT_ITEM_IMAGEITEM "object.item.imageItem"
00194 #define DIDL_LITE_OBJECT_ITEM_IMAGEITEM_PHOTO "object.item.imageItem.photo"
00195 #define DIDL_LITE_OBJECT_ITEM_AUDIOITEM "object.item.audioItem"
00196 #define DIDL_LITE_OBJECT_ITEM_AUDIOITEM_MUSICTRACK "object.item.audioItem.musicTrack"
00197 #define DIDL_LITE_OBJECT_ITEM_AUDIOITEM_AUDIOBROADCAST "object.item.audioItem.audioBroadcast"
00198 #define DIDL_LITE_OBJECT_ITEM_AUDIOITEM_AUDIOBOOK "object.item.audioItemaudioBook"
00199 #define DIDL_LITE_OBJECT_ITEM_VIDEOITEM "object.item.videoItem"
00200 #define DIDL_LITE_OBJECT_ITEM_VIDEOITEM_MOVIE "object.item.videoItem.movie"
00201 #define DIDL_LITE_OBJECT_ITEM_VIDEOITEM_VIDEOBROADCAST "object.item.videoItem.videoBroadcast"
00202 #define DIDL_LITE_OBJECT_ITEM_VIDEOITEM_MUSICVIDEOCLIP "object.item.videoItem.musicVideoClip"
00203 #define DIDL_LITE_OBJECT_ITEM_PLAYLISTITEM "object.item.playlistItem"
00204 #define DIDL_LITE_OBJECT_ITEM_TEXTITEM "object.item.textItem"
00205
00206 #define DIDL_LITE_OBJECT_CONTAINER "object.container"
00207 #define DIDL_LITE_OBJECT_CONTAINER_PERSON "object.container.person"
00208 #define DIDL_LITE_OBJECT_CONTAINER_PERSON_MUSICARTIST "object.container.person.musicArtist"
00209 #define DIDL_LITE_OBJECT_CONTAINER_PLAYLISTCONTAINER "object.container.playlistContainer"
00210 #define DIDL_LITE_OBJECT_CONTAINER_ALBUM "object.container.album"
00211 #define DIDL_LITE_OBJECT_CONTAINER_ALBUM_MUSICALBUM "object.container.album.musicAlbum"
00212 #define DIDL_LITE_OBJECT_CONTAINER_ALBUM_PHOTOALBUM "object.container.album.photoAlbum"
00213 #define DIDL_LITE_OBJECT_CONTAINER_GENRE "object.container.genre"
00214 #define DIDL_LITE_OBJECT_CONTAINER_GENRE_MUSICGENRE "object.container.genre.musicGenre"
00215 #define DIDL_LITE_OBJECT_CONTAINER_GENRE_MOVIEGENRE "object.container.genre.movieGenre"
00216 #define DIDL_LITE_OBJECT_CONTAINER_STORAGESYSTEM "object.container.storageSystem"
00217 #define DIDL_LITE_OBJECT_CONTAINER_STORAGEVOLUME "object.container.storageVolume"
00218 #define DIDL_LITE_OBJECT_CONTAINER_STORAGEFOLDER "object.container.storageFolder"
00219
00220
00221
00222
00223
00234 CgXmlNodeList* cg_upnp_av_cds_didllite_getchildren(CgXmlNodeList* nodelist,
00235 BOOL strict);
00236
00244 char* cg_upnp_av_cds_didllite_res_getprotocol(CgXmlNode* resNode);
00245
00253 char* cg_upnp_av_cds_didllite_res_getnetwork(CgXmlNode* resNode);
00254
00262 char* cg_upnp_av_cds_didllite_res_getmimetype(CgXmlNode* resNode);
00263
00271 char* cg_upnp_av_cds_didllite_res_getadditionalinfo(CgXmlNode* resNode);
00272
00273
00274
00275
00276
00282 #define cg_upnp_av_cds_didllite_node_getname(node) \
00283 cg_xml_node_getname(node)
00284
00291 #define cg_upnp_av_cds_didllite_node_setname(node, name) \
00292 cg_xml_node_setname(node, name)
00293
00299 #define cg_upnp_av_cds_didllite_node_iscontainer(node) \
00300 ( (cg_strcmp(cg_xml_node_getname(node), DIDL_LITE_CONTAINER) == 0) ? \
00301 TRUE : FALSE )
00302
00303 #define cg_upnp_av_cds_didllite_node_isname(node, nodename) \
00304 cg_xml_node_isname(node, nodename)
00305
00306
00307
00308
00309
00315 #define cg_upnp_av_cds_didllite_node_getvalue(node) \
00316 cg_xml_node_getvalue(node)
00317
00324 #define cg_upnp_av_cds_didllite_node_setvalue(node, value) \
00325 cg_xml_node_setvalue(node, value)
00326
00327
00328
00329
00330
00337 #define cg_upnp_av_cds_didllite_node_getattribute(node, attribute) \
00338 cg_xml_node_getattributevalue(node, attribute)
00339
00346 #define cg_upnp_av_cds_didllite_node_setattribute(node, attribute) \
00347 cg_xml_node_setattributevalue(node, attribute)
00348
00349
00350
00351
00352
00357 #define cg_upnp_av_cds_didllite_node_next(node) \
00358 cg_xml_node_next(node)
00359
00360
00361
00362
00363
00371 #define cg_upnp_av_cds_didllite_node_getchildnodelist(node) \
00372 cg_xml_node_getchildnodelist(node)
00373
00381 #define cg_upnp_av_cds_didllite_nodelist_gets(nodelist) \
00382 cg_xml_nodelist_gets(nodelist)
00383
00384 #endif