nntpgrab_plugin_schedular.h File Reference

#include "nntpgrab_plugin_base.h"
#include "collections.h"

Go to the source code of this file.


Data Structures

struct   _plugin_schedular_imported_funcs

Typedefs

typedef struct
_plugin_schedular_imported_funcs 
PluginSchedularImportedFuncs

Functions

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  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.

Typedef Documentation

typedef struct _plugin_schedular_imported_funcs PluginSchedularImportedFuncs


Function Documentation

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.

Returns:
TRUE on success, FALSE when the subject was not found in the given collection

void nntpgrab_plugin_schedular_destroy ( void   ) 

Destroy the plugin.

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.

SchedularState nntpgrab_plugin_schedular_get_state ( void   ) 

Retrieves the status of the schedular.

Returns:
SCHEDULAR_STATE_RUNNING when the schedular is running, SCHEDULAR_STATE_STOPPING when the schedular is waiting for jobs to finish so the schedular can be stopped SCHEDULAR_STATE_STOPPED when the schedular is not running

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

Returns:
NNTPGRAB_PLUGIN_API_VERSION

gboolean nntpgrab_plugin_schedular_initialize ( PluginSchedularImportedFuncs  funcs,
char **  errmsg  
)

Initialize the plugin.

Returns:
TRUE when the initialization was successfull

gboolean nntpgrab_plugin_schedular_move_collection ( const char *  collection_name,
int  new_position  
)

Moves the position of one collection in the download queue.

Returns:
TRUE when the collection has been successfully moved

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.

Returns:
TRUE when the task has been successfully moved

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

Returns:
TRUE on success, FALSE when the subject was not found in the given collection

gboolean nntpgrab_plugin_schedular_save_queue ( char **  errmsg  ) 

Saves the download queue to disk.

gboolean nntpgrab_plugin_schedular_start ( void   ) 

Start the schedular thread.

Any items in the download queue will be downloaded

Returns:
FALSE when the queue is already started

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.

Returns:
FALSE when the queue is already stopped


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