![]() |
![]() |
![]() |
NNTPGrab Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
enum ServerPriority; ConfigServer; ConfigOpts; 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 enum { SERVER_PRIORITY_HIGH, SERVER_PRIORITY_NORMAL, SERVER_PRIORITY_LOW } ServerPriority;
typedef struct { char servername[128]; char hostname[128]; int port; char username[64]; char password[64]; int max_threads; ServerPriority priority; ngboolean use_ssl; ngboolean enabled; } ConfigServer;
The name of the server (this will be shown in the user interface) | |
The hostname of IP address of the server | |
The port on which a NNTP server is running on hostname
|
|
The username which is required to authenticate (can be "" if no username is required) | |
The password which is required to authenticate (can be "" if no password is required) | |
The maximum number of simultanous connections to this server | |
ServerPriority |
Will be used to determine the order in which servers needs to be used if there are multiple servers configured |
When TRUE, a SSL connection will be set up to the server, if FALSE, a regular NNTP connection will be set up | |
Whether is server needs to be used |
typedef struct { char download_directory[256]; char temp_directory[256]; ngboolean enable_intelligent_par2_downloading; ngboolean enable_par2_repair; char auto_import_directory[256]; ngboolean enable_auto_import; ngboolean move_file_after_auto_import; ngboolean enable_auto_unpack; ngboolean enable_bandwidth_shaping; int max_bandwidth; ngboolean enable_webserver; int webserver_port; ngboolean enable_logger; ngboolean auto_remove_files; } ConfigOpts;
The folder in which all downloads need to be saved | |
The folder where all temporary downloaded parts will be saved | |
If TRUE, PAR2 files will only be downloaded when needed. If FALSE, all files will be downloaded | |
Automatically repair files using PAR2 after a collection has been fully downloaded | |
The folder which needs to be monitored for new .NZB files | |
Whether the automatic import feature needs to be enabled (if TRUE, auto_import_directory also needs to be set to a sane value)
|
|
If TRUE, all automatically imported files will be moved to a folder named 'Imported' under auto_import_directory
|
|
Whether files needs to be unpacked automatically when a collection has been fully downloaded (and optionally repaired) | |
Whether bandwidth shaping needs to be applied | |
The maximum number of KB/sec which can be used for downloading if enable_bandwidth_shaping is set
|
|
Whether the embedded webserver needs to be activated. Requires the JSON-RPC plugin to be loaded | |
The port on which the embedded webserver needs to listen when enable_webserver is set
|
|
Whether automatic debug logging needs to be activated. Required the Logger plugin to be loaded. All logs will be saved to ~/.config/NNTPGrab/nntpgrab.log | |
Automatically remove files after a successfull PAR2 repair and automatic unpack |
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 |