"Fossies" - the Fresh Open Source Software Archive

Member "minidlna-1.3.0/upnpglobalvars.h" (24 Nov 2020, 10056 Bytes) of package /linux/privat/minidlna-1.3.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "upnpglobalvars.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.2.1_vs_1.3.0.

    1 /* MiniDLNA project
    2  *
    3  * http://sourceforge.net/projects/minidlna/
    4  *
    5  * MiniDLNA media server
    6  * Copyright (C) 2008-2017  Justin Maggard
    7  *
    8  * This file is part of MiniDLNA.
    9  *
   10  * MiniDLNA is free software; you can redistribute it and/or modify
   11  * it under the terms of the GNU General Public License version 2 as
   12  * published by the Free Software Foundation.
   13  *
   14  * MiniDLNA is distributed in the hope that it will be useful,
   15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   17  * GNU General Public License for more details.
   18  *
   19  * You should have received a copy of the GNU General Public License
   20  * along with MiniDLNA. If not, see <http://www.gnu.org/licenses/>.
   21  *
   22  * Portions of the code from the MiniUPnP project:
   23  *
   24  * Copyright (c) 2006-2007, Thomas Bernard
   25  * All rights reserved.
   26  *
   27  * Redistribution and use in source and binary forms, with or without
   28  * modification, are permitted provided that the following conditions are met:
   29  *     * Redistributions of source code must retain the above copyright
   30  *       notice, this list of conditions and the following disclaimer.
   31  *     * Redistributions in binary form must reproduce the above copyright
   32  *       notice, this list of conditions and the following disclaimer in the
   33  *       documentation and/or other materials provided with the distribution.
   34  *     * The name of the author may not be used to endorse or promote products
   35  *       derived from this software without specific prior written permission.
   36  *
   37  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
   38  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   39  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   40  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
   41  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   42  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   43  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   44  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   45  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   46  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   47  * POSSIBILITY OF SUCH DAMAGE.
   48  */
   49 #ifndef __UPNPGLOBALVARS_H__
   50 #define __UPNPGLOBALVARS_H__
   51 
   52 #include <time.h>
   53 
   54 #include "minidlnatypes.h"
   55 #include "clients.h"
   56 #include "config.h"
   57 
   58 #include <sqlite3.h>
   59 
   60 #define MINIDLNA_VERSION "1.3.0"
   61 
   62 #ifdef NETGEAR
   63 # define SERVER_NAME "ReadyDLNA"
   64 #else
   65 # define SERVER_NAME "MiniDLNA"
   66 #endif
   67 
   68 #define USE_FORK 1
   69 #define DB_VERSION 11
   70 
   71 #ifdef READYNAS
   72 # define LOGFILE_NAME "upnp-av.log"
   73 #else
   74 # define LOGFILE_NAME "minidlna.log"
   75 #endif
   76 
   77 #ifdef ENABLE_NLS
   78 #define _(string) gettext(string)
   79 #else
   80 #define _(string) (string)
   81 #endif
   82 #define THISORNUL(s) (s ? s : "")
   83 
   84 #define RESOURCE_PROTOCOL_INFO_VALUES \
   85     "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN," \
   86     "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM," \
   87     "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED," \
   88     "http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG," \
   89     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_50_AC3_ISO," \
   90     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HD_60_AC3_ISO," \
   91     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_ISO," \
   92     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_ISO," \
   93     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_ISO," \
   94     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3_ISO," \
   95     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5_ISO," \
   96     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_AC3_ISO," \
   97     "http-get:*:video/mpeg:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3_ISO," \
   98     "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC," \
   99     "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL," \
  100     "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_HD_NA_ISO," \
  101     "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO," \
  102     "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO," \
  103     "http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1," \
  104     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5," \
  105     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AC3," \
  106     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_CIF15_AAC_520," \
  107     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_CIF30_AAC_940," \
  108     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L31_HD_AAC," \
  109     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L32_HD_AAC," \
  110     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_BL_L3L_SD_AAC," \
  111     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_HP_HD_AAC," \
  112     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_1080i_AAC," \
  113     "http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_HD_720p_AAC," \
  114     "http-get:*:video/mp4:DLNA.ORG_PN=MPEG4_P2_MP4_ASP_AAC," \
  115     "http-get:*:video/mp4:DLNA.ORG_PN=MPEG4_P2_MP4_SP_VGA_AAC," \
  116     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3," \
  117     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_50_AC3_T," \
  118     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3," \
  119     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HD_60_AC3_T," \
  120     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_HP_HD_AC3_T," \
  121     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5," \
  122     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AAC_MULT5_T," \
  123     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3," \
  124     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_AC3_T," \
  125     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3," \
  126     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_HD_MPEG1_L3_T," \
  127     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5," \
  128     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AAC_MULT5_T," \
  129     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AC3," \
  130     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_AC3_T," \
  131     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3," \
  132     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=AVC_TS_MP_SD_MPEG1_L3_T," \
  133     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA," \
  134     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_HD_NA_T," \
  135     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU," \
  136     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T," \
  137     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA," \
  138     "http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T," \
  139     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPLL_BASE," \
  140     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_BASE," \
  141     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVSPML_MP3," \
  142     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE," \
  143     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL," \
  144     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO," \
  145     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL," \
  146     "http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO," \
  147     "http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC," \
  148     "http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR," \
  149     "http-get:*:audio/mpeg:DLNA.ORG_PN=MP3," \
  150     "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE," \
  151     "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL," \
  152     "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAPRO," \
  153     "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMALSL," \
  154     "http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMALSL_MULT5," \
  155     "http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320," \
  156     "http-get:*:audio/3gpp:DLNA.ORG_PN=AAC_ISO_320," \
  157     "http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO," \
  158     "http-get:*:audio/mp4:DLNA.ORG_PN=AAC_MULT5_ISO," \
  159     "http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM," \
  160     "http-get:*:image/jpeg:*," \
  161     "http-get:*:video/avi:*," \
  162     "http-get:*:video/divx:*," \
  163     "http-get:*:video/x-matroska:*," \
  164     "http-get:*:video/mpeg:*," \
  165     "http-get:*:video/mp4:*," \
  166     "http-get:*:video/x-ms-wmv:*," \
  167     "http-get:*:video/x-msvideo:*," \
  168     "http-get:*:video/x-flv:*," \
  169     "http-get:*:video/x-tivo-mpeg:*," \
  170     "http-get:*:video/quicktime:*," \
  171     "http-get:*:audio/mp4:*," \
  172     "http-get:*:audio/x-wav:*," \
  173     "http-get:*:audio/x-flac:*," \
  174     "http-get:*:audio/x-dsd:*," \
  175     "http-get:*:application/ogg:*"
  176 
  177 #define DLNA_FLAG_DLNA_V1_5      0x00100000
  178 #define DLNA_FLAG_HTTP_STALLING  0x00200000
  179 #define DLNA_FLAG_TM_B           0x00400000
  180 #define DLNA_FLAG_TM_I           0x00800000
  181 #define DLNA_FLAG_TM_S           0x01000000
  182 #define DLNA_FLAG_LOP_BYTES      0x20000000
  183 #define DLNA_FLAG_LOP_NPT        0x40000000
  184 
  185 /* startup time */
  186 extern time_t startup_time;
  187 
  188 extern struct runtime_vars_s runtime_vars;
  189 /* runtime boolean flags */
  190 extern uint32_t runtime_flags;
  191 #define INOTIFY_MASK          0x0001
  192 #define TIVO_MASK             0x0002
  193 #define DLNA_STRICT_MASK      0x0004
  194 #define NO_PLAYLIST_MASK      0x0008
  195 #define SYSTEMD_MASK          0x0010
  196 #define MERGE_MEDIA_DIRS_MASK 0x0020
  197 #define WIDE_LINKS_MASK       0x0040
  198 #ifdef HAVE_AVAHI
  199 #define TIVO_BONJOUR_MASK     0x0080
  200 #else
  201 #define TIVO_BONJOUR_MASK     0x0000
  202 #endif
  203 #define SCANNING_MASK         0x0100
  204 #define RESCAN_MASK           0x0200
  205 #define SUBTITLES_MASK        0x0400
  206 #define FORCE_ALPHASORT_MASK  0x0800
  207 
  208 #define SETFLAG(mask)   runtime_flags |= mask
  209 #define GETFLAG(mask)   (runtime_flags & mask)
  210 #define CLEARFLAG(mask) runtime_flags &= ~mask
  211 
  212 extern const char *pidfilename;
  213 
  214 #define UUIDVALUE_MAX_LEN 42
  215 extern char uuidvalue[];
  216 
  217 #define MODELNAME_MAX_LEN 64
  218 extern char modelname[];
  219 
  220 #define MODELNUMBER_MAX_LEN 16
  221 extern char modelnumber[];
  222 
  223 #define SERIALNUMBER_MAX_LEN 16
  224 extern char serialnumber[];
  225 
  226 #define PRESENTATIONURL_MAX_LEN 64
  227 extern char presentationurl[];
  228 
  229 /* lan addresses */
  230 extern int n_lan_addr;
  231 extern struct lan_addr_s lan_addr[];
  232 extern int sssdp;
  233 
  234 extern const char *minissdpdsocketpath;
  235 
  236 /* UPnP-A/V [DLNA] */
  237 extern sqlite3 *db;
  238 #define FRIENDLYNAME_MAX_LEN 64
  239 extern char friendly_name[];
  240 extern char db_path[1024];
  241 extern char log_path[1024];
  242 extern struct media_dir_s *media_dirs;
  243 extern struct album_art_name_s *album_art_names;
  244 extern volatile short int quitting;
  245 extern volatile uint32_t updateID;
  246 extern const char *force_sort_criteria;
  247 
  248 #endif