1/* MiniDLNA project 2 * http://minidlna.sourceforge.net/ 3 * (c) 2008-2009 Justin Maggard 4 * 5 * This software is subject to the conditions detailed 6 * in the LICENCE file provided within the distribution 7 * 8 * Portions of the code from the MiniUPnP Project 9 * (c) Thomas Bernard licensed under BSD revised license 10 * detailed in the LICENSE.miniupnpd file provided within 11 * the distribution. 12 */ 13#ifndef __UPNPGLOBALVARS_H__ 14#define __UPNPGLOBALVARS_H__ 15 16#include <time.h> 17#include <linux/types.h> // Defines __u32 18 19#include "minidlnatypes.h" 20#include "config.h" 21 22#include <sqlite3.h> 23 24#define MINIDLNA_VERSION "1.0.18" 25 26#define CLIENT_CACHE_SLOTS 20 27#define USE_FORK 1 28#define DB_VERSION 5 29 30#ifdef ENABLE_NLS 31#define _(string) gettext(string) 32#else 33#define _(string) (string) 34#endif 35 36#if 0 // Add these once the newer ffmpeg libs that can detect WMAPRO are more widely used 37 "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," 38 "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," 39#endif 40#define RESOURCE_PROTOCOL_INFO_VALUES \ 41 "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN," \ 42 "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 43 "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 44 "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 45 "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 46 "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 47 "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_HD_NA_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 48 "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 49 /*"http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/ \ 50 /*"http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/\ 51 /*"http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AC3;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/\ 52 "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 53 /*"http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_T;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/\ 54 /*"http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/\ 55 "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_BASE;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 56 "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 57 "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 58 "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \ 59 /*"http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/\ 60 /*"http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR;DLNA.ORG_OP=01;DLNA.ORG_CI=0," \*/\ 61 "http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01," \ 62 "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01," \ 63 "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=01," \ 64 "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO;DLNA.ORG_OP=01," \ 65 "http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01," \ 66 "http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01," \ 67 /*"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01," \*/\ 68 /*"http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO;DLNA.ORG_OP=01," \*/\ 69 "http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01," \ 70 "http-get:*:image/jpeg:*," \ 71 "http-get:*:video/avi:*," \ 72 "http-get:*:video/divx:*," \ 73 "http-get:*:video/x-matroska:*," \ 74 "http-get:*:video/mpeg:*," \ 75 "http-get:*:video/mp4:*," \ 76 "http-get:*:video/x-ms-wmv:*," \ 77 "http-get:*:video/x-msvideo:*," \ 78 "http-get:*:video/x-flv:*," \ 79 "http-get:*:video/x-tivo-mpeg:*," \ 80 "http-get:*:video/quicktime:*," \ 81 "http-get:*:audio/mp4:*," \ 82 "http-get:*:audio/x-wav:*," \ 83 "http-get:*:audio/x-flac:*," \ 84 "http-get:*:application/ogg:*" 85 86/* statup time */ 87extern time_t startup_time; 88 89extern struct runtime_vars_s runtime_vars; 90/* runtime boolean flags */ 91extern int runtime_flags; 92#define INOTIFY_MASK 0x0001 93#define TIVO_MASK 0x0002 94#define DLNA_STRICT_MASK 0x0004 95 96#define SETFLAG(mask) runtime_flags |= mask 97#define GETFLAG(mask) runtime_flags & mask 98#define CLEARFLAG(mask) runtime_flags &= ~mask 99 100extern const char * pidfilename; 101 102extern char uuidvalue[]; 103 104#define SERIALNUMBER_MAX_LEN (10) 105extern char serialnumber[]; 106 107#define MODELNUMBER_MAX_LEN (48) 108extern char modelnumber[]; 109 110#define PRESENTATIONURL_MAX_LEN (64) 111extern char presentationurl[]; 112 113/* lan addresses */ 114/* MAX_LAN_ADDR : maximum number of interfaces 115 * to listen to SSDP traffic */ 116#define MAX_LAN_ADDR (4) 117extern int n_lan_addr; 118extern struct lan_addr_s lan_addr[]; 119 120/* UPnP-A/V [DLNA] */ 121extern sqlite3 *db; 122extern char dlna_no_conv[]; 123#define FRIENDLYNAME_MAX_LEN (64) 124extern char friendly_name[]; 125extern char db_path[]; 126extern struct media_dir_s * media_dirs; 127extern struct album_art_name_s * album_art_names; 128extern struct client_cache_s clients[CLIENT_CACHE_SLOTS]; 129extern short int scanning; 130extern volatile short int quitting; 131extern volatile __u32 updateID; 132 133#endif 134