aboutsummaryrefslogblamecommitdiffstats
path: root/config_load.h
blob: 8d32ed75e1ed0683122d6b65dc62d38afc4901df (plain) (tree)







































                                                                                    
#ifndef __CONFIG_LOAD_H
#define __CONFIG_LOAD_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#include "arg.h"
#include "iniparser.h"
#include "debug.h"

#include "config_servers.h"
#include "sds.h"
#include "util.h"

typedef struct config_ini {
	dictionary *ini; //dict with configs
} config_ini;

/*
Load config file to dict
config should be NULL
*/
int  config_load_ini(char *ini_fname, config_ini **config);
/*
How many servers there are to be configured,count
*/
int  config_server_num(config_ini *config);
/*
server_conf should be preallocated
*/
int  config_get_irc_config(config_ini *config, int n, irc_server_conf *server_conf);
/*
free internal structures
*/
void config_free(config_ini *config);


#endif