configuration.h

Go to the documentation of this file.
00001 /*
00002  Copyright (C) 2005-2009 Erik van Pienbroek
00003 
00004  This program is free software; you can redistribute it and/or modify
00005  it under the terms of the GNU General Public License as published by
00006  the Free Software Foundation; either version 2 of the License, or
00007  (at your option) any later version.
00008 
00009  This program is distributed in the hope that it will be useful,
00010  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00012  GNU General Public License for more details.
00013 
00014  You should have received a copy of the GNU General Public License
00015  along with this program; if not, write to the Free Software
00016  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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 /* _CONFIGURATION_H_ */

Generated on Thu May 21 21:25:05 2009 for NNTPGrab by  1.5.4