WebRadioApp  0.1
stations.h
Go to the documentation of this file.
1 
30 #ifndef STATIONS_H
31 #define STATIONS_H
32 
33 #include <iostream>
34 #include <iomanip>
35 #include "web_radio_config.h"
36 
37 typedef struct Stations {
38  int stationID;
39  ip_addr_t resolved_address;
40  ip_addr_t default_address;
41  uint16_t PORT;
42  std::string name;
43  std::string shortname;
44  std::string httpcommand;
45  std::string URL;
46 } Station;
47 
49  {0,
50  {0},
51  DEF_ADDR(212, 122, 133, 22),
52  80,
53  "Deutschlandfunk 128",
54  "DLF",
55  "GET /dradio/dlf/live/mp3/128/stream.mp3 "
56  "HTTP/1.0\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
57  "dradio-edge-2098-dus-lg-cdn.cast.addradio.de"},
58  {1,
59  {0},
60  DEF_ADDR(212, 122, 133, 22),
61  80,
62  "Deutschlandfunk 64",
63  "DLF",
64  "GET /dradio/dlf/live/mp3/64/stream.mp3 "
65  "HTTP/1.0\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
66  "dradio-edge-2098-dus-lg-cdn.cast.addradio.de"},
67  {2,
68  {0},
69  DEF_ADDR(93, 190, 141, 46),
70  80,
71  "RadioParadise 320",
72  "RP1",
73  "GET /mp3-320 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
74  "stream-uk1.radioparadise.com"},
75  // {2, {0}, DEF_ADDR (148, 252, 41, 4), 80, "RadioParadise
76  // 32", "RP2", "GET /mp3-32 HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
77  //"icy-4.radioparadise.com"},
78  {3,
79  {0},
80  DEF_ADDR(195, 30, 109, 51),
81  80,
82  "Rockantenne 128",
83  "RCK",
84  "GET /rockantenne/stream/mp3 "
85  "HTTP/1.1\r\nport:8010\r\nIcy-MetaData:1\r\n\r\n\r\n",
86  "s2-webradio.rockantenne.de"},
87  {4,
88  {0},
89  DEF_ADDR(62, 75, 215, 7),
90  8100,
91  "European Klassik Rock 320",
92  "EKR",
93  "GET / HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
94  "alpha129.server4you.net"},
95  {5,
96  {0},
97  DEF_ADDR(5, 39, 71, 159),
98  8871,
99  "DI Radio Digital Impulse Rock 320",
100  "IRC",
101  "GET /stream HTTP/1.1\r\nport:8871\r\nIcy-MetaData:1\r\n\r\n",
102  "orion.shoutca.st"},
103  {6,
104  {0},
105  DEF_ADDR(5, 39, 71, 159),
106  8994,
107  "DI Radio Digital Impulse Chill 320",
108  "ICH",
109  "GET /stream HTTP/1.1\r\nport:8994\r\nIcy-MetaData:1\r\n\r\n",
110  "orion.shoutca.st"},
111  {7,
112  {0},
113  DEF_ADDR(5, 39, 71, 159),
114  8978,
115  "DI Radio Digital Impulse Classical 320",
116  "ICL",
117  "GET /stream HTTP/1.1\r\nport:8978\r\nIcy-MetaData:1\r\n\r\n",
118  "orion.shoutca.st"},
119  {8,
120  {0},
121  DEF_ADDR(212, 122, 129, 10),
122  80,
123  "WDR 1 Live",
124  "1LI",
125  "GET /wdr/1live/diggi/mp3/128/stream.mp3 "
126  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
127  "edge-2016.fra-lg.cdn.addradio.net"},
128  {9,
129  {0},
130  DEF_ADDR(91, 221, 151, 240),
131  80,
132  "cityfm.nl 256",
133  "CFM",
134  "GET / HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
135  "lexington.cityfm.nl"},
136  {10,
137  {0},
138  DEF_ADDR(104, 200, 142, 170),
139  80,
140  "Absolute Chillout",
141  "ABS",
142  "GET /b05055_128mp3 HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
143  "edge1.peta.live365.net"},
144  {11,
145  {0},
146  DEF_ADDR(217, 182, 196, 102),
147  80,
148  "Klassikradio Klassik",
149  "KLR",
150  "GET /klassikradio-simulcast-mp3-hq HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
151  "klassikr.streamabc.net"},
152  {12,
153  {0},
154  DEF_ADDR(217, 182, 198, 169),
155  80,
156  "Klassikradio Barock",
157  "KBA",
158  "GET /klr-barock-mp3-192-2450908 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
159  "klassikr.streamabc.net"},
160  {13,
161  {0},
162  DEF_ADDR(217, 182, 196, 102),
163  80,
164  "Klassikradio Dreams",
165  "KDR",
166  "GET /klr-klassikdreams-mp3-192-5363069 "
167  "HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
168  "klassikr.streamabc.net"},
169  {14,
170  {0},
171  DEF_ADDR(217, 182, 196, 102),
172  80,
173  "Klassikradio Friends",
174  "KFR",
175  "GET /klr-friendshome-mp3-192-1047211 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
176  "klassikr.streamabc.net"},
177  {15,
178  {0},
179  DEF_ADDR(217, 182, 196, 102),
180  80,
181  "Klassikradio Healing",
182  "KHL",
183  "GET /klr-healing-mp3-192-8161477 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
184  "klassikr.streamabc.net"},
185  {16,
186  {0},
187  DEF_ADDR(217, 182, 196, 102),
188  80,
189  "Klassikradio Lounge",
190  "KLG",
191  "GET /klr-lounge-mp3-128-7848446 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
192  "klassikr.streamabc.net"},
193  {17,
194  {0},
195  DEF_ADDR(217, 182, 196, 102),
196  80,
197  "Klassikradio New Classics",
198  "KNC",
199  "GET /klr-newclassics-mp3-128-6197085 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
200  "klassikr.streamabc.net"},
201  {18,
202  {0},
203  DEF_ADDR(217, 182, 196, 102),
204  80,
205  "Klassikradio Chor",
206  "KRC",
207  "GET /klr-chor-mp3-192-1277277 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
208  "klassikr.streamabc.net"},
209  {19,
210  {0},
211  DEF_ADDR(212, 122, 129, 12),
212  80,
213  "SWR1 ",
214  "SW1",
215  "GET /swr/swr1/bw/mp3/128/stream.mp3 "
216  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
217  "swr-edge-202a-fra-lg-cdn.cast.addradio.de"},
218  {20,
219  {0},
220  DEF_ADDR(212, 122, 129, 12),
221  80,
222  "SWR2 ",
223  "SW2",
224  "GET /swr/swr2/live/mp3/256/stream.mp3 "
225  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
226  "swr-edge-202a-fra-lg-cdn.cast.addradio.de"},
227  {21,
228  {0},
229  DEF_ADDR(212, 122, 129, 12),
230  80,
231  "SWR3 ",
232  "SW3",
233  "GET /swr/swr3/live/mp3/128/stream.mp3 "
234  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
235  "swr-edge-202a-fra-lg-cdn.cast.addradio.de"},
236  {22,
237  {0},
238  DEF_ADDR(212, 122, 129, 12),
239  80,
240  "SWR4 ",
241  "SW4",
242  "GET /swr/swr4/bw/mp3/128/stream.mp3 "
243  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
244  "swr-edge-202a-fra-lg-cdn.cast.addradio.de"},
245  {23,
246  {0},
247  DEF_ADDR(212, 122, 129, 12),
248  80,
249  "SWR Aktuell ",
250  "SWA",
251  "GET /swr/swraktuell/live/mp3/128/stream.mp3 "
252  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
253  "swr-edge-202a-fra-lg-cdn.cast.addradio.de"},
254  {24,
255  {0},
256  DEF_ADDR(212, 122, 129, 14),
257  80,
258  "BR5 ",
259  "BR5",
260  "GET /br/b5aktuell/live/mp3/mid "
261  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
262  "br-edge-10a9-fra-dtag-cdn.cast.addradio.de"},
263  {25,
264  {0},
265  DEF_ADDR(212, 122, 129, 20),
266  80,
267  "HR1 ",
268  "HR1",
269  "GET /hr/hr1/live/mp3/128/stream.mp3 "
270  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
271  "hr-edge-204c-fra-lg-cdn.cast.addradio.de"},
272  {26,
273  {0},
274  DEF_ADDR(212, 122, 129, 20),
275  80,
276  "HR3 ",
277  "HR3",
278  "GET /hr/hr3/live/mp3/128/stream.mp3 "
279  "HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
280  "hr-edge-204c-fra-lg-cdn.cast.addradio.de"},
281  {27,
282  {0},
283  DEF_ADDR(50, 31, 140, 4),
284  80,
285  "WNYC FM 939 ",
286  "NY1",
287  "GET /wnycfm HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
288  "fm939.wnyc.org"},
289  {28,
290  {0},
291  DEF_ADDR(50, 31, 140, 8),
292  80,
293  "WNYC AM 820 ",
294  "NY2",
295  "GET /wnycam HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
296  "am820.wnyc.org"},
297  {29,
298  {0},
299  DEF_ADDR(217, 182, 196, 102),
300  80,
301  "munichhardesthits",
302  "MHH",
303  "GET /munichhh-mhhlive-mp3-128-9996709 HTTP/1.0\r\nIcy-MetaData:1\r\n\r\n",
304  "klassikr.streamabc.net"},
305  {30,
306  {0},
307  DEF_ADDR(216, 235, 88, 144),
308  80,
309  "zephyrbrass.com/",
310  "ZPL",
311  "GET /a03626 HTTP/1.1\r\nport:80\r\nIcy-MetaData:1\r\n\r\n",
312  "ais-edge07-live365-dal02.cdnstream.com"},
316  {31,
317  {0},
318  DEF_ADDR(80, 208, 234, 204),
319  80,
320  "rockland",
321  "RKL",
322  "GET /rockland.mp3 HTTP/1.1\r\nIcy-MetaData:0\r\n\r\n",
323  "stream.rockland.de"},
324  {32,
325  {0},
326  DEF_ADDR(81, 20, 48, 165),
327  80,
328  "Digital Network Chill",
329  "DNC",
330  "GET /ChillMP3 HTTP/1.1\r\nIcy-MetaData:1\r\n\r\n",
331  "media-ice.musicradio.com"},
332 };
333 
334 typedef struct {
335  uint8_t printed;
336  uint8_t Working;
337  uint8_t HaveIP;
338  ip_addr_t ip;
339  std::string hostname;
340  ip_addr_t resolved;
341 } DNS_desc_t;
342 
343 void DNS_print(void);
344 void init_station_DNS(void);
345 void check_stations_DNS(void);
346 
347 #endif /* STATIONS_H */
348 
Stations::default_address
ip_addr_t default_address
Definition: stations.h:40
DNS_desc_t::Working
uint8_t Working
Definition: stations.h:336
DNS_desc_t
Definition: stations.h:334
DNS_desc_t::ip
ip_addr_t ip
Definition: stations.h:338
init_station_DNS
void init_station_DNS(void)
Definition: stations.cpp:102
DNS_print
void DNS_print(void)
Definition: stations.cpp:55
check_stations_DNS
void check_stations_DNS(void)
Definition: stations.cpp:115
DEF_ADDR
#define DEF_ADDR(a, b, c, d)
Definition: web_radio_config.h:67
Servers_ptr
DNS_desc_t * Servers_ptr
Definition: stations.cpp:25
DNS_desc_t::resolved
ip_addr_t resolved
Definition: stations.h:340
Stations::resolved_address
ip_addr_t resolved_address
Definition: stations.h:39
DNS_FoundCallback
void DNS_FoundCallback(const char *host_name, const ip_addr_t *ipaddr, void *arg)
Definition: stations.cpp:28
Station
struct Stations Station
Stations::stationID
int stationID
Definition: stations.h:38
DNS_desc_t::hostname
std::string hostname
Definition: stations.h:339
Stations::httpcommand
std::string httpcommand
Definition: stations.h:44
Stations::PORT
uint16_t PORT
Definition: stations.h:41
ipaddr
ip4_addr_t ipaddr
Definition: lwip.c:45
Stations::shortname
std::string shortname
Definition: stations.h:43
MaxStation
#define MaxStation
Definition: web_radio_config.h:66
Stationlist
static Station Stationlist[MaxStation]
Definition: stations.h:48
web_radio_config.h
Web Radio Framework configuration.
Stations
Definition: stations.h:37
Stations::name
std::string name
Definition: stations.h:42
Stations::URL
std::string URL
Definition: stations.h:45
stations.h
Stations.
DNS_desc_t::HaveIP
uint8_t HaveIP
Definition: stations.h:337
Server
DNS_desc_t Server[MaxStation]
Definition: stations.cpp:24
DNS_desc_t::printed
uint8_t printed
Definition: stations.h:335