Debian Codegraph @

src/ezconfig0.h

raw symbols SCIP
1 /*
2 * ezstream - source client for Icecast with external en-/decoder support
3 * Copyright (C) 2003, 2004, 2005, 2006 Ed Zaleski <[email protected]>
4 * Copyright (C) 2007, 2015 Moritz Grimm <[email protected]>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20 #ifndef __EZCONFIG0_H__
21 #define __EZCONFIG0_H__
22
23 #define MP3_FORMAT "MP3"
24 #define VORBIS_FORMAT "VORBIS"
25 #define THEORA_FORMAT "THEORA"
26
27 #define MAX_FORMAT_ENCDEC 15
28
29 #define TRACK_PLACEHOLDER "@T@"
30 #define METADATA_PLACEHOLDER "@M@"
31 #define ARTIST_PLACEHOLDER "@a@"
32 #define TITLE_PLACEHOLDER "@t@"
33 #define STRING_PLACEHOLDER "@s@"
34
35 typedef struct tag_FORMAT_ENCDEC {
36 char *format;
37 char *match;
38 char *encoder;
39 char *decoder;
40 } FORMAT_ENCDEC;
41
42 typedef struct tag_EZCONFIG {
43 char *URL;
44 char *username;
45 char *password;
46 char *format;
47 char *fileName;
48 char *metadataProgram;
49 char *metadataFormat;
50 char *serverName;
51 char *serverURL;
52 char *serverGenre;
53 char *serverDescription;
54 char *serverBitrate;
55 char *serverChannels;
56 char *serverSamplerate;
57 char *serverQuality;
58 int serverPublic;
59 int reencode;
60 FORMAT_ENCDEC *encoderDecoders[MAX_FORMAT_ENCDEC];
61 int numEncoderDecoders;
62 int shuffle;
63 int fileNameIsProgram;
64 int streamOnce;
65 unsigned int reconnectAttempts;
66 int metadataRefreshInterval;
67 } EZCONFIG;
68
69 EZCONFIG * getEZConfig(void);
70 const char * getFormatEncoder(const char *format);
71 const char * getFormatDecoder(const char *match);
72 int parseConfig(const char *fileName);
73 void freeConfig(EZCONFIG *);
74
75 #endif /* __EZCONFIG0_H__ */