00001
00002
00003
00004
00005
00006
00007
00008 #ifndef _COMMON_H
00009 #define _COMMON_H
00010
00011 #include "misc/util.h"
00012 #include <libintl.h>
00013 #include <string.h>
00014 #include <vdr/tools.h>
00015 #include <vdr/i18n.h>
00016 #include <vdr/remux.h>
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 #define IN
00065 #define OUT
00066 #define INOUT
00067
00068
00069
00070 #define TOSTRING(s) #s
00071
00072 #define FALSE 0
00073 #define TRUE 1
00074
00075 #define bool_t uint8_t
00076
00080 #ifndef _
00081 #define _(s) tr(s)
00082 #endif
00083
00084 #define KB(i) i*1024
00085 #define MB(i) i*KB(1024)
00086
00087 #define SIZEOF_UUID_STRING 37 // 00000000-0000-0000-0000-000000000000 = 32 + 4 + 1
00088
00089 #define strdup0(s) (s!=NULL?strdup(s):NULL)
00090
00091 #define att(s) strchr(s,'@')!=NULL?strchr(s,'@')+1:NULL
00092 #define prop(s) substr(s, 0, strchr(s,'@')-s)
00093
00094 void message(const char* File, int Line, const char* Format, ...) __attribute__ ((format (printf, 3, 4)));
00095
00096
00097
00098
00099
00100
00101
00102 #define VDR_RECORDFILE_PATTERN_PES "%s/%03d.vdr"
00103 #define VDR_RECORDFILE_PATTERN_TS "%s/%05d.ts"
00104 #define VDR_MAX_FILES_PER_RECORDING 65535
00105 #define VDR_FILENAME_BUFSIZE 2048
00106
00107
00108
00109
00110
00111
00112
00113 #define VERSION_INT(maj, min, mic) (maj<<16 | min<<8 | mic)
00114 #define VERSION_DOT(maj, min, mic) maj ##.## min ##.## mic
00115 #define VERSION_STR(maj, min, mic) TOSTRING(maj.min.mic)
00116
00117
00118
00119 #define PLUGIN_VERSION_MAJOR 0
00120 #define PLUGIN_VERSION_MINOR 0
00121 #define PLUGIN_VERSION_MICRO 1
00122
00123 #define PLUGIN_VERSION VERSION_STR(PLUGIN_VERSION_MAJOR, \
00124 PLUGIN_VERSION_MINOR, \
00125 PLUGIN_VERSION_MICRO)
00126
00127 #define PLUGIN_VERSION_INT VERSION_INT(PLUGIN_VERSION_MAJOR, \
00128 PLUGIN_VERSION_MINOR, \
00129 PLUGIN_VERSION_MICRO)
00130
00131
00132
00133
00134
00135
00136
00143 #define ERROR(s...) esyslog("UPnP server error:" s)
00144
00150 #define WARNING(s...) isyslog("UPnP server warning: " s)
00151
00157 #ifdef DEBUG
00158 #define MESSAGE(s...) message(__FILE__, __LINE__, "UPnP server message: " s)
00159 #else
00160 #define MESSAGE(s...) dsyslog("UPnP server message: " s)
00161 #endif
00162
00163
00164
00165
00166
00167
00168
00169
00170 #define PLUGIN_AUTHORS "Andreas Günther, Denis Loh"
00171
00172 #define PLUGIN_WEB_PAGE "http://upnp.methodus.de"
00173
00174 #define PLUGIN_DESCRIPTION "UPnP/DLNA compliant Media Server functionality for VDR"
00175
00176 #define PLUGIN_SHORT_NAME "DLNA/UPnP"
00177
00178 #define PLUGIN_NAME "VDR DLNA/UPnP Media Server"
00179
00180 #define PLUGIN_DOWNLOAD_PAGE PLUGIN_WEB_PAGE
00181
00182
00183
00184
00185
00186
00187
00188 #define SETUP_SERVER_ENABLED "ServerEnabled"
00189 #define SETUP_SERVER_INT "ServerInt"
00190 #define SETUP_SERVER_PORT "ServerPort"
00191 #define SETUP_SERVER_AUTO "ServerAutoDetect"
00192 #define SETUP_SERVER_ADDRESS "ServerAddress"
00193
00194
00195 #define SERVER_MIN_PORT 49152
00196 #define SERVER_MAX_PORT 65535
00197
00198 #define RECEIVER_LIVEBUFFER_SIZE MB(1)
00199 #define RECEIVER_OUTPUTBUFFER_SIZE MB(1)
00200 #define RECEIVER_RINGBUFFER_MARGIN 10*TS_SIZE
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211 #define UPNP_DEVICE_DESCRIPTION_MAX_LEN KB(20)
00212
00213 #define UPNP_SOAP_MAX_LEN KB(20)
00214
00215 #define UPNP_ANNOUNCE_MAX_AGE 1800
00216
00217
00218
00219 #define UPNP_MAX_RESOURCES_PER_OBJECT 16
00220
00221 enum UPNP_RESOURCE_TYPES {
00222 UPNP_RESOURCE_CHANNEL,
00223 UPNP_RESOURCE_RECORDING,
00224 UPNP_RESOURCE_FILE,
00225 UPNP_RESOURCE_URL
00226 };
00227
00228
00229
00230
00231
00232
00233
00234 #define UPNP_XMLNS_UPNP "urn:schemas-upnp-org:metadata-1-0/upnp/"
00235 #define UPNP_XMLNS_DIDL "urn:schemas-upnp-org:metadata-1-0/DIDL-Lite"
00236 #define UPNP_XMLNS_DLNA_META "urn:schemas-dlna-org:metadata-1-0/"
00237 #define UPNP_XMLNS_UPNP_DEV "urn:schemas-upnp-org:device-1-0"
00238 #define UPNP_XMLNS_DLNA_DEV "urn:schemas-dlna-org:device-1-0"
00239 #define UPNP_XMLNS_DUBLINCORE "http://purl.org/dc/elements/1.1/"
00240
00241 #define UPNP_XMLNS_PREFIX_UPNP "upnp"
00242 #define UPNP_XMLNS_PREFIX_DC "dc"
00243 #define UPNP_XMLNS_PREFIX_DIDL ""
00244 #define UPNP_XMLNS_PREFIX_DLNA "dlna"
00245
00246
00247
00248
00249
00250
00251
00252 #define UPNP_DIR_CONTROL "/control"
00253 #define UPNP_DIR_EVENT "/event"
00254 #define UPNP_DIR_XML "/xml"
00255 #define UPNP_DIR_SHARES "/shares"
00256 #define UPNP_DIR_PRESENTATION "/web"
00257 #define UPNP_DIR_ICONS "/icons"
00258
00259
00260
00261
00262
00263
00264
00265 #define UPNP_WEB_MAX_FILE_HANDLES 512
00266
00267 #define UPNP_WEB_PRESENTATION_URL "/index.html"
00268 #define UPNP_WEB_SERVER_ROOT_DIR UPNP_DIR_PRESENTATION
00269
00270 enum UPNP_WEB_METHODS {
00271 UPNP_WEB_METHOD_BROWSE,
00272 UPNP_WEB_METHOD_SHOW,
00273 UPNP_WEB_METHOD_STREAM,
00274 UPNP_WEB_METHOD_SEARCH,
00275 UPNP_WEB_METHOD_DOWNLOAD
00276 };
00277
00278
00279
00280
00281
00282
00283
00284
00285 #define UPNP_DEVICE_TYPE "urn:schemas-upnp-org:device:MediaServer:1"
00286
00287 #define UPNP_DEVICE_DESCRIPTION_PATH UPNP_WEB_SERVER_ROOT_DIR "/ms_desc.xml"
00288
00289 #define UPNP_DEVICE_UDN "uuid:b120ba52-d88d-4500-9b64-888971d83fd3"
00290
00291 #define UPNP_DEVICE_FRIENDLY_NAME PLUGIN_NAME
00292
00293 #define UPNP_DEVICE_MANUFACTURER PLUGIN_AUTHORS
00294
00295 #define UPNP_DEVICE_MANUFACTURER_URL PLUGIN_WEB_PAGE
00296
00297 #define UPNP_DEVICE_MODEL_DESCRIPTION PLUGIN_DESCRIPTION
00298
00299 #define UPNP_DEVICE_MODEL_NAME PLUGIN_NAME
00300
00301 #define UPNP_DEVICE_MODEL_NUMBER PLUGIN_VERSION
00302
00303
00304
00305 #define UPNP_DEVICE_MODEL_URL PLUGIN_DOWNLOAD_PAGE
00306
00307 #define UPNP_DEVICE_SERIAL_NUMBER "VDR_DLNAUPNP_" PLUGIN_VERSION
00308
00309 #define UPNP_DEVICE_ICON_JPEG_SM UPNP_DIR_ICONS "/upnpIconSm.jpeg"
00310 #define UPNP_DEVICE_ICON_JPEG_LRG UPNP_DIR_ICONS "/upnpIconLrg.jpeg"
00311 #define UPNP_DEVICE_ICON_PNG_SM UPNP_DIR_ICONS "/upnpIconSm.png"
00312 #define UPNP_DEVICE_ICON_PNG_LRG UPNP_DIR_ICONS "/upnpIconLrg.png"
00313
00314
00315
00316
00317
00318
00319
00320 #define UPNP_OBJECT_ITEM "item"
00321 #define UPNP_OBJECT_CONTAINER "container"
00322
00323 #define UPNP_PROP_OBJECTID "@id"
00324 #define UPNP_PROP_PARENTID "@parentID"
00325 #define UPNP_PROP_TITLE "dc:title"
00326 #define UPNP_PROP_CREATOR "dc:creator"
00327 #define UPNP_PROP_RESTRICTED "@restricted"
00328 #define UPNP_PROP_WRITESTATUS "upnp:writeStatus"
00329 #define UPNP_PROP_CLASS "upnp:class"
00330 #define UPNP_PROP_CLASSNAME UPNP_PROP_CLASS "@name"
00331 #define UPNP_PROP_SEARCHCLASS "upnp:searchClass"
00332 #define UPNP_PROP_SCLASSDERIVED UPNP_PROP_SEARCHCLASS "@includeDerived"
00333 #define UPNP_PROP_REFERENCEID UPNP_OBJECT_ITEM "@refID"
00334 #define UPNP_PROP_SCLASSNAME UPNP_PROP_SEARCHCLASS "@name"
00335 #define UPNP_PROP_SEARCHABLE UPNP_OBJECT_CONTAINER "@searchable"
00336 #define UPNP_PROP_CHILDCOUNT UPNP_OBJECT_CONTAINER "@childcount"
00337 #define UPNP_PROP_RESOURCE "res"
00338 #define UPNP_PROP_PROTOCOLINFO UPNP_PROP_RESOURCE "@protocolInfo"
00339 #define UPNP_PROP_SIZE UPNP_PROP_RESOURCE "@size"
00340 #define UPNP_PROP_DURATION UPNP_PROP_RESOURCE "@duration"
00341 #define UPNP_PROP_BITRATE UPNP_PROP_RESOURCE "@bitrate"
00342 #define UPNP_PROP_SAMPLEFREQUENCE UPNP_PROP_RESOURCE "@sampleFreq"
00343 #define UPNP_PROP_BITSPERSAMPLE UPNP_PROP_RESOURCE "@bitsPerSample"
00344 #define UPNP_PROP_NOAUDIOCHANNELS UPNP_PROP_RESOURCE "@nrAudioChannels"
00345 #define UPNP_PROP_COLORDEPTH UPNP_PROP_RESOURCE "@colorDepth"
00346 #define UPNP_PROP_RESOLUTION UPNP_PROP_RESOURCE "@resolution"
00347 #define UPNP_PROP_GENRE "upnp:genre"
00348 #define UPNP_PROP_LONGDESCRIPTION "upnp:longDescription"
00349 #define UPNP_PROP_PRODUCER "upnp:producer"
00350 #define UPNP_PROP_RATING "upnp:rating"
00351 #define UPNP_PROP_ACTOR "upnp:actor"
00352 #define UPNP_PROP_DIRECTOR "upnp:director"
00353 #define UPNP_PROP_DESCRIPTION "dc:description"
00354 #define UPNP_PROP_PUBLISHER "dc:publisher"
00355 #define UPNP_PROP_LANGUAGE "dc:language"
00356 #define UPNP_PROP_RELATION "dc:relation"
00357 #define UPNP_PROP_STORAGEMEDIUM "upnp:storageMedium"
00358 #define UPNP_PROP_DVDREGIONCODE "upnp:DVDRegionCode"
00359 #define UPNP_PROP_CHANNELNAME "upnp:channelName"
00360 #define UPNP_PROP_SCHEDULEDSTARTTIME "upnp:scheduledStartTime"
00361 #define UPNP_PROP_SCHEDULEDENDTIME "upnp:scheduledEndTime"
00362 #define UPNP_PROP_ICON "upnp:icon"
00363 #define UPNP_PROP_REGION "upnp:region"
00364 #define UPNP_PROP_CHANNELNR "upnp:channelNr"
00365 #define UPNP_PROP_RIGHTS "dc:rights"
00366 #define UPNP_PROP_RADIOCALLSIGN "upnp:radioCallSign"
00367 #define UPNP_PROP_RADIOSTATIONID "upnp:radioStationID"
00368 #define UPNP_PROP_RADIOBAND "upnp:radioBand"
00369 #define UPNP_PROP_CONTRIBUTOR "dc:contributor"
00370 #define UPNP_PROP_DATE "dc:date"
00371 #define UPNP_PROP_ALBUM "upnp:album"
00372 #define UPNP_PROP_ARTIST "upnp:artist"
00373 #define UPNP_PROP_DLNA_CONTAINERTYPE "dlna:container"
00374
00375 #define UPNP_DIDL_SKELETON "<DIDL-Lite "\
00376 "xmlns:dc=\"" UPNP_XMLNS_DUBLINCORE "\" "\
00377 "xmlns:upnp=\"" UPNP_XMLNS_UPNP "\" "\
00378 "xmlns:dlna=\"" UPNP_XMLNS_DLNA_META "\" "\
00379 "xmlns=\"" UPNP_XMLNS_DIDL "\"></DIDL-Lite>"
00380
00381
00382
00383
00384
00385
00386
00387
00388 #define UPNP_CMS_SCPD_URL UPNP_DIR_XML "/cms_scpd.xml"
00389 #define UPNP_CMS_CONTROL_URL UPNP_DIR_CONTROL "/cms_control"
00390 #define UPNP_CMS_EVENT_URL UPNP_DIR_EVENT "/cms_event"
00391 #define UPNP_CMS_SERVICE_ID "urn:upnp-org:serviceId:ConnectionManager"
00392 #define UPNP_CMS_SERVICE_TYPE "urn:schemas-upnp-org:service:ConnectionManager:1"
00393
00394
00395 #define UPNP_CMS_SUPPORTED_PROTOCOLS "http-get:*:video/mpeg:*," \
00396 "http-get:*:audio/mpeg:*"
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407 #define UPNP_CMS_ACTION_GETPROTOCOLINFO "GetProtocolInfo"
00408 #define UPNP_CMS_ACTION_GETCURRENTCONNECTIONIDS "GetCurrentConnectionIDs"
00409 #define UPNP_CMS_ACTION_GETCURRENTCONNECTIONINFO "GetCurrentConnectionInfo"
00410 #define UPNP_CMS_ACTION_PREPAREFORCONNECTION "PrepareForConnection"
00411 #define UPNP_CMS_ACTION_CONNECTIONCOMPLETE "ConnectionComplete"
00412
00413
00414
00415
00416
00417
00418
00419
00420 #define UPNP_CDS_SCPD_URL UPNP_DIR_XML "/cds_scpd.xml"
00421 #define UPNP_CDS_CONTROL_URL UPNP_DIR_CONTROL "/cds_control"
00422 #define UPNP_CDS_EVENT_URL UPNP_DIR_EVENT "/cds_event"
00423 #define UPNP_CDS_SERVICE_ID "urn:upnp-org:serviceId:ContentDirectory"
00424 #define UPNP_CDS_SERVICE_TYPE "urn:schemas-upnp-org:service:ContentDirectory:1"
00425
00426 #define UPNP_CDS_SEARCH_CAPABILITIES ""
00427 #define UPNP_CDS_SORT_CAPABILITIES UPNP_PROP_TITLE ","\
00428 UPNP_PROP_CREATOR ","\
00429 UPNP_PROP_WRITESTATUS ","\
00430 UPNP_PROP_DESCRIPTION ","\
00431 UPNP_PROP_GENRE ","\
00432 UPNP_PROP_LONGDESCRIPTION ","\
00433 UPNP_PROP_PUBLISHER
00434
00435
00436
00437
00438
00439
00440
00441
00442
00443
00444 #define UPNP_CDS_ACTION_SEARCHCAPABILITIES "GetSearchCapabilities"
00445 #define UPNP_CDS_ACTION_SORTCAPABILITIES "GetSortCapabilities"
00446 #define UPNP_CDS_ACTION_SYSTEMUPDATEID "GetSystemUpdateID"
00447 #define UPNP_CDS_ACTION_BROWSE "Browse"
00448 #define UPNP_CDS_ACTION_SEARCH "Search"
00449 #define UPNP_CDS_ACTION_CREATEOBJECT "CreateObject"
00450 #define UPNP_CDS_ACTION_DESTROYOBJECT "DestroyObject"
00451 #define UPNP_CDS_ACTION_UPDATEOBJECT "UpdateObject"
00452 #define UPNP_CDS_ACTION_IMPORTRESOURCE "ImportResource"
00453 #define UPNP_CDS_ACTION_EXPORTRESOURCE "ExportResource"
00454 #define UPNP_CDS_ACTION_STOPTRANSFERRES "StopTransferResource"
00455 #define UPNP_CDS_ACTION_TRANSFERPROGRESS "GetTransferProgress"
00456 #define UPNP_CDS_ACTION_DELETERESOURCE "DeleteResource"
00457 #define UPNP_CDS_ACTION_CREATEREFERENCE "CreateReference"
00458
00459
00460
00461
00462
00463
00464
00465 #define UPNP_AVT_SCPD_URL UPNP_DIR_XML "/avt_scpd.xml"
00466 #define UPNP_AVT_CONTROL_URL UPNP_DIR_CONTROL "/avt_control"
00467 #define UPNP_AVT_EVENT_URL UPNP_DIR_EVENT "/avt_event"
00468 #define UPNP_AVT_SERVICE_ID "urn:upnp-org:serviceID:AVTransport"
00469 #define UPNP_AVT_SERVICE_TYPE "urn:schemas-upnp-org:service:AVTransport:1"
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486 #define UPNP_CLASS_OBJECT "object"
00487 #define UPNP_CLASS_ITEM UPNP_CLASS_OBJECT "." "item"
00488 #define UPNP_CLASS_CONTAINER UPNP_CLASS_OBJECT "." "container"
00489 #define UPNP_CLASS_IMAGE UPNP_CLASS_ITEM "." "imageItem"
00490 #define UPNP_CLASS_AUDIO UPNP_CLASS_ITEM "." "audioItem"
00491 #define UPNP_CLASS_VIDEO UPNP_CLASS_ITEM "." "videoItem"
00492 #define UPNP_CLASS_PLAYLIST UPNP_CLASS_ITEM "." "playlistItem"
00493 #define UPNP_CLASS_TEXT UPNP_CLASS_ITEM "." "textItem"
00494 #define UPNP_CLASS_PHOTO UPNP_CLASS_IMAGE "." "photo"
00495 #define UPNP_CLASS_MUSICTRACK UPNP_CLASS_AUDIO "." "musikTrack"
00496 #define UPNP_CLASS_AUDIOBC UPNP_CLASS_AUDIO "." "audioBroadcast"
00497 #define UPNP_CLASS_AUDIOBOOK UPNP_CLASS_AUDIO "." "audioBook"
00498 #define UPNP_CLASS_MOVIE UPNP_CLASS_VIDEO "." "movie"
00499 #define UPNP_CLASS_VIDEOBC UPNP_CLASS_VIDEO "." "videoBroadcast"
00500 #define UPNP_CLASS_MUSICVIDCLIP UPNP_CLASS_VIDEO "." "musicVideoClip"
00501 #define UPNP_CLASS_PERSON UPNP_CLASS_CONTAINER "." "person"
00502 #define UPNP_CLASS_PLAYLISTCONT UPNP_CLASS_CONTAINER "." "playlistContainer"
00503 #define UPNP_CLASS_ALBUM UPNP_CLASS_CONTAINER "." "album"
00504 #define UPNP_CLASS_GENRE UPNP_CLASS_CONTAINER "." "genre"
00505 #define UPNP_CLASS_STORAGESYS UPNP_CLASS_CONTAINER "." "storageSystem"
00506 #define UPNP_CLASS_STORAGEVOL UPNP_CLASS_CONTAINER "." "storageVolume"
00507 #define UPNP_CLASS_STORAGEFOLD UPNP_CLASS_CONTAINER "." "storageFolder"
00508 #define UPNP_CLASS_MUSICARTIST UPNP_CLASS_PERSON "." "musicArtist"
00509 #define UPNP_CLASS_MUSICALBUM UPNP_CLASS_ALBUM "." "musicAlbum"
00510 #define UPNP_CLASS_PHOTOALBUM UPNP_CLASS_ALBUM "." "photoAlbum"
00511 #define UPNP_CLASS_MUSICGENRE UPNP_CLASS_GENRE "." "musicGenre"
00512 #define UPNP_CLASS_MOVIEGENRE UPNP_CLASS_GENRE "." "movieGenre"
00513
00514
00515
00516
00517
00518
00519
00520 #define UPNP_STORAGE_UNKNOWN "UNKNOWN"
00521 #define UPNP_STORAGE_DV "DV"
00522 #define UPNP_STORAGE_MINI_DV "MINI-DV"
00523 #define UPNP_STORAGE_VHS "VHS"
00524 #define UPNP_STORAGE_W_VHS "W-VHS"
00525 #define UPNP_STORAGE_S_VHS "S-VHS"
00526 #define UPNP_STORAGE_D_VHS "D-VHS"
00527 #define UPNP_STORAGE_VHSC "VHSC"
00528 #define UPNP_STORAGE_VIDEO8 "VIDEO8"
00529 #define UPNP_STORAGE_HI8 "HI8"
00530 #define UPNP_STORAGE_CD_ROM "CD-ROM"
00531 #define UPNP_STORAGE_CD_DA "CD-DA"
00532 #define UPNP_STORAGE_CD_R "CD-R"
00533 #define UPNP_STORAGE_CD_RW "CD-RW"
00534 #define UPNP_STORAGE_VIDEO_CD "VIDEO-CD"
00535 #define UPNP_STORAGE_SACD "SACD"
00536 #define UPNP_STORAGE_MD_AUDIO "MD-AUDIO"
00537 #define UPNP_STORAGE_MD_PICTURE "MD-PICTURE"
00538 #define UPNP_STORAGE_DVD_ROM "DVD-ROM"
00539 #define UPNP_STORAGE_DVD_VIDEO "DVD-VIDEO"
00540 #define UPNP_STORAGE_DVD_R_MINUS "DVD-R"
00541 #define UPNP_STORAGE_DVD_RW_PLUS "DVD+RW"
00542 #define UPNP_STORAGE_DVD_RW_MINUS "DVD-RW"
00543 #define UPNP_STORAGE_DVD_RAM "DVD-RAM"
00544 #define UPNP_STORAGE_DVD_AUDIO "DVD-AUDIO"
00545 #define UPNP_STORAGE_DAT "DAT"
00546 #define UPNP_STORAGE_LD "LD"
00547 #define UPNP_STORAGE_HDD "HDD"
00548 #define UPNP_STORAGE_MICRO_MV "MICRO-MV"
00549 #define UPNP_STORAGE_NETWORK "NETWORK"
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563 #define UPNP_SOAP_E_ARGUMENT_INVALID 600
00564 #define UPNP_SOAP_E_ARGUMENT_OUT_OF_RANGE 601
00565 #define UPNP_SOAP_E_ACTION_NOT_IMPLEMENTED 602
00566 #define UPNP_SOAP_E_OUT_OF_MEMORY 603
00567 #define UPNP_SOAP_E_HUMAN_INTERVENTION 604
00568 #define UPNP_SOAP_E_STRING_TO_LONG 605
00569 #define UPNP_SOAP_E_NOT_AUTHORIZED 606
00570 #define UPNP_SOAP_E_SIGNATURE_FAILURE 607
00571 #define UPNP_SOAP_E_SIGNATURE_MISSING 608
00572 #define UPNP_SOAP_E_NOT_ENCRYPTED 609
00573 #define UPNP_SOAP_E_INVALID_SEQUENCE 610
00574 #define UPNP_SOAP_E_INVALID_CONTROL_URL 611
00575 #define UPNP_SOAP_E_NO_SUCH_SESSION 612
00576
00577
00578
00579 #define UPNP_CDS_E_NO_SUCH_OBJECT 701
00580 #define UPNP_CDS_E_INVALID_CURRENT_TAG 702
00581 #define UPNP_CDS_E_INVALID_NEW_TAG 703
00582 #define UPNP_CDS_E_REQUIRED_TAG 704
00583 #define UPNP_CDS_E_READ_ONLY_TAG 705
00584 #define UPNP_CDS_E_PARAMETER_MISMATCH 706
00585 #define UPNP_CDS_E_INVALID_SEARCH_CRITERIA 708
00586 #define UPNP_CDS_E_INVALID_SORT_CRITERIA 709
00587 #define UPNP_CDS_E_NO_SUCH_CONTAINER 710
00588 #define UPNP_CDS_E_RESTRICTED_OBJECT 711
00589 #define UPNP_CDS_E_BAD_METADATA 712
00590 #define UPNP_CDS_E_RESTRICTED_PARENT 713
00591 #define UPNP_CDS_E_NO_SUCH_SOURCE_RESOURCE 714
00592 #define UPNP_CDS_E_RESOURCE_ACCESS_DENIED 715
00593 #define UPNP_CDS_E_TRANSFER_BUSY 716
00594 #define UPNP_CDS_E_NO_SUCH_FILE_TRANSFER 717
00595 #define UPNP_CDS_E_NO_SUCH_DESTINATION_RESOURCE 718
00596 #define UPNP_CDS_E_DEST_RESOURCE_ACCESS_DENIED 719
00597 #define UPNP_CDS_E_CANT_PROCESS_REQUEST 720
00598
00599 #define UPNP_CMS_E_INCOMPATIBLE_PROTOCOL_INFO 701
00600 #define UPNP_CMS_E_INCOMPATIBLE_DIRECTIONS 702
00601 #define UPNP_CMS_E_INSUFFICIENT_RESOURCES 703
00602 #define UPNP_CMS_E_LOCAL_RESTRICTIONS 704
00603 #define UPNP_CMS_E_ACCESS_DENIED 705
00604 #define UPNP_CMS_E_INVALID_CONNECTION_REFERENCE 706
00605 #define UPNP_CMS_E_NOT_IN_NETWORK 707
00606
00607
00608
00609
00610
00611
00612
00613 enum UPnPWriteStatus {
00614 WS_UNKNOWN=0,
00615 WS_WRITABLE,
00616 WS_PROTECTED,
00617 WS_NOT_WRITABLE,
00618 WS_MIXED
00619 };
00620
00621
00622
00623
00624
00625
00626
00627 #define DLNA_PROTOCOL_VERSION_MAJOR 1
00628 #define DLNA_PROTOCOL_VERSION_MINOR 5
00629 #define DLNA_PROTOCOL_VERSION_MICRO 0
00630
00631 #define DLNA_PROTOCOL_VERSION_INT VERSION_INT(DLNA_PROTOCOL_VERSION_MAJOR, \
00632 DLNA_PROTOCOL_VERSION_MINOR, \
00633 DLNA_PROTOCOL_VERSION_MICRO)
00634
00635 #define DLNA_PROTOCOL_VERSION_STR VERSION_STR(DLNA_PROTOCOL_VERSION_MAJOR, \
00636 DLNA_PROTOCOL_VERSION_MINOR, \
00637 DLNA_PROTOCOL_VERSION_MICRO)
00638
00639
00640
00641
00642
00643
00644
00651 #define DLNA_OPERATION_NONE 00
00652 #define DLNA_OPERATION_TIME_SEEK_RANGE 10
00653 #define DLNA_OPERATION_RANGE 01
00654
00655 #define DLNA_CONVERSION_TRANSCODED 1
00656 #define DLNA_CONVERSION_NONE 0
00657
00658 #define DLNA_SUPPORTED_PLAYSPEEDS "2,4,8,-2,-4,-8";
00659
00660 #define DLNA_TRANSFER_PROTOCOL_HTTP 1
00661 #define DLNA_TRANSFER_PROTOCOL_RTP 2
00662
00663
00664
00665
00666
00667
00668
00669 #define DLNA_FLAG_SENDER_PACED 1 << 31
00670 #define DLNA_FLAG_TIME_BASED_SEEK 1 << 30
00671 #define DLNA_FLAG_BYTE_BASED_SEEK 1 << 29
00672 #define DLNA_FLAG_PLAY_CONTAINER 1 << 28
00673 #define DLNA_FLAG_S0_INCREASE 1 << 27
00674 #define DLNA_FLAG_SN_INCREASE 1 << 26
00675 #define DLNA_FLAG_RTSP_PAUSE 1 << 25
00676 #define DLNA_FLAG_STREAMING_TRANSFER 1 << 24
00677 #define DLNA_FLAG_INTERACTIVE_TRANSFER 1 << 23
00678 #define DLNA_FLAG_BACKGROUND_TRANSFER 1 << 22
00679 #define DLNA_FLAG_CONNECTION_STALLING 1 << 21
00680 #define DLNA_FLAG_VERSION_1_5 1 << 20
00681 #define DLNA_FLAG_CLEARTEXT_CONTENT 1 << 16
00682 #define DLNA_FLAG_CLEARTEXT_BYTE_FULL_SEEK 1 << 15
00683 #define DLNA_FLAG_CLEARTEXT_LIMITED_SEEK 1 << 14
00684
00685 #define DLNA_FLAGS_PLUGIN_SUPPORT DLNA_FLAG_BYTE_BASED_SEEK | \
00686 DLNA_FLAG_SN_INCREASE | \
00687 DLNA_FLAG_STREAMING_TRANSFER | \
00688 DLNA_FLAG_BACKGROUND_TRANSFER | \
00689 DLNA_FLAG_CONNECTION_STALLING | \
00690 DLNA_FLAG_VERSION_1_5
00691
00692
00693
00694
00695
00696
00697
00705 struct DLNAProfile {
00706 const char* ID;
00707 const char* mime;
00708 };
00709
00716 struct DLNAIconProfile {
00717 const char* mime;
00718 unsigned short width;
00719 unsigned short height;
00720 unsigned char bitDepth;
00721 };
00722
00723
00724
00725 extern DLNAProfile DLNA_PROFILE_MPEG1_L3;
00726
00727 extern DLNAProfile DLNA_PROFILE_MPEG_TS_SD_EU;
00728 extern DLNAProfile DLNA_PROFILE_AVC_TS_HD_EU;
00729
00730
00731 extern DLNAIconProfile DLNA_ICON_JPEG_SM_24;
00732 extern DLNAIconProfile DLNA_ICON_JPEG_LRG_24;
00733 extern DLNAIconProfile DLNA_ICON_PNG_SM_24A;
00734 extern DLNAIconProfile DLNA_ICON_PNG_LRG_24A;
00735
00736
00737
00738
00739
00740
00741
00742 enum DLNAContainerTypes {
00743 TUNER_1_0
00744 };
00745
00746 #define DLNA_CONTAINER_TUNER "Tuner_1_0" // The DLNA container type for a tuner
00747
00748
00749
00750
00751
00752
00753
00754 #define DLNA_DEVICE_DMS_1_0 "DMS-1.00"
00755 #define DLNA_DEVICE_DMS_1_5 "DMS-1.50"
00756
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768 #define SQLITE_DB_FILE "metadata.db"
00769
00770
00771
00772
00773
00774
00775
00776
00777 #endif
00778