00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _CONFIGURATION_H_
00020 #define _CONFIGURATION_H_
00021
00022 #include "nntpgrab.h"
00023
00024 typedef struct Configuration Configuration;
00025
00026 #define CONFIGURATION_TYPE_OBJECT (configuration_get_type ())
00027 #define CONFIGURATION(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), CONFIGURATION_TYPE_OBJECT, Configuration))
00028 #define CONFIGURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIGURATION_TYPE_OBJECT, ConfigurationClass))
00029 #define IS_CONFIGURATION(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), CONFIGURATION_TYPE_OBJECT))
00030 #define IS_CONFIGURATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIGURATION_TYPE_OBJECT))
00031 #define CONFIGURATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIGURATION_TYPE_OBJECT, ConfigurationClass))
00032
00033 Configuration *configuration_new(char **errmsg, char **warnings);
00034 void configuration_destroy(Configuration *obj);
00035
00036 GList *configuration_get_avail_servers(Configuration *obj);
00037 void configuration_free_avail_servers(Configuration *obj, GList *servers);
00038 ConfigServer *configuration_get_server_info(Configuration *obj, const char *servername);
00039 gboolean configuration_add_server(Configuration *obj, ConfigServer new_server, char **errmsg);
00040 gboolean configuration_del_server(Configuration *obj, const char *servername, char **errmsg);
00041 gboolean configuration_edit_server(Configuration *obj, const char *servername, ConfigServer new_server, char **errmsg);
00042 ConfigGroupInfo configuration_get_newsgroup_info(Configuration *obj, const char *servername, const char *newsgroup);
00043 void configuration_set_newsgroup_info(Configuration *obj, const char *servername, const char *newsgroup, ConfigGroupInfo info);
00044 ConfigOpts configuration_get_opts(Configuration *obj);
00045 void configuration_set_opts(Configuration *obj, ConfigOpts opts);
00046 gboolean configuration_load(Configuration *config, char **errmsg);
00047 gboolean configuration_save(Configuration *config, char **errmsg);
00048 gboolean configuration_get_folder_listing(Configuration *obj, const char *parent, GList **folders);
00049 void configuration_free_folder_listing(Configuration *obj, GList *folders);
00050
00051 #endif