diff options
Diffstat (limited to 'mg_setup.c')
-rw-r--r-- | mg_setup.c | 34 |
1 files changed, 29 insertions, 5 deletions
@@ -1,5 +1,5 @@ /*! - * \file vdr_setup.c + * \file mg_setup.c * \brief A setup class for a VDR media plugin (muggle) * * \version $Revision: 1.3 $ @@ -7,7 +7,7 @@ * \author Ralf Klueber, Lars von Wedel, Andreas Kellner * \author Responsible author: $Author: wr61 $ * - * $Id: vdr_setup.c 399 2005-01-24 14:45:30Z wr61 $ + * $Id: mg_setup.c 399 2005-01-24 14:45:30Z wr61 $ * * Partially adapted from * MP3/MPlayer plugin to VDR (C++) @@ -16,6 +16,7 @@ #include "mg_setup.h" +#include <string> mgSetup the_setup; @@ -30,8 +31,31 @@ mgSetup::mgSetup () TargetLevel = DEFAULT_TARGET_LEVEL; LimiterLevel = DEFAULT_LIMITER_LEVEL; Only48kHz = 0; - ToplevelDir = "/mnt/music/"; - DbHost = "localhost"; - DbName = "GiantDisc"; + + DbHost = 0; + DbSocket = 0; + DbPort = 0; + DbName = strdup ("GiantDisc"); + DbUser = 0; + DbPass = 0; + ToplevelDir = strdup("/mnt/music/"); + DeleteStaleReferences = false; } + +mgSetup::~mgSetup () +{ + free(DbHost); + free(DbSocket); + free(DbName); + free(DbUser); + free(DbPass); + free(ToplevelDir); +} + +bool +mgSetup::NoHost() const +{ + return !DbHost || strlen(DbHost)==0; +} + |