#include #include #include #include #include #include #include #include #include #include "nntpgrab_plugin_schedular.h"#include "schedular_plugin.h"Go to the source code of this file.
Data Structures |
|
| struct | SchedularPluginClass |
| struct | _part_download_done |
Typedefs |
|
| typedef struct SchedularPluginClass | SchedularPluginClass |
Functions |
|
| G_DEFINE_TYPE (SchedularPlugin, schedular_plugin, G_TYPE_OBJECT) | |
| gboolean | nntpgrab_plugin_schedular_initialize (PluginSchedularImportedFuncs funcs, char **errmsg) |
| Initialize the plugin. |
|
| void | nntpgrab_plugin_schedular_destroy (void) |
| Destroy the plugin. |
|
| int | nntpgrab_plugin_schedular_get_version (void) |
| Return the API version of the plugin. |
|
| gboolean | get_next_part_to_download (SchedularPlugin *schedular, int server_id, NNTPCollection **collection, NNTPFile **file, NNTPPart **part, GThreadPool *poolDecoder) |
| void | update_part_download_status (NNTPCollection *collection, NNTPFile *file, NNTPPart *part, int server_id, gboolean success, gboolean reset_to_zero, gboolean queue_is_being_paused, gboolean dont_retry_anymore, gpointer nntpconnection) |
| void | stop_schedular_from_seperate_thread (const char *reason) |
| gboolean | nntpgrab_plugin_schedular_start (void) |
| Start the schedular thread. |
|
| gboolean | nntpgrab_plugin_schedular_stop (const char *reason) |
| Stop/pause the schedular thread. |
|
| SchedularState | nntpgrab_plugin_schedular_get_state (void) |
| Retrieves the status of the schedular. |
|
| gboolean | nntpgrab_plugin_schedular_add_task_to_queue (const char *collection_name, NNTPFile *file, char **errmsg) |
| Add a new task to the download queue. |
|
| gboolean | nntpgrab_plugin_schedular_del_task_from_queue (const char *collection_name, const char *subject, char **errmsg) |
| Remove a task from the download queue. |
|
| gboolean | nntpgrab_plugin_schedular_restart_task (const char *collection_name, const char *subject, char **errmsg) |
| Restarts a task. |
|
| gboolean | nntpgrab_plugin_schedular_save_queue (char **errmsg) |
| Saves the download queue to disk. |
|
| void | nntpgrab_plugin_schedular_foreach_task (GFunc foreach_func, gpointer data) |
| Get a list of all the tasks which are already in the download queue. |
|
| gboolean | nntpgrab_plugin_schedular_move_task (const char *collection_name_src, const char *subject_src, const char *collection_name_dest, int position_dest) |
| Moves one item in the download queue to a new position and collection. |
|
| gboolean | nntpgrab_plugin_schedular_move_collection (const char *collection_name, int new_position) |
| Moves the position of one collection in the download queue. |
|
| gboolean | schedular_plugin_save_queue (char **errmsg) |
| typedef struct SchedularPluginClass SchedularPluginClass |
Definition at line 34 of file plugins/schedular/schedular.c.
| G_DEFINE_TYPE | ( | SchedularPlugin | , | |
| schedular_plugin | , | |||
| G_TYPE_OBJECT | ||||
| ) |
| gboolean get_next_part_to_download | ( | SchedularPlugin * | schedular, | |
| int | server_id, | |||
| NNTPCollection ** | collection, | |||
| NNTPFile ** | file, | |||
| NNTPPart ** | part, | |||
| GThreadPool * | poolDecoder | |||
| ) |
Definition at line 138 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_add_task_to_queue | ( | const char * | collection_name, | |
| NNTPFile * | file, | |||
| char ** | errmsg | |||
| ) |
Add a new task to the download queue.
Definition at line 784 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_del_task_from_queue | ( | const char * | collection_name, | |
| const char * | subject, | |||
| char ** | errmsg | |||
| ) |
Remove a task from the download queue.
Definition at line 875 of file plugins/schedular/schedular.c.
| void nntpgrab_plugin_schedular_destroy | ( | void | ) |
Destroy the plugin.
Definition at line 62 of file plugins/schedular/schedular.c.
| void nntpgrab_plugin_schedular_foreach_task | ( | GFunc | foreach_func, | |
| gpointer | data | |||
| ) |
Get a list of all the tasks which are already in the download queue.
Definition at line 1084 of file plugins/schedular/schedular.c.
| SchedularState nntpgrab_plugin_schedular_get_state | ( | void | ) |
Retrieves the status of the schedular.
Definition at line 747 of file plugins/schedular/schedular.c.
| int nntpgrab_plugin_schedular_get_version | ( | void | ) |
Return the API version of the plugin.
This is used to verify that the plugin is compatible with the interface the NNTPGrab Core expects
Definition at line 68 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_initialize | ( | PluginSchedularImportedFuncs | funcs, | |
| char ** | errmsg | |||
| ) |
Initialize the plugin.
Definition at line 46 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_move_collection | ( | const char * | collection_name, | |
| int | new_position | |||
| ) |
Moves the position of one collection in the download queue.
Definition at line 1196 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_move_task | ( | const char * | collection_name_src, | |
| const char * | subject_src, | |||
| const char * | collection_name_dest, | |||
| int | position_dest | |||
| ) |
Moves one item in the download queue to a new position and collection.
Definition at line 1096 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_restart_task | ( | const char * | collection_name, | |
| const char * | subject, | |||
| char ** | errmsg | |||
| ) |
Restarts a task.
All parts will be downloaded and decoded again
Definition at line 984 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_save_queue | ( | char ** | errmsg | ) |
Saves the download queue to disk.
Definition at line 1077 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_start | ( | void | ) |
Start the schedular thread.
Any items in the download queue will be downloaded
Definition at line 626 of file plugins/schedular/schedular.c.
| gboolean nntpgrab_plugin_schedular_stop | ( | const char * | reason | ) |
Stop/pause the schedular thread.
Active download jobs will be finished, but no new ones will be started.
Definition at line 705 of file plugins/schedular/schedular.c.
| gboolean schedular_plugin_save_queue | ( | char ** | errmsg | ) |
Definition at line 1246 of file plugins/schedular/schedular.c.
| void stop_schedular_from_seperate_thread | ( | const char * | reason | ) |
Definition at line 516 of file plugins/schedular/schedular.c.
| void update_part_download_status | ( | NNTPCollection * | collection, | |
| NNTPFile * | file, | |||
| NNTPPart * | part, | |||
| int | server_id, | |||
| gboolean | success, | |||
| gboolean | reset_to_zero, | |||
| gboolean | queue_is_being_paused, | |||
| gboolean | dont_retry_anymore, | |||
| gpointer | nntpconnection | |||
| ) |
Definition at line 390 of file plugins/schedular/schedular.c.