NZBGetFacade documentation.

NZBGetFacade methods.

constructor

nzbgetfacade(bool usetls)

nzggetfacade constructor.

variables
bool
usetls
returns
none
none

geteventbox

eventbox *geteventbox() const

get the pointer to the event box, holding the status messages from libnzbget.

variables
none
none
returns
eventbox
pointer to the eventbox object, holding all log events from libnzbget.

addserver

void addserver(newsserver &pnewsserver)

add a news server to libnzbget, providing it's specifics in a newsserver object.

variables
pnewsserver
reference to the class holding the news server information.
returns
void
none

setqueuedir

void setqueuedir(std::string &path)

set the path to store the queue files in.

variables
path
path to store the queue files in.
returns
void
none

settempdir

void settempdir(std::string &tempdir)

set the path to store the temporary files for libnzbget.

variables
tempdir
path to store temporary files.
returns
void
none

setdestdir

void setdestdir(std::string &destdir)

set the directory the category directories are created in. the category files hold the downloaded files. the par2 checks and unrar actions both occur in the destdir+category path.

variables
destdir
path to store downloaded files.
returns
void
none

setdownloadrate

void setdownloadrate(const unsigned int rate)

set the maximal download rate in kb/s.

variables
rate
max download rate in kb/s.
returns
void
none

getnzbinfolist

nzbfacadeinfolist *getnzbinfolist() const

get the information of the nzb files that are being downloaded.

variables
none
none
returns
nzbfacadeinfolist
pointer to list holding al nzb's currently active.

getnzbhistorylist

nzbfacadeinfolist *getnzbinfolist() const

get the information of the nzb files that have finished downloading.

variables
none
none
returns
nzbfacadeinfolist
pointer to list holding al nzb's that have finished downloading.

addnzb

bool addnzb(const std::string &filename, const std::string &category)

Add a new NZB from file to libNZBGet.

variables
filename
Path to the NZB file.
category
Category to download NZB in.
returns
bool
Returns true on success otherwise false.

addnzb

bool addnzb(const std::string &filename, const std::string &category, const char *buffer, size_t length)

Add a new NZB from a buffer to libNZBGet.

variables
filename
Path to the NZB file.
category
Category to download NZB in.
buffer
Buffer to read NZB file from.
length
Lenght of the data in the buffer.
returns
bool
Returns true on success otherwise false.

delnzbfile

bool delnzbfile(nzbfacadeinfo *facade)

Delete a NZBFile from libNZBGet, stopping the download.

variables
facade
Pointer to the object to delete.
returns
bool
True when successfull false when failed.

delnzbfile

bool delnzbfile(int id)

Delete a NZBFile from libNZBGet, stopping the download.

variables
id
Id of the object to delete.
returns
bool
True when successfull false when failed.

clearhistory

void clearhistory()

Remove all finished NZB files from the history list.

variables
none
none
returns
void
none

setpar2check

void setpar2check(bool check)

Enable/Disable par2 checking on the downloaded NZB's.

variables
check
True to enable PAR2 checking, false te disable.
returns
void
none

setpar2repair

void setpar2repair(bool repair)

Enable/Disable par2 repairing on the downloaded NZB's.

variables
repair
True to enable PAR2 repairing, false te disable.
returns
void
none

setrarextract

void setrarextract(bool extract)

Enable/Disable rar extracting on the downloaded NZB's.

variables
extract
True to enable rar extracting, false te disable.
returns
void
none

setdelrarpost

void setdelrarpost(bool del)

Enable/Disable deleting downloaded files after rar extraction on the downloaded NZB's.

variables
del
True to enable after rar deletion, false te disable.
returns
void
none

setdelrarkeepnfo

void setdelrarkeepnfo(bool nfo)

Enable/Disable keeping .nfo files when deleting after rar extracting.

variables
nfo
True to keep .nfo files after rar deletion, false te disable.
returns
void
none

setcleanupqueue

void setcleanupqueue(bool cleanup)

Enable/Disable cleaning up queue dir after download.

variables
cleanup
True to enable queue directory cleanup, false te disable.
returns
void
none

setcleanupdisk

void setcleanupdisk(bool cleanup)

Enable/Disable cleaning up temp dir after download.

variables
cleanup
True to enable queue directory cleanup, false te disable.
returns
void
none

start

void start()

Start the download engine.

variables
none
none
returns
void
none

stop

void stop()

Stop the download engine.

variables
none
none
returns
void
none

isrunning

bool isrunning() const

Returns the current running status of the download engine.

variables
none
none
returns
bool
True when running, false when stopped.

getcurrentspeed

float getcurrentspeed()

Returns the current download speed in kb/s.

variables
none
none
returns
float
Current download speed in kb/s.

printqueuesizes

void printqueuesizes()

Debug method, prints the sizes of the internal libNZBGet queues.

variables
none
none
returns
void
none