Add silent channel option
[umurmur.git] / src / conf.h
index 3a469b27e6e41f2ee9d6b40c8932232dd9510b1c..d30ed416b1667741b4bd74cc036312acfd199f98 100644 (file)
@@ -1,5 +1,5 @@
-/* Copyright (C) 2009, Martin Johansson <martin@fatbob.nu>
-   Copyright (C) 2005-2009, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2009-2013, Martin Johansson <martin@fatbob.nu>
+   Copyright (C) 2005-2013, Thorvald Natvig <thorvald@natvig.com>
 
    All rights reserved.
 
@@ -33,6 +33,8 @@
 
 #include "messages.h"
 
+#define DEFAULT_CONFIG "/etc/umurmur.conf"
+
 typedef enum param {
        CERTIFICATE,
        KEY,
@@ -42,25 +44,40 @@ typedef enum param {
        WELCOMETEXT,
        MAX_BANDWIDTH,
        MAX_CLIENTS,
-       DEAFULT_CHANNEL,
+       DEFAULT_CHANNEL,
+       USERNAME,
+       GROUPNAME,
+       LOGFILE,
+       ADMIN_PASSPHRASE,
+       BAN_LENGTH,
+       ALLOW_TEXTMESSAGE,
+       ENABLE_BAN,
+       BANFILE,
+       SYNC_BANFILE,
+       OPUS_THRESHOLD,
+       SILENT_CHANNEL,
 } param_t;
 
 typedef struct {
-       char parent[MAX_TEXT];
-       char name[MAX_TEXT];
-       char description[MAX_TEXT];
+       const char *parent;
+       const char *name;
+       const char *description;
+       const char *password;
+       bool_t noenter, silent;
 } conf_channel_t;
 
 typedef struct {
-       char source[MAX_TEXT];
-       char destination[MAX_TEXT];
+       const char *source;
+       const char *destination;
 } conf_channel_link_t;
 
-int Conf_init(const char *conffile);
+void Conf_init(const char *conffile);
 void Conf_deinit();
+bool_t Conf_ok(const char *conffile);
 
 const char *getStrConf(param_t param);
 int getIntConf(param_t param);
+bool_t getBoolConf(param_t param);
 int Conf_getNextChannel(conf_channel_t *chdesc, int index);
 int Conf_getNextChannelLink(conf_channel_link_t *chlink, int index);