/** 
 *  _   _        _  _                           _             
 * | |_| |  ___ | || |  ___   __ _  _ __  _ __ (_)  ___  _ __ 
 * |  _  | / _ \| || | / __| / _` || '__|| '__|| | / _ \| '__|
 * | | | ||  __/| || || (__ | (_| || |   | |   | ||  __/| |   
 * |_| |_| \___||_||_| \___| \__,_||_|   |_|   |_| \___||_|   
 * 
 *  (c) 2001 Free Lunch Design, Teknisk-IT, AerotechTelub
 *			  http://www.freelunchdesign.com
 * 
 * This source code is released as is under GPL (General Public
 * License). Please refer to license.txt for more information.
 * 
 */
 
#ifndef _CONFIG_H_
#define _CONFIG_H_

#define MAX_POSTS	128

typedef struct {
	char key[32];
	char data[32];
	int used;
} Tpost;

class config {

public:
	Tpost post[MAX_POSTS];

	config();
	~config();

	int load_data(char *fname);
	void save_data(char *fname);
	void get_data_string(char *key, char *dest);
	int get_data_int(char *key);
	float get_data_float(char *key);
	void set_data(char *key, char *data);
	void set_post(int index, char *k, char *d);
};


#endif