Automation functions

Automation functions

Synopsis

typedef             NNTPGrabAutoImport;
typedef             NNTPGrabAutoImportClass;
NGConfigOpts        (*ConfigGetOptsFunc)                (void *user_data);
void                (*ImportNZBFileFunc)                (void *user_data,
                                                         NNTPGrabNZB *nzbfile,
                                                         const char *filename,
                                                         char **errmsg);
void                nntpgrab_automation_auto_import_destroy
                                                        (NNTPGrabAutoImport *auto_import);
NNTPGrabAutoImport * nntpgrab_automation_auto_import_new
                                                        (ConfigGetOptsFunc config_get_opts_func,
                                                         ImportNZBFileFunc import_nzb_file_func,
                                                         void *user_data);
void                nntpgrab_automation_disable_auto_import
                                                        (NNTPGrabAutoImport *auto_import);
ngboolean           nntpgrab_automation_enable_auto_import
                                                        (NNTPGrabAutoImport *auto_import,
                                                         const char *directory,
                                                         char **errmsg);

Object Hierarchy

  GObject
   +----NNTPGrabAutoImport

Signals

  "nzb-imported"                                   : Run Last / Has Details

Description

Details

NNTPGrabAutoImport

typedef struct NNTPGrabAutoImport NNTPGrabAutoImport;

NNTPGrabAutoImportClass

typedef struct NNTPGrabAutoImportClass NNTPGrabAutoImportClass;

ConfigGetOptsFunc ()

NGConfigOpts        (*ConfigGetOptsFunc)                (void *user_data);

ImportNZBFileFunc ()

void                (*ImportNZBFileFunc)                (void *user_data,
                                                         NNTPGrabNZB *nzbfile,
                                                         const char *filename,
                                                         char **errmsg);

nntpgrab_automation_auto_import_destroy ()

void                nntpgrab_automation_auto_import_destroy
                                                        (NNTPGrabAutoImport *auto_import);

Destroy an NNTPGrabAutoImport object

auto_import :

The NNTPGrabAutoImport object which needs to be destroyed

nntpgrab_automation_auto_import_new ()

NNTPGrabAutoImport * nntpgrab_automation_auto_import_new
                                                        (ConfigGetOptsFunc config_get_opts_func,
                                                         ImportNZBFileFunc import_nzb_file_func,
                                                         void *user_data);

Create a new NNTPGrabAutoImport object

config_get_opts_func :

The function which can be called to retrieve configuration settings

import_nzb_file_func :

The function which can be called in order to import an NZB file

user_data :

User provided callback data

nntpgrab_automation_disable_auto_import ()

void                nntpgrab_automation_disable_auto_import
                                                        (NNTPGrabAutoImport *auto_import);

Stop monitoring of a folder for new NZB files

auto_import :

An instance of the NNTPGrabAutoImport

nntpgrab_automation_enable_auto_import ()

ngboolean           nntpgrab_automation_enable_auto_import
                                                        (NNTPGrabAutoImport *auto_import,
                                                         const char *directory,
                                                         char **errmsg);

Enable monitoring of a specific folder Only one folder can be monitored by one NNTPGrabAutoImport instance at a time

auto_import :

An instance of the NNTPGrabAutoImport

directory :

The folder which needs to be monitored for NZB files

errmsg :

Location to catch error messages. Can be NULL to ignore errors. [allow-none][out]

Returns :

TRUE on success, FALSE on failure (errmsg will be set)

Signal Details

The "nzb-imported" signal

void                user_function                      (NNTPGrabAutoImport *obj,
                                                        gchar              *filename,
                                                        gchar              *collection_name,
                                                        gpointer            user_data)            : Run Last / Has Details

A NZB file has successfully been detected and imported to the download queue

obj :

An instance of the NNTPGrabAutoImport

filename :

The filename of the NZB file which has just been imported

collection_name :

The name of the collection in which this NZB file has been imported

user_data :

user data set when the signal handler was connected.