]> code.citadel.org Git - citadel.git/blobdiff - citadel/config.h
Completed the get/set config functions.
[citadel.git] / citadel / config.h
index 28636eef97aae776b9ff4e97685a29eac10db277..8da53f8970adb1297217ea632e7bff2076232d4b 100644 (file)
@@ -1,37 +1,29 @@
 /*
- * $Id$
+ * Copyright (c) 1987-2015 by the citadel.org team
  *
- * Copyright (c) 1987-2009 by the citadel.org team
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  */
 
 #include "serv_extensions.h"
 #include "citadel_dirs.h"
 
-/* 
- * Global system configuration.  Don't change anything here.  It's all in dtds/config-defs.h now.
- */
-struct config {
-#include "datadefinitions.h"
-#include "dtds/config-defs.h"
-#include "undef_data.h"
-};
-
+#define CtdlGetConfigInt(x)    atoi(CtdlGetConfigStr(x))
+#define CtdlGetConfigLong(x)   atol(CtdlGetConfigStr(x))
 
-void get_config(void);
+void initialize_config_system(void);
+void shutdown_config_system(void);
 void put_config(void);
-extern struct config config;
+void CtdlSetConfigStr(char *, char *);
+char *CtdlGetConfigStr(char *);
+void CtdlSetConfigInt(char *key, int value);
+void CtdlSetConfigLong(char *key, long value);
 
+char *CtdlGetSysConfig(char *sysconfname);
+void CtdlPutSysConfig(char *sysconfname, char *sysconfdata);
+void validate_config(void);