vdr 2.7.9
config.c
Go to the documentation of this file.
1/*
2 * config.c: Configuration file handling
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: config.c 5.3 2026/01/04 10:18:40 kls Exp $
8 */
9
10#include "config.h"
11#include <ctype.h>
12#include <stdlib.h>
13#include "device.h"
14#include "i18n.h"
15#include "interface.h"
16#include "menu.h"
17#include "plugin.h"
18#include "recording.h"
19
20// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
21// format characters in order to allow any number of blanks after a numeric
22// value!
23
24#define ChkDoublePlausibility(Variable, Default) { if (Variable < 0.00001) Variable = Default; }
25
26// --- cSVDRPhost ------------------------------------------------------------
27
29{
30 addr.s_addr = 0;
31 mask = 0;
32}
33
34bool cSVDRPhost::Parse(const char *s)
35{
36 mask = 0xFFFFFFFF;
37 const char *p = strchr(s, '/');
38 if (p) {
39 char *error = NULL;
40 int m = strtoul(p + 1, &error, 10);
41 if (error && *error && !isspace(*error) || m > 32)
42 return false;
43 *(char *)p = 0; // yes, we know it's 'const' - will be restored!
44 if (m == 0)
45 mask = 0;
46 else {
47 mask <<= (32 - m);
48 mask = htonl(mask);
49 }
50 }
51 int result = inet_aton(s, &addr);
52 if (p)
53 *(char *)p = '/'; // there it is again
54 return result != 0 && (mask != 0 || addr.s_addr == 0);
55}
56
58{
59 return addr.s_addr == htonl(INADDR_LOOPBACK);
60}
61
63{
64 return (Address & mask) == (addr.s_addr & mask);
65}
66
67// --- cSatCableNumbers ------------------------------------------------------
68
70{
71 size = Size;
72 array = MALLOC(int, size);
73 FromString(s);
74}
75
80
82{
83 char *t;
84 int i = 0;
85 const char *p = s;
86 while (p && *p) {
87 int n = strtol(p, &t, 10);
88 if (t != p) {
89 if (i < size)
90 array[i++] = n;
91 else {
92 esyslog("ERROR: too many sat cable numbers in '%s'", s);
93 return false;
94 }
95 }
96 else {
97 esyslog("ERROR: invalid sat cable number in '%s'", s);
98 return false;
99 }
100 p = skipspace(t);
101 }
102 for ( ; i < size; i++)
103 array[i] = 0;
104 return true;
105}
106
108{
109 cString s("");
110 for (int i = 0; i < size; i++) {
111 s = cString::sprintf("%s%d ", *s, array[i]);
112 }
113 return s;
114}
115
116int cSatCableNumbers::FirstDeviceIndex(int DeviceIndex) const
117{
118 if (0 <= DeviceIndex && DeviceIndex < size) {
119 if (int CableNr = array[DeviceIndex]) {
120 for (int i = 0; i < size; i++) {
121 if (i < DeviceIndex && array[i] == CableNr)
122 return i;
123 }
124 }
125 }
126 return -1;
127}
128
129// --- cNestedItem -----------------------------------------------------------
130
131cNestedItem::cNestedItem(const char *Text, bool WithSubItems)
132{
133 text = strdup(Text ? Text : "");
134 subItems = WithSubItems ? new cList<cNestedItem> : NULL;
135}
136
138{
139 delete subItems;
140 free(text);
141}
142
143int cNestedItem::Compare(const cListObject &ListObject) const
144{
145 return strcasecmp(text, ((cNestedItem *)&ListObject)->text);
146}
147
149{
150 if (!subItems)
152 if (Item)
153 subItems->Add(Item);
154}
155
156void cNestedItem::SetText(const char *Text)
157{
158 free(text);
159 text = strdup(Text ? Text : "");
160}
161
163{
164 if (On && !subItems)
166 else if (!On && subItems) {
167 delete subItems;
168 subItems = NULL;
169 }
170}
171
172// --- cNestedItemList -------------------------------------------------------
173
175{
176 fileName = NULL;
177}
178
183
185{
186 char *s;
187 cReadLine ReadLine;
188 while ((s = ReadLine.Read(f)) != NULL) {
189 Line++;
190 char *p = strchr(s, '#');
191 if (p)
192 *p = 0;
193 s = skipspace(stripspace(s));
194 if (!isempty(s)) {
195 p = s + strlen(s) - 1;
196 if (*p == '{') {
197 *p = 0;
198 stripspace(s);
199 cNestedItem *Item = new cNestedItem(s, true);
200 List->Add(Item);
201 if (!Parse(f, Item->SubItems(), Line))
202 return false;
203 }
204 else if (*s == '}')
205 break;
206 else
207 List->Add(new cNestedItem(s));
208 }
209 }
210 return true;
211}
212
214{
215 for (cNestedItem *Item = List->First(); Item; Item = List->Next(Item)) {
216 if (Item->SubItems()) {
217 fprintf(f, "%*s%s {\n", Indent, "", Item->Text());
218 Write(f, Item->SubItems(), Indent + 2);
219 fprintf(f, "%*s}\n", Indent + 2, "");
220 }
221 else
222 fprintf(f, "%*s%s\n", Indent, "", Item->Text());
223 }
224 return true;
225}
226
228{
229 free(fileName);
230 fileName = NULL;
232}
233
234bool cNestedItemList::Load(const char *FileName)
235{
237 if (FileName) {
238 free(fileName);
239 fileName = strdup(FileName);
240 }
241 bool result = false;
242 if (fileName && access(fileName, F_OK) == 0) {
243 isyslog("loading %s", fileName);
244 FILE *f = fopen(fileName, "r");
245 if (f) {
246 int Line = 0;
247 result = Parse(f, this, Line);
248 fclose(f);
249 }
250 else {
252 result = false;
253 }
254 }
255 return result;
256}
257
259{
260 bool result = true;
262 if (f.Open()) {
263 result = Write(f, this);
264 if (!f.Close())
265 result = false;
266 }
267 else
268 result = false;
269 return result;
270}
271
272// --- Folders and Commands --------------------------------------------------
273
277
278// --- cSVDRPhosts -----------------------------------------------------------
279
281
283{
284 cSVDRPhost *h = First();
285 while (h) {
286 if (!h->IsLocalhost())
287 return false;
288 h = (cSVDRPhost *)h->Next();
289 }
290 return true;
291}
292
294{
295 cSVDRPhost *h = First();
296 while (h) {
297 if (h->Accepts(Address))
298 return true;
299 h = (cSVDRPhost *)h->Next();
300 }
301 return false;
302}
303
304// --- cSetupLine ------------------------------------------------------------
305
307{
308 plugin = name = value = NULL;
309}
310
311cSetupLine::cSetupLine(const char *Name, const char *Value, const char *Plugin)
312{
313 name = strreplace(strdup(Name), '\n', 0);
314 value = strreplace(strdup(Value), '\n', 0);
315 plugin = Plugin ? strreplace(strdup(Plugin), '\n', 0) : NULL;
316}
317
319{
320 free(plugin);
321 free(name);
322 free(value);
323}
324
325int cSetupLine::Compare(const cListObject &ListObject) const
326{
327 const cSetupLine *sl = (cSetupLine *)&ListObject;
328 if (!plugin && !sl->plugin)
329 return strcasecmp(name, sl->name);
330 if (!plugin)
331 return -1;
332 if (!sl->plugin)
333 return 1;
334 int result = strcasecmp(plugin, sl->plugin);
335 if (result == 0)
336 result = strcasecmp(name, sl->name);
337 return result;
338}
339
340bool cSetupLine::Parse(char *s)
341{
342 char *p = strchr(s, '=');
343 if (p) {
344 *p = 0;
345 char *Name = compactspace(s);
346 char *Value = compactspace(p + 1);
347 if (*Name) { // value may be an empty string
348 p = strchr(Name, '.');
349 if (p) {
350 *p = 0;
351 char *Plugin = compactspace(Name);
352 Name = compactspace(p + 1);
353 if (!(*Plugin && *Name))
354 return false;
355 plugin = strdup(Plugin);
356 }
357 name = strdup(Name);
358 value = strdup(Value);
359 return true;
360 }
361 }
362 return false;
363}
364
365bool cSetupLine::Save(FILE *f)
366{
367 return fprintf(f, "%s%s%s = %s\n", plugin ? plugin : "", plugin ? "." : "", name, value) > 0;
368}
369
370// --- cSetup ----------------------------------------------------------------
371
373
375{
376 strcpy(OSDLanguage, ""); // default is taken from environment
377 strcpy(OSDSkin, "lcars");
378 strcpy(OSDTheme, "default");
379 PrimaryDVB = 1;
382 MenuScrollPage = 1;
383 MenuScrollWrap = 0;
384 MenuKeyCloses = 0;
388 LnbSLOF = 11700;
389 LnbFrequLo = 9750;
390 LnbFrequHi = 10600;
391 DiSEqC = 0;
392 UsePositioner = 0;
393 SiteLat = 0;
394 SiteLon = 0;
395 PositionerSpeed = 15;
396 PositionerSwing = 650;
398 SetSystemTime = 0;
399 TimeSource = 0;
400 TimeTransponder = 0;
402 MarginStart = 2;
403 MarginStop = 10;
404 AudioLanguages[0] = -1;
406 SubtitleLanguages[0] = -1;
407 SubtitleOffset = 0;
410 EPGLanguages[0] = -1;
411 EPGScanTimeout = 5;
414 EPGBugfixLevel = 3;
415 EPGLinger = 0;
416 SVDRPTimeout = 300;
417 SVDRPPeering = 0;
419 strcpy(SVDRPDefaultHost, "");
420 ZapTimeout = 3;
421 ChannelEntryTimeout = 1000;
422 RcRepeatDelay = 300;
423 RcRepeatDelta = 100;
425 DefaultPriority = 50;
429 PausePriority = 10;
430 PauseLifetime = 1;
431 UseSubtitle = 1;
432 UseVps = 0;
433 VpsMargin = 120;
434 RecordingDirs = 1;
440 ColorKey0 = 0;
441 ColorKey1 = 1;
442 ColorKey2 = 2;
443 ColorKey3 = 3;
445 VideoFormat = 0;
446 UpdateChannels = 5;
447 UseDolbyDigital = 1;
448 ChannelInfoPos = 0;
449 ChannelInfoTime = 5;
450 OSDLeftP = 0.08;
451 OSDTopP = 0.08;
452 OSDWidthP = 0.87;
453 OSDHeightP = 0.84;
454 OSDLeft = 54;
455 OSDTop = 45;
456 OSDWidth = 624;
457 OSDHeight = 486;
458 OSDAspect = 1.0;
459 OSDMessageTime = 1;
460 UseSmallFont = 1;
461 AntiAlias = 1;
462 strcpy(FontOsd, DefaultFontOsd);
463 strcpy(FontSml, DefaultFontSml);
464 strcpy(FontFix, DefaultFontFix);
465 FontOsdSizeP = 0.031;
466 FontSmlSizeP = 0.028;
467 FontFixSizeP = 0.030;
468 FontOsdSize = 22;
469 FontSmlSize = 18;
470 FontFixSize = 20;
473 DelTimeshiftRec = 0;
474 DumpNaluFill = 0;
475 MinEventTimeout = 30;
476 MinUserInactivity = 300;
477 NextWakeupTime = 0;
478 MultiSpeedMode = 0;
479 ShowReplayMode = 0;
482 PauseOnMarkSet = 0;
483 PauseOnMarkJump = 1;
484 SkipEdited = 0;
485 PauseAtLastMark = 0;
490 SkipSeconds = 60;
492 ResumeID = 0;
493 CurrentChannel = -1;
495 VolumeSteps = 51;
496 VolumeLinearize = 0;
497 CurrentDolby = 0;
498 InitialChannel = "";
499 DeviceBondings = "";
500 InitialVolume = -1;
501 ChannelsWrap = 0;
503 EmergencyExit = 1;
504}
505
507{
508 memcpy(&__BeginData__, &s.__BeginData__, (char *)&s.__EndData__ - (char *)&s.__BeginData__);
511 return *this;
512}
513
514cSetupLine *cSetup::Get(const char *Name, const char *Plugin)
515{
516 for (cSetupLine *l = First(); l; l = Next(l)) {
517 if ((l->Plugin() == NULL) == (Plugin == NULL)) {
518 if ((!Plugin || strcasecmp(l->Plugin(), Plugin) == 0) && strcasecmp(l->Name(), Name) == 0)
519 return l;
520 }
521 }
522 return NULL;
523}
524
525void cSetup::Store(const char *Name, const char *Value, const char *Plugin, bool AllowMultiple)
526{
527 if (Name && *Name) {
528 cSetupLine *l = Get(Name, Plugin);
529 if (l && !AllowMultiple)
530 Del(l);
531 if (Value)
532 Add(new cSetupLine(Name, Value, Plugin));
533 }
534}
535
536void cSetup::Store(const char *Name, int Value, const char *Plugin)
537{
538 Store(Name, cString::sprintf("%d", Value), Plugin);
539}
540
541void cSetup::Store(const char *Name, double &Value, const char *Plugin)
542{
543 Store(Name, dtoa(Value), Plugin);
544}
545
546bool cSetup::Load(const char *FileName)
547{
549 bool result = true;
550 for (cSetupLine *l = First(); l; l = Next(l)) {
551 bool error = false;
552 if (l->Plugin()) {
553 cPlugin *p = cPluginManager::GetPlugin(l->Plugin());
554 if (p && !p->SetupParse(l->Name(), l->Value()))
555 error = true;
556 }
557 else {
558 if (!Parse(l->Name(), l->Value()))
559 error = true;
560 }
561 if (error) {
562 esyslog("ERROR: unknown config parameter: %s%s%s = %s", l->Plugin() ? l->Plugin() : "", l->Plugin() ? "." : "", l->Name(), l->Value());
563 result = false;
564 }
565 }
566 return result;
567 }
568 return false;
569}
570
571void cSetup::StoreLanguages(const char *Name, int *Values)
572{
573 char buffer[I18nLanguages()->Size() * 4];
574 char *q = buffer;
575 for (int i = 0; i < I18nLanguages()->Size(); i++) {
576 if (Values[i] < 0)
577 break;
578 const char *s = I18nLanguageCode(Values[i]);
579 if (s) {
580 if (q > buffer)
581 *q++ = ' ';
582 strncpy(q, s, 3);
583 q += 3;
584 }
585 }
586 *q = 0;
587 Store(Name, buffer);
588}
589
590bool cSetup::ParseLanguages(const char *Value, int *Values)
591{
592 int n = 0;
593 while (Value && *Value && n < I18nLanguages()->Size()) {
594 char buffer[4];
595 strn0cpy(buffer, Value, sizeof(buffer));
596 int i = I18nLanguageIndex(buffer);
597 if (i >= 0)
598 Values[n++] = i;
599 if ((Value = strchr(Value, ' ')) != NULL)
600 Value++;
601 }
602 Values[n] = -1;
603 return true;
604}
605
606bool cSetup::Parse(const char *Name, const char *Value)
607{
608 if (!strcasecmp(Name, "OSDLanguage")) { strn0cpy(OSDLanguage, Value, sizeof(OSDLanguage)); I18nSetLocale(OSDLanguage); }
609 else if (!strcasecmp(Name, "OSDSkin")) Utf8Strn0Cpy(OSDSkin, Value, MaxSkinName);
610 else if (!strcasecmp(Name, "OSDTheme")) Utf8Strn0Cpy(OSDTheme, Value, MaxThemeName);
611 else if (!strcasecmp(Name, "PrimaryDVB")) PrimaryDVB = atoi(Value);
612 else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value);
613 else if (!strcasecmp(Name, "TimeoutRequChInfo")) TimeoutRequChInfo = atoi(Value);
614 else if (!strcasecmp(Name, "MenuScrollPage")) MenuScrollPage = atoi(Value);
615 else if (!strcasecmp(Name, "MenuScrollWrap")) MenuScrollWrap = atoi(Value);
616 else if (!strcasecmp(Name, "MenuKeyCloses")) MenuKeyCloses = atoi(Value);
617 else if (!strcasecmp(Name, "MarkInstantRecord")) MarkInstantRecord = atoi(Value);
618 else if (!strcasecmp(Name, "NameInstantRecord")) Utf8Strn0Cpy(NameInstantRecord, Value, sizeof(NameInstantRecord));
619 else if (!strcasecmp(Name, "InstantRecordTime")) InstantRecordTime = atoi(Value);
620 else if (!strcasecmp(Name, "LnbSLOF")) LnbSLOF = atoi(Value);
621 else if (!strcasecmp(Name, "LnbFrequLo")) LnbFrequLo = atoi(Value);
622 else if (!strcasecmp(Name, "LnbFrequHi")) LnbFrequHi = atoi(Value);
623 else if (!strcasecmp(Name, "DiSEqC")) DiSEqC = atoi(Value);
624 else if (!strcasecmp(Name, "UsePositioner")) UsePositioner = atoi(Value);
625 else if (!strcasecmp(Name, "SiteLat")) SiteLat = atoi(Value);
626 else if (!strcasecmp(Name, "SiteLon")) SiteLon = atoi(Value);
627 else if (!strcasecmp(Name, "PositionerSpeed")) PositionerSpeed = atoi(Value);
628 else if (!strcasecmp(Name, "PositionerSwing")) PositionerSwing = atoi(Value);
629 else if (!strcasecmp(Name, "PositionerLastLon")) PositionerLastLon = atoi(Value);
630 else if (!strcasecmp(Name, "SetSystemTime")) SetSystemTime = atoi(Value);
631 else if (!strcasecmp(Name, "TimeSource")) TimeSource = cSource::FromString(Value);
632 else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
633 else if (!strcasecmp(Name, "StandardCompliance")) StandardCompliance = atoi(Value);
634 else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
635 else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
636 else if (!strcasecmp(Name, "AudioLanguages")) return ParseLanguages(Value, AudioLanguages);
637 else if (!strcasecmp(Name, "DisplaySubtitles")) DisplaySubtitles = atoi(Value);
638 else if (!strcasecmp(Name, "SubtitleLanguages")) return ParseLanguages(Value, SubtitleLanguages);
639 else if (!strcasecmp(Name, "SubtitleOffset")) SubtitleOffset = atoi(Value);
640 else if (!strcasecmp(Name, "SubtitleFgTransparency")) SubtitleFgTransparency = atoi(Value);
641 else if (!strcasecmp(Name, "SubtitleBgTransparency")) SubtitleBgTransparency = atoi(Value);
642 else if (!strcasecmp(Name, "EPGLanguages")) return ParseLanguages(Value, EPGLanguages);
643 else if (!strcasecmp(Name, "EPGScanTimeout")) EPGScanTimeout = atoi(Value);
644 else if (!strcasecmp(Name, "EPGScanMaxChannel")) EPGScanMaxChannel = atoi(Value);
645 else if (!strcasecmp(Name, "EPGPauseAfterScan")) EPGPauseAfterScan = atoi(Value);
646 else if (!strcasecmp(Name, "EPGBugfixLevel")) EPGBugfixLevel = atoi(Value);
647 else if (!strcasecmp(Name, "EPGLinger")) EPGLinger = atoi(Value);
648 else if (!strcasecmp(Name, "SVDRPTimeout")) SVDRPTimeout = atoi(Value);
649 else if (!strcasecmp(Name, "SVDRPPeering")) SVDRPPeering = atoi(Value);
650 else if (!strcasecmp(Name, "SVDRPHostName")) { if (*Value) strn0cpy(SVDRPHostName, Value, sizeof(SVDRPHostName)); }
651 else if (!strcasecmp(Name, "SVDRPDefaultHost")) strn0cpy(SVDRPDefaultHost, Value, sizeof(SVDRPDefaultHost));
652 else if (!strcasecmp(Name, "ZapTimeout")) ZapTimeout = atoi(Value);
653 else if (!strcasecmp(Name, "ChannelEntryTimeout")) ChannelEntryTimeout= atoi(Value);
654 else if (!strcasecmp(Name, "RcRepeatDelay")) RcRepeatDelay = atoi(Value);
655 else if (!strcasecmp(Name, "RcRepeatDelta")) RcRepeatDelta = atoi(Value);
656 else if (!strcasecmp(Name, "DeleteRetention")) DeleteRetention = atoi(Value);
657 else if (!strcasecmp(Name, "DefaultPriority")) DefaultPriority = atoi(Value);
658 else if (!strcasecmp(Name, "DefaultLifetime")) DefaultLifetime = atoi(Value);
659 else if (!strcasecmp(Name, "RecordKeyHandling")) RecordKeyHandling = atoi(Value);
660 else if (!strcasecmp(Name, "PauseKeyHandling")) PauseKeyHandling = atoi(Value);
661 else if (!strcasecmp(Name, "PausePriority")) PausePriority = atoi(Value);
662 else if (!strcasecmp(Name, "PauseLifetime")) PauseLifetime = atoi(Value);
663 else if (!strcasecmp(Name, "UseSubtitle")) UseSubtitle = atoi(Value);
664 else if (!strcasecmp(Name, "UseVps")) UseVps = atoi(Value);
665 else if (!strcasecmp(Name, "VpsMargin")) VpsMargin = atoi(Value);
666 else if (!strcasecmp(Name, "RecordingDirs")) RecordingDirs = atoi(Value);
667 else if (!strcasecmp(Name, "FoldersInTimerMenu")) FoldersInTimerMenu = atoi(Value);
668 else if (!strcasecmp(Name, "AlwaysSortFoldersFirst")) AlwaysSortFoldersFirst = atoi(Value);
669 else if (!strcasecmp(Name, "RecSortingDirection")) RecSortingDirection= atoi(Value);
670 else if (!strcasecmp(Name, "DefaultSortModeRec")) DefaultSortModeRec = atoi(Value);
671 else if (!strcasecmp(Name, "NumberKeysForChars")) NumberKeysForChars = atoi(Value);
672 else if (!strcasecmp(Name, "ColorKey0")) ColorKey0 = atoi(Value);
673 else if (!strcasecmp(Name, "ColorKey1")) ColorKey1 = atoi(Value);
674 else if (!strcasecmp(Name, "ColorKey2")) ColorKey2 = atoi(Value);
675 else if (!strcasecmp(Name, "ColorKey3")) ColorKey3 = atoi(Value);
676 else if (!strcasecmp(Name, "VideoDisplayFormat")) VideoDisplayFormat = atoi(Value);
677 else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
678 else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value);
679 else if (!strcasecmp(Name, "UseDolbyDigital")) UseDolbyDigital = atoi(Value);
680 else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
681 else if (!strcasecmp(Name, "ChannelInfoTime")) ChannelInfoTime = atoi(Value);
682 else if (!strcasecmp(Name, "OSDLeftP")) OSDLeftP = atod(Value);
683 else if (!strcasecmp(Name, "OSDTopP")) OSDTopP = atod(Value);
684 else if (!strcasecmp(Name, "OSDWidthP")) { OSDWidthP = atod(Value); ChkDoublePlausibility(OSDWidthP, 0.87); }
685 else if (!strcasecmp(Name, "OSDHeightP")) { OSDHeightP = atod(Value); ChkDoublePlausibility(OSDHeightP, 0.84); }
686 else if (!strcasecmp(Name, "OSDLeft")) OSDLeft = atoi(Value);
687 else if (!strcasecmp(Name, "OSDTop")) OSDTop = atoi(Value);
688 else if (!strcasecmp(Name, "OSDWidth")) { OSDWidth = atoi(Value); OSDWidth &= ~0x07; } // OSD width must be a multiple of 8
689 else if (!strcasecmp(Name, "OSDHeight")) OSDHeight = atoi(Value);
690 else if (!strcasecmp(Name, "OSDAspect")) OSDAspect = atod(Value);
691 else if (!strcasecmp(Name, "OSDMessageTime")) OSDMessageTime = atoi(Value);
692 else if (!strcasecmp(Name, "UseSmallFont")) UseSmallFont = atoi(Value);
693 else if (!strcasecmp(Name, "AntiAlias")) AntiAlias = atoi(Value);
694 else if (!strcasecmp(Name, "FontOsd")) Utf8Strn0Cpy(FontOsd, Value, MAXFONTNAME);
695 else if (!strcasecmp(Name, "FontSml")) Utf8Strn0Cpy(FontSml, Value, MAXFONTNAME);
696 else if (!strcasecmp(Name, "FontFix")) Utf8Strn0Cpy(FontFix, Value, MAXFONTNAME);
697 else if (!strcasecmp(Name, "FontOsdSizeP")) { FontOsdSizeP = atod(Value); ChkDoublePlausibility(FontOsdSizeP, 0.038); }
698 else if (!strcasecmp(Name, "FontSmlSizeP")) { FontSmlSizeP = atod(Value); ChkDoublePlausibility(FontSmlSizeP, 0.035); }
699 else if (!strcasecmp(Name, "FontFixSizeP")) { FontFixSizeP = atod(Value); ChkDoublePlausibility(FontFixSizeP, 0.031); }
700 else if (!strcasecmp(Name, "FontOsdSize")) FontOsdSize = atoi(Value);
701 else if (!strcasecmp(Name, "FontSmlSize")) FontSmlSize = atoi(Value);
702 else if (!strcasecmp(Name, "FontFixSize")) FontFixSize = atoi(Value);
703 else if (!strcasecmp(Name, "MaxVideoFileSize")) MaxVideoFileSize = atoi(Value);
704 else if (!strcasecmp(Name, "SplitEditedFiles")) SplitEditedFiles = atoi(Value);
705 else if (!strcasecmp(Name, "DelTimeshiftRec")) DelTimeshiftRec = atoi(Value);
706 else if (!strcasecmp(Name, "DumpNaluFill")) DumpNaluFill = atoi(Value);
707 else if (!strcasecmp(Name, "MinEventTimeout")) MinEventTimeout = atoi(Value);
708 else if (!strcasecmp(Name, "MinUserInactivity")) MinUserInactivity = atoi(Value);
709 else if (!strcasecmp(Name, "NextWakeupTime")) NextWakeupTime = atoi(Value);
710 else if (!strcasecmp(Name, "MultiSpeedMode")) MultiSpeedMode = atoi(Value);
711 else if (!strcasecmp(Name, "ShowReplayMode")) ShowReplayMode = atoi(Value);
712 else if (!strcasecmp(Name, "ShowRemainingTime")) ShowRemainingTime = atoi(Value);
713 else if (!strcasecmp(Name, "ProgressDisplayTime")) ProgressDisplayTime= atoi(Value);
714 else if (!strcasecmp(Name, "PauseOnMarkSet")) PauseOnMarkSet = atoi(Value);
715 else if (!strcasecmp(Name, "PauseOnMarkJump")) PauseOnMarkJump = atoi(Value);
716 else if (!strcasecmp(Name, "SkipEdited")) SkipEdited = atoi(Value);
717 else if (!strcasecmp(Name, "PauseAtLastMark")) PauseAtLastMark = atoi(Value);
718 else if (!strcasecmp(Name, "AdaptiveSkipInitial")) AdaptiveSkipInitial= atoi(Value);
719 else if (!strcasecmp(Name, "AdaptiveSkipTimeout")) AdaptiveSkipTimeout= atoi(Value);
720 else if (!strcasecmp(Name, "AdaptiveSkipAlternate")) AdaptiveSkipAlternate = atoi(Value);
721 else if (!strcasecmp(Name, "AdaptiveSkipPrevNext")) AdaptiveSkipPrevNext = atoi(Value);
722 else if (!strcasecmp(Name, "SkipSeconds")) SkipSeconds = atoi(Value);
723 else if (!strcasecmp(Name, "SkipSecondsRepeat")) SkipSecondsRepeat = atoi(Value);
724 else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value);
725 else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
726 else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value);
727 else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value);
728 else if (!strcasecmp(Name, "InitialChannel")) InitialChannel = Value;
729 else if (!strcasecmp(Name, "VolumeSteps")) VolumeSteps = atoi(Value);
730 else if (!strcasecmp(Name, "VolumeLinearize")) VolumeLinearize = atoi(Value);
731 else if (!strcasecmp(Name, "InitialVolume")) InitialVolume = atoi(Value);
732 else if (!strcasecmp(Name, "DeviceBondings")) DeviceBondings = Value;
733 else if (!strcasecmp(Name, "ChannelsWrap")) ChannelsWrap = atoi(Value);
734 else if (!strcasecmp(Name, "ShowChannelNamesWithSource")) ShowChannelNamesWithSource = atoi(Value);
735 else if (!strcasecmp(Name, "EmergencyExit")) EmergencyExit = atoi(Value);
736 else if (!strcasecmp(Name, "LastReplayed")) cReplayControl::SetRecording(Value);
737 else
738 return false;
739 return true;
740}
741
742bool cSetup::Save(void)
743{
744 Store("OSDLanguage", OSDLanguage);
745 Store("OSDSkin", OSDSkin);
746 Store("OSDTheme", OSDTheme);
747 Store("PrimaryDVB", PrimaryDVB);
748 Store("ShowInfoOnChSwitch", ShowInfoOnChSwitch);
749 Store("TimeoutRequChInfo", TimeoutRequChInfo);
750 Store("MenuScrollPage", MenuScrollPage);
751 Store("MenuScrollWrap", MenuScrollWrap);
752 Store("MenuKeyCloses", MenuKeyCloses);
753 Store("MarkInstantRecord", MarkInstantRecord);
754 Store("NameInstantRecord", NameInstantRecord);
755 Store("InstantRecordTime", InstantRecordTime);
756 Store("LnbSLOF", LnbSLOF);
757 Store("LnbFrequLo", LnbFrequLo);
758 Store("LnbFrequHi", LnbFrequHi);
759 Store("DiSEqC", DiSEqC);
760 Store("UsePositioner", UsePositioner);
761 Store("SiteLat", SiteLat);
762 Store("SiteLon", SiteLon);
763 Store("PositionerSpeed", PositionerSpeed);
764 Store("PositionerSwing", PositionerSwing);
765 Store("PositionerLastLon", PositionerLastLon);
766 Store("SetSystemTime", SetSystemTime);
767 Store("TimeSource", cSource::ToString(TimeSource));
768 Store("TimeTransponder", TimeTransponder);
769 Store("StandardCompliance", StandardCompliance);
770 Store("MarginStart", MarginStart);
771 Store("MarginStop", MarginStop);
772 StoreLanguages("AudioLanguages", AudioLanguages);
773 Store("DisplaySubtitles", DisplaySubtitles);
774 StoreLanguages("SubtitleLanguages", SubtitleLanguages);
775 Store("SubtitleOffset", SubtitleOffset);
776 Store("SubtitleFgTransparency", SubtitleFgTransparency);
777 Store("SubtitleBgTransparency", SubtitleBgTransparency);
778 StoreLanguages("EPGLanguages", EPGLanguages);
779 Store("EPGScanTimeout", EPGScanTimeout);
780 Store("EPGScanMaxChannel", EPGScanMaxChannel);
781 Store("EPGPauseAfterScan", EPGPauseAfterScan);
782 Store("EPGBugfixLevel", EPGBugfixLevel);
783 Store("EPGLinger", EPGLinger);
784 Store("SVDRPTimeout", SVDRPTimeout);
785 Store("SVDRPPeering", SVDRPPeering);
786 Store("SVDRPHostName", strcmp(SVDRPHostName, GetHostName()) ? SVDRPHostName : "");
787 Store("SVDRPDefaultHost", SVDRPDefaultHost);
788 Store("ZapTimeout", ZapTimeout);
789 Store("ChannelEntryTimeout",ChannelEntryTimeout);
790 Store("RcRepeatDelay", RcRepeatDelay);
791 Store("RcRepeatDelta", RcRepeatDelta);
792 Store("DeleteRetention", DeleteRetention);
793 Store("DefaultPriority", DefaultPriority);
794 Store("DefaultLifetime", DefaultLifetime);
795 Store("RecordKeyHandling", RecordKeyHandling);
796 Store("PauseKeyHandling", PauseKeyHandling);
797 Store("PausePriority", PausePriority);
798 Store("PauseLifetime", PauseLifetime);
799 Store("UseSubtitle", UseSubtitle);
800 Store("UseVps", UseVps);
801 Store("VpsMargin", VpsMargin);
802 Store("RecordingDirs", RecordingDirs);
803 Store("FoldersInTimerMenu", FoldersInTimerMenu);
804 Store("AlwaysSortFoldersFirst", AlwaysSortFoldersFirst);
805 Store("RecSortingDirection",RecSortingDirection);
806 Store("DefaultSortModeRec", DefaultSortModeRec);
807 Store("NumberKeysForChars", NumberKeysForChars);
808 Store("ColorKey0", ColorKey0);
809 Store("ColorKey1", ColorKey1);
810 Store("ColorKey2", ColorKey2);
811 Store("ColorKey3", ColorKey3);
812 Store("VideoDisplayFormat", VideoDisplayFormat);
813 Store("VideoFormat", VideoFormat);
814 Store("UpdateChannels", UpdateChannels);
815 Store("UseDolbyDigital", UseDolbyDigital);
816 Store("ChannelInfoPos", ChannelInfoPos);
817 Store("ChannelInfoTime", ChannelInfoTime);
818 Store("OSDLeftP", OSDLeftP);
819 Store("OSDTopP", OSDTopP);
820 Store("OSDWidthP", OSDWidthP);
821 Store("OSDHeightP", OSDHeightP);
822 Store("OSDLeft", OSDLeft);
823 Store("OSDTop", OSDTop);
824 Store("OSDWidth", OSDWidth);
825 Store("OSDHeight", OSDHeight);
826 Store("OSDAspect", OSDAspect);
827 Store("OSDMessageTime", OSDMessageTime);
828 Store("UseSmallFont", UseSmallFont);
829 Store("AntiAlias", AntiAlias);
830 Store("FontOsd", FontOsd);
831 Store("FontSml", FontSml);
832 Store("FontFix", FontFix);
833 Store("FontOsdSizeP", FontOsdSizeP);
834 Store("FontSmlSizeP", FontSmlSizeP);
835 Store("FontFixSizeP", FontFixSizeP);
836 Store("FontOsdSize", FontOsdSize);
837 Store("FontSmlSize", FontSmlSize);
838 Store("FontFixSize", FontFixSize);
839 Store("MaxVideoFileSize", MaxVideoFileSize);
840 Store("SplitEditedFiles", SplitEditedFiles);
841 Store("DelTimeshiftRec", DelTimeshiftRec);
842 Store("DumpNaluFill", DumpNaluFill);
843 Store("MinEventTimeout", MinEventTimeout);
844 Store("MinUserInactivity", MinUserInactivity);
845 Store("NextWakeupTime", NextWakeupTime);
846 Store("MultiSpeedMode", MultiSpeedMode);
847 Store("ShowReplayMode", ShowReplayMode);
848 Store("ShowRemainingTime", ShowRemainingTime);
849 Store("ProgressDisplayTime",ProgressDisplayTime);
850 Store("PauseOnMarkSet", PauseOnMarkSet);
851 Store("PauseOnMarkJump", PauseOnMarkJump);
852 Store("SkipEdited", SkipEdited);
853 Store("PauseAtLastMark", PauseAtLastMark);
854 Store("AdaptiveSkipInitial",AdaptiveSkipInitial);
855 Store("AdaptiveSkipTimeout",AdaptiveSkipTimeout);
856 Store("AdaptiveSkipAlternate", AdaptiveSkipAlternate);
857 Store("AdaptiveSkipPrevNext", AdaptiveSkipPrevNext);
858 Store("SkipSeconds", SkipSeconds);
859 Store("SkipSecondsRepeat", SkipSecondsRepeat);
860 Store("ResumeID", ResumeID);
861 Store("CurrentChannel", CurrentChannel);
862 Store("CurrentVolume", CurrentVolume);
863 Store("CurrentDolby", CurrentDolby);
864 Store("InitialChannel", InitialChannel);
865 Store("VolumeSteps", VolumeSteps);
866 Store("VolumeLinearize", VolumeLinearize);
867 Store("InitialVolume", InitialVolume);
868 Store("DeviceBondings", DeviceBondings);
869 Store("ChannelsWrap", ChannelsWrap);
870 Store("ShowChannelNamesWithSource", ShowChannelNamesWithSource);
871 Store("EmergencyExit", EmergencyExit);
872 Store("LastReplayed", cReplayControl::LastReplayed());
873
874 Sort();
875
877 isyslog("saved setup to %s", FileName());
878 return true;
879 }
880 return false;
881}
bool Save(void) const
Definition config.h:183
const char * FileName(void)
Definition config.h:135
bool Load(const char *FileName=NULL, bool AllowComments=false, bool MustExist=false)
Definition config.h:136
virtual void Clear(void)
Definition tools.c:2271
void Del(cListObject *Object, bool DeleteObject=true)
Definition tools.c:2226
void Add(cListObject *Object, cListObject *After=NULL)
Definition tools.c:2194
void Sort(void)
Definition tools.c:2318
cListObject(const cListObject &ListObject)
Definition tools.h:547
cListObject * Next(void) const
Definition tools.h:560
Definition tools.h:644
const cSVDRPhost * First(void) const
Definition tools.h:656
cList(const char *NeedsLocking=NULL)
Definition tools.h:646
const cSetupLine * Next(const cSetupLine *Object) const
Definition tools.h:663
bool Save(void)
Definition config.c:258
bool Write(FILE *f, cList< cNestedItem > *List, int Indent=0)
Definition config.c:213
virtual ~cNestedItemList() override
Definition config.c:179
void Clear(void)
Definition config.c:227
bool Parse(FILE *f, cList< cNestedItem > *List, int &Line)
Definition config.c:184
bool Load(const char *FileName)
Definition config.c:234
char * fileName
Definition config.h:222
cNestedItemList(void)
Definition config.c:174
void SetText(const char *Text)
Definition config.c:156
char * text
Definition config.h:207
void AddSubItem(cNestedItem *Item)
Definition config.c:148
void SetSubItems(bool On)
Definition config.c:162
virtual int Compare(const cListObject &ListObject) const override
Must return 0 if this object is equal to ListObject, a positive value if it is "greater",...
Definition config.c:143
virtual ~cNestedItem() override
Definition config.c:137
cNestedItem(const char *Text, bool WithSubItems=false)
Definition config.c:131
cList< cNestedItem > * SubItems(void)
Definition config.h:214
cList< cNestedItem > * subItems
Definition config.h:208
const char * Text(void) const
Definition config.h:213
static cPlugin * GetPlugin(int Index)
Definition plugin.c:470
virtual bool SetupParse(const char *Name, const char *Value)
Definition plugin.c:106
char * Read(FILE *f)
Definition tools.c:1544
static void SetRecording(const char *FileName)
Definition menu.c:6089
static const char * LastReplayed(void)
Definition menu.c:6099
bool Parse(const char *s)
Definition config.c:34
in_addr_t mask
Definition config.h:95
bool IsLocalhost(void)
Definition config.c:57
cSVDRPhost(void)
Definition config.c:28
bool Accepts(in_addr_t Address)
Definition config.c:62
struct in_addr addr
Definition config.h:94
bool LocalhostOnly(void)
Definition config.c:282
bool Acceptable(in_addr_t Address)
Definition config.c:293
bool Open(void)
Definition tools.c:1778
bool Close(void)
Definition tools.c:1788
cSatCableNumbers(int Size, const char *s=NULL)
Definition config.c:69
int Size(void) const
Definition config.h:110
bool FromString(const char *s)
Definition config.c:81
cString ToString(void)
Definition config.c:107
int FirstDeviceIndex(int DeviceIndex) const
Returns the first device index (starting at 0) that uses the same sat cable number as the device with...
Definition config.c:116
virtual int Compare(const cListObject &ListObject) const override
Must return 0 if this object is equal to ListObject, a positive value if it is "greater",...
Definition config.c:325
char * plugin
Definition config.h:246
const char * Name(void)
Definition config.h:255
cSetupLine(void)
Definition config.c:306
virtual ~cSetupLine() override
Definition config.c:318
bool Save(FILE *f)
Definition config.c:365
const char * Plugin(void)
Definition config.h:254
const char * Value(void)
Definition config.h:256
bool Parse(char *s)
Definition config.c:340
char * value
Definition config.h:248
char * name
Definition config.h:247
int __EndData__
Definition config.h:386
int DefaultLifetime
Definition config.h:321
int VolumeSteps
Definition config.h:379
int EmergencyExit
Definition config.h:385
int SplitEditedFiles
Definition config.h:357
int RcRepeatDelay
Definition config.h:318
int ColorKey3
Definition config.h:334
int MenuScrollPage
Definition config.h:280
int EPGBugfixLevel
Definition config.h:310
int ColorKey2
Definition config.h:334
int VideoDisplayFormat
Definition config.h:335
int SubtitleFgTransparency
Definition config.h:305
int MinUserInactivity
Definition config.h:360
int CurrentVolume
Definition config.h:378
int AntiAlias
Definition config.h:346
int FontFixSize
Definition config.h:355
int ShowInfoOnChSwitch
Definition config.h:278
int DeleteRetention
Definition config.h:320
int SkipSecondsRepeat
Definition config.h:375
int StandardCompliance
Definition config.h:299
char SVDRPDefaultHost[HOST_NAME_MAX]
Definition config.h:315
int CurrentChannel
Definition config.h:377
bool Save(void)
Definition config.c:742
int TimeoutRequChInfo
Definition config.h:279
int ResumeID
Definition config.h:376
char OSDTheme[MaxThemeName]
Definition config.h:276
int SubtitleLanguages[I18N_MAX_LANGUAGES+1]
Definition config.h:303
int SVDRPTimeout
Definition config.h:312
int OSDHeight
Definition config.h:342
int LnbSLOF
Definition config.h:286
int EPGLanguages[I18N_MAX_LANGUAGES+1]
Definition config.h:306
char OSDSkin[MaxSkinName]
Definition config.h:275
int UsePositioner
Definition config.h:290
int AlwaysSortFoldersFirst
Definition config.h:330
int AdaptiveSkipInitial
Definition config.h:370
int RecSortingDirection
Definition config.h:332
int VpsMargin
Definition config.h:327
double OSDAspect
Definition config.h:343
char OSDLanguage[I18N_MAX_LOCALE_LEN]
Definition config.h:274
int ShowChannelNamesWithSource
Definition config.h:384
int DefaultPriority
Definition config.h:321
int ZapTimeout
Definition config.h:316
double OSDWidthP
Definition config.h:341
int RecordKeyHandling
Definition config.h:322
int PauseKeyHandling
Definition config.h:323
double OSDHeightP
Definition config.h:341
int DumpNaluFill
Definition config.h:359
int PositionerSpeed
Definition config.h:293
cSetup & operator=(const cSetup &s)
Definition config.c:506
int MarginStart
Definition config.h:300
bool Parse(const char *Name, const char *Value)
Definition config.c:606
double FontOsdSizeP
Definition config.h:350
int PauseAtLastMark
Definition config.h:369
int AdaptiveSkipPrevNext
Definition config.h:373
int FontOsdSize
Definition config.h:353
int LnbFrequLo
Definition config.h:287
bool Load(const char *FileName)
Definition config.c:546
friend class cPlugin
Definition config.h:262
int EPGPauseAfterScan
Definition config.h:308
int FontSmlSize
Definition config.h:354
int UseSmallFont
Definition config.h:345
int SubtitleOffset
Definition config.h:304
int MarginStop
Definition config.h:300
cSetupLine * Get(const char *Name, const char *Plugin=NULL)
Definition config.c:514
int SVDRPPeering
Definition config.h:313
int ProgressDisplayTime
Definition config.h:365
int UpdateChannels
Definition config.h:337
int SkipSeconds
Definition config.h:374
int SubtitleBgTransparency
Definition config.h:305
int ColorKey0
Definition config.h:334
int FoldersInTimerMenu
Definition config.h:329
int MenuScrollWrap
Definition config.h:281
int EPGLinger
Definition config.h:311
int ShowReplayMode
Definition config.h:363
cSetup(void)
Definition config.c:374
int SiteLon
Definition config.h:292
int OSDTop
Definition config.h:342
int AdaptiveSkipAlternate
Definition config.h:372
int UseVps
Definition config.h:326
time_t NextWakeupTime
Definition config.h:361
void StoreLanguages(const char *Name, int *Values)
Definition config.c:571
int DisplaySubtitles
Definition config.h:302
bool ParseLanguages(const char *Value, int *Values)
Definition config.c:590
int ChannelInfoTime
Definition config.h:340
int SiteLat
Definition config.h:291
int VolumeLinearize
Definition config.h:380
int ChannelsWrap
Definition config.h:383
int EPGScanMaxChannel
Definition config.h:307
double FontFixSizeP
Definition config.h:352
int AudioLanguages[I18N_MAX_LANGUAGES+1]
Definition config.h:301
int OSDMessageTime
Definition config.h:344
int MarkInstantRecord
Definition config.h:283
double OSDLeftP
Definition config.h:341
int RecordingDirs
Definition config.h:328
int PausePriority
Definition config.h:324
double FontSmlSizeP
Definition config.h:351
int OSDLeft
Definition config.h:342
int AdaptiveSkipTimeout
Definition config.h:371
int MenuKeyCloses
Definition config.h:282
int DiSEqC
Definition config.h:289
char NameInstantRecord[NAME_MAX+1]
Definition config.h:284
char FontOsd[MAXFONTNAME]
Definition config.h:347
int UseSubtitle
Definition config.h:325
int OSDWidth
Definition config.h:342
int MinEventTimeout
Definition config.h:360
int ChannelInfoPos
Definition config.h:339
int LnbFrequHi
Definition config.h:288
void Store(const char *Name, const char *Value, const char *Plugin=NULL, bool AllowMultiple=false)
Definition config.c:525
char FontSml[MAXFONTNAME]
Definition config.h:348
int MultiSpeedMode
Definition config.h:362
int __BeginData__
Definition config.h:273
int EPGScanTimeout
Definition config.h:309
int TimeTransponder
Definition config.h:298
int VideoFormat
Definition config.h:336
int MaxVideoFileSize
Definition config.h:356
cString DeviceBondings
Definition config.h:388
int PositionerSwing
Definition config.h:294
double OSDTopP
Definition config.h:341
int PositionerLastLon
Definition config.h:295
int PauseOnMarkSet
Definition config.h:366
int DelTimeshiftRec
Definition config.h:358
int SetSystemTime
Definition config.h:296
int PrimaryDVB
Definition config.h:277
int ChannelEntryTimeout
Definition config.h:317
char FontFix[MAXFONTNAME]
Definition config.h:349
int TimeSource
Definition config.h:297
int UseDolbyDigital
Definition config.h:338
int PauseOnMarkJump
Definition config.h:367
int ColorKey1
Definition config.h:334
int ShowRemainingTime
Definition config.h:364
int CurrentDolby
Definition config.h:381
cString InitialChannel
Definition config.h:387
int DefaultSortModeRec
Definition config.h:331
char SVDRPHostName[HOST_NAME_MAX]
Definition config.h:314
int RcRepeatDelta
Definition config.h:319
int InstantRecordTime
Definition config.h:285
int NumberKeysForChars
Definition config.h:333
int SkipEdited
Definition config.h:368
int PauseLifetime
Definition config.h:324
int InitialVolume
Definition config.h:382
static int FromString(const char *s)
Definition sources.c:65
static cString ToString(int Code)
Definition sources.c:52
static cString sprintf(const char *fmt,...) __attribute__((format(printf
Definition tools.c:1212
int Size(void) const
Definition tools.h:767
#define ChkDoublePlausibility(Variable, Default)
Definition config.c:24
cNestedItemList Commands
Definition config.c:275
cSetup Setup
Definition config.c:372
cSVDRPhosts SVDRPhosts
Definition config.c:280
cNestedItemList Folders
Definition config.c:274
cNestedItemList RecordingCommands
Definition config.c:276
#define MaxSkinName
Definition config.h:70
#define SUBTITLES_NO
Definition config.h:86
#define DEFRETENTIONTIME
Definition config.h:52
#define STANDARD_DVB
Definition config.h:80
#define MAXLIFETIME
Definition config.h:50
uint32_t in_addr_t
Definition config.h:90
#define TIMERMACRO_EPISODE
Definition config.h:55
#define DEFINSTRECTIME
Definition config.h:51
#define MaxThemeName
Definition config.h:71
#define TIMERMACRO_TITLE
Definition config.h:54
#define MAXVOLUME
Definition device.h:32
const char * DefaultFontOsd
Definition font.c:24
const char * DefaultFontSml
Definition font.c:25
const char * DefaultFontFix
Definition font.c:26
#define MAXFONTNAME
Definition font.h:17
const cStringList * I18nLanguages(void)
Returns the list of available languages.
Definition i18n.c:263
int I18nLanguageIndex(const char *Code)
Returns the index of the language with the given three letter language Code.
Definition i18n.c:290
void I18nSetLocale(const char *Locale)
Sets the current locale to Locale.
Definition i18n.c:231
const char * I18nLanguageCode(int Language)
Returns the three letter language code of the given Language (which is an index as returned by I18nCu...
Definition i18n.c:285
#define MAXVIDEOFILESIZEDEFAULT
Definition recording.h:491
@ rsmTime
Definition recording.h:598
@ rsdAscending
Definition recording.h:597
Definition runvdr.c:107
char * Utf8Strn0Cpy(char *Dest, const char *Src, int n)
Copies at most n character bytes from Src to Dest, making sure that the resulting copy ends with a co...
Definition tools.c:932
bool isempty(const char *s)
Definition tools.c:357
char * strreplace(char *s, char c1, char c2)
Definition tools.c:142
cString dtoa(double d, const char *Format)
Converts the given double value to a string, making sure it uses a '.
Definition tools.c:445
const char * GetHostName(void)
Gets the host name of this machine.
Definition tools.c:1426
cString Indent(int n, const char *s)
Returns the given string s, preceeded with n blanks for indentation.
Definition tools.c:410
char * compactspace(char *s)
Definition tools.c:239
double atod(const char *s)
Converts the given string, which is a floating point number using a '.
Definition tools.c:424
char * stripspace(char *s)
Definition tools.c:227
char * strn0cpy(char *dest, const char *src, size_t n)
Definition tools.c:131
#define LOG_ERROR_STR(s)
Definition tools.h:40
#define MALLOC(type, size)
Definition tools.h:47
char * skipspace(const char *s)
Definition tools.h:244
#define esyslog(a...)
Definition tools.h:35
#define isyslog(a...)
Definition tools.h:36