| NNTPGrab Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
ConfigGroupInfo; NNTPGrabPart; NNTPGrabFolder; NNTPGrabPluginInfo; enum ConfigChangedFlag; enum NGSchedularState; enum NNTPDisconnectType; enum NNTPFileType; enum NGTaskState; enum PAR2FileState; enum NGLogLevel; void (*ForeachCollectionFunc) (const char *collection_name,const char *poster,nguint64 total_size,nguint64 total_size_remaining,int position,void *user_data); void (*ForeachFileFunc) (const char *collection_name,const char *subject,const char *poster,ngint64 stamp,nguint64 file_size,nguint64 file_size_remaining,int position,int num_parts_total,int num_parts_downloaded,int num_parts_failed,NGTaskState status,const char *filename,void *user_data); void (*ForeachGroupFunc) (const char *collection_name,const char *subject,const char *group,void *user_data);
typedef struct {
char newsgroup[256];
ngboolean is_subscribed;
ngboolean is_moderated;
int num_articles;
int start_article;
int end_article;
time_t last_checked;
} ConfigGroupInfo;
This structure is currently unused in NNTPGrab 0.6
typedef struct {
char message_id[256];
int size;
int part_num;
} NNTPGrabPart;
This structure is used for the functions nntpgrab_core_schedular_add_task_to_queue() and nntpgrab_schedular_add_task_to_queue()
typedef struct {
char folder[2048];
ngboolean has_subfolders;
} NNTPGrabFolder;
This structure is used for the functions nntpgrab_utils_get_folder_listing() and nntpgrab_config_get_avail_servers()
typedef struct {
char name[128];
char version[64];
char author[128];
char url[256];
char description[4096];
ngboolean is_loaded;
ngboolean is_persistent;
} NNTPGrabPluginInfo;
This structure is used by the functions nntpgrab_core_plugins_get_plugin_info() and nntpgrab_plugins_get_plugin_info()
| The name of the plugin | |
| The version of the plugin | |
| Who created the plugin | |
| A link to the website of the plugin | |
| A description indicated the purpose of the plugin | |
| Whether the plugin is loaded at the moment | |
| Unused in NNTPGrab 0.6 |
typedef enum {
CONFIG_CHANGED_NOTHING,
CONFIG_CHANGED_SERVER_ADDED,
CONFIG_CHANGED_SERVER_DELETED,
CONFIG_CHANGED_OPTS_CHANGED
} ConfigChangedFlag;
typedef enum {
SCHEDULAR_STATE_RUNNING,
SCHEDULAR_STATE_STOPPING,
SCHEDULAR_STATE_STOPPED
} NGSchedularState;
typedef enum _nntp_disconnect_type {
DISCONNECT_NORMAL,
DISCONNECT_NO_SUCH_HOST,
DISCONNECT_CONNECTION_REFUSED,
DISCONNECT_TOO_MANY_CONNECTIONS,
DISCONNECT_CONNECT_TIMEOUT,
DISCONNECT_READ_ERROR,
DISCONNECT_READ_TIMEOUT,
DISCONNECT_WRITE_ERROR,
DISCONNECT_IDLE_TIMEOUT,
DISCONNECT_INVALID_MSG,
DISCONNECT_LOGIN_FAILURE,
DISCONNECT_ERROR_SSL_INITIALISE,
DISCONNECT_UNEXPECTED
} NNTPDisconnectType;
typedef enum _nntp_file_type {
NNTP_FILE_TYPE_UNKNOWN,
NNTP_FILE_TYPE_RAR,
NNTP_FILE_TYPE_PAR,
NNTP_FILE_TYPE_PAR2,
NNTP_FILE_TYPE_SFV,
NNTP_FILE_TYPE_NFO,
NNTP_FILE_TYPE_NZB,
NNTP_FILE_TYPE_OTHER
} NNTPFileType;
typedef enum {
TASK_STATE_WAITING_FOR_DOWNLOAD,
TASK_STATE_DOWNLOADING,
TASK_STATE_WAITING_FOR_DECODE,
TASK_STATE_DECODING,
TASK_STATE_FINISHED_COMPLETE,
TASK_STATE_FINISHED_INCOMPLETE,
TASK_STATE_FINISHED_NO_PARTS_AVAIL,
TASK_STATE_SKIPPED
} NGTaskState;
typedef enum _par2_file_state {
PAR2_FILE_STATE_MISSING,
PAR2_FILE_STATE_FOUND,
PAR2_FILE_STATE_DAMAGED,
PAR2_FILE_STATE_NO_NEW_BLOCKS_FOUND
} PAR2FileState;
This is currently unused in NNTPGrab 0.6
typedef enum {
NG_LOG_LEVEL_ALL = 0,
NG_LOG_LEVEL_INFO,
NG_LOG_LEVEL_WARNING,
NG_LOG_LEVEL_ERROR,
NG_LOG_LEVEL_FATAL,
NG_LOG_LEVEL_DEBUG,
} NGLogLevel;
void (*ForeachCollectionFunc) (const char *collection_name,const char *poster,nguint64 total_size,nguint64 total_size_remaining,int position,void *user_data);
|
The name of the collection |
|
The poster of the collection. Can be NULL if multiple posters are involved. [allow-none] |
|
The total size of the collection in bytes |
|
The number of bytes of files in this collection which still need to be downloaded |
|
The position of this collection in the entire download queue |
|
User provided callback data |
void (*ForeachFileFunc) (const char *collection_name,const char *subject,const char *poster,ngint64 stamp,nguint64 file_size,nguint64 file_size_remaining,int position,int num_parts_total,int num_parts_downloaded,int num_parts_failed,NGTaskState status,const char *filename,void *user_data);
|
The name of the collection |
|
The subject of the current file |
|
The poster of the file |
|
The timestamp indicating when the file was posted |
|
The size of the file in bytes |
|
The number of bytes of this file which still need to be downloaded |
|
The position of this file in the current collection |
|
The total number of parts of which this file consists |
|
The number of parts of this file which are already downloaded |
|
The number of parts of this file which failed to download |
|
The current status of this file |
|
User provided callback data |
void (*ForeachGroupFunc) (const char *collection_name,const char *subject,const char *group,void *user_data);
|
The name of the collection |
|
The subject of the current file |
|
The group in which this file is posted |
|
User provided callback data |