1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/*
* config.c:
*
* See the README file for copyright information and how to reach the author.
*
*/
#include <syslog.h>
#include "config.h"
//***************************************************************************
// Statics
//***************************************************************************
int cEpgConfig::logstdout = no;
int cEpgConfig::loglevel = 1;
int cEpgConfig::argLoglevel = na;
int cEpgConfig::logFacility = LOG_USER;
const char* cEpgConfig::logName = "unknown";
//***************************************************************************
// Common EPG Service Configuration
//***************************************************************************
cEpgConfig::cEpgConfig()
{
// database connection
sstrcpy(dbHost, "localhost", sizeof(dbHost));
dbPort = 3306;
sstrcpy(dbName, "epg2vdr", sizeof(dbName));
sstrcpy(dbUser, "epg2vdr", sizeof(dbUser));
sstrcpy(dbPass, "epg", sizeof(dbPass));
sstrcpy(netDevice, getFirstInterface(), sizeof(netDevice));
uuid[0] = 0;
getepgimages = yes;
}
//***************************************************************************
// Has DB Login Changed
//***************************************************************************
int cEpgConfig::hasDbLoginChanged(cEpgConfig* old)
{
if (old->dbPort != dbPort ||
strcmp(old->dbHost, dbHost) != 0 ||
strcmp(old->dbName, dbName) != 0 ||
strcmp(old->dbUser, dbUser) != 0 ||
strcmp(old->dbPass, dbPass) != 0)
{
return yes;
}
return no;
}
|