nntpgrab.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 _NNTPGRAB_H_
00020 #define _NNTPGRAB_H_
00021 
00022 #include "nntpgrab_types.h"
00023 
00024 #ifdef __cplusplus
00025 extern "C" {
00026 #endif
00027 
00028 #define NNTPGRAB_API_VERSION 20090505
00029 
00030 typedef struct NNTPGrabCore NNTPGrabCore;
00031 typedef struct NNTPGrabCoreClass NNTPGrabCoreClass;
00032 
00044 NNTPGrabCore   *nntpgrab_core_init(int version, char **err, char **warnings);
00045 
00051 void            nntpgrab_core_cleanup(NNTPGrabCore *obj);
00052 
00059 NGList         *nntpgrab_core_config_get_avail_servers(NNTPGrabCore *obj);
00060 
00067 void            nntpgrab_core_config_free_avail_servers(NNTPGrabCore *obj, NGList *servers);
00068 
00077 ngboolean       nntpgrab_core_config_get_server_info(NNTPGrabCore *obj, const char *servername, ConfigServer *server);
00078 
00087 ngboolean       nntpgrab_core_config_add_server(NNTPGrabCore *obj, ConfigServer new_server, char **errmsg);
00088 
00097 ngboolean       nntpgrab_core_config_del_server(NNTPGrabCore *obj, const char *servername, char **errmsg);
00098 
00108 ngboolean       nntpgrab_core_config_edit_server(NNTPGrabCore *obj, const char *servername, ConfigServer server, char **errmsg);
00109 
00116 ConfigOpts      nntpgrab_core_config_get_opts(NNTPGrabCore *obj);
00117 
00124 void            nntpgrab_core_config_set_opts(NNTPGrabCore *obj, ConfigOpts opts);
00125 
00134 ngboolean       nntpgrab_core_config_get_folder_listing(NNTPGrabCore *obj, const char *parent, NGList **folders);
00135 
00142 void            nntpgrab_core_config_free_folder_listing(NNTPGrabCore *obj, NGList *folders);
00143 
00150 ngboolean       nntpgrab_core_schedular_start(NNTPGrabCore *obj);
00151 
00159 ngboolean       nntpgrab_core_schedular_stop(NNTPGrabCore *obj, ngboolean wait);
00160 
00167 SchedularState  nntpgrab_core_schedular_get_state(NNTPGrabCore *obj);
00168 
00183 ngboolean       nntpgrab_core_schedular_add_task_to_queue(NNTPGrabCore *obj, const char *collection_name, const char *subject, const char *poster, time_t stamp, nguint64 file_size, NGList *groups, NGList *parts, char **errmsg);
00184 
00194 ngboolean       nntpgrab_core_schedular_del_task_from_queue(NNTPGrabCore *obj, const char *collection_name, const char *subject, char **errmsg);
00195 
00205 ngboolean       nntpgrab_core_schedular_restart_task(NNTPGrabCore *obj, const char *collection_name, const char *subject, char **errmsg);
00206 
00216 ngboolean       nntpgrab_core_schedular_save_queue(NNTPGrabCore *obj, char **errmsg);
00217 
00227 void            nntpgrab_core_schedular_foreach_task(NNTPGrabCore *obj, ForeachCollectionFunc collection_func, ForeachFileFunc file_func, ForeachGroupFunc group_func, void *data);
00228 
00239 ngboolean       nntpgrab_core_schedular_move_task(NNTPGrabCore *obj, const char *collection_name_src, const char *subject_src, const char *collection_name_dest, int position_dest);
00240 
00249 ngboolean       nntpgrab_core_schedular_move_collection(NNTPGrabCore *obj, const char *collection_name, int new_position);
00250 
00251 #ifdef __cplusplus
00252 }
00253 #endif
00254 
00255 #endif /* _NNTPGRAB_H_ */

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