Library: Net Responsibility
Package: Core
Header: Request.h
Request is in charge of interaction with the server. It will always send the username, MAC address and version. You may also post more variables.
Member Functions: addMac, downloadBlacklist, downloadConfig, sendImprovementData, updateBlacklist, updateConfig
Request();
virtual ~Request();
static void addMac(
Options * options,
string password = ""
);
Configure the server to remember the MAC address of this computer. It will then be used for authentification.
static void downloadBlacklist(
Options * options
);
Download a new blacklist
static void downloadConfig(
Options * options,
string password = ""
);
Download a new config file.
static string sendImprovementData(
Options * options,
string impData
);
Send the improvement data to the server. It's given in impData.
static bool updateBlacklist(
Options * options,
bool doForce = false
);
Updates the blacklist file from the server if it's modifed or doForce is true. Returns true if the file was updated.
static bool updateConfig(
Options * options,
bool doForce = false
);
Updates the config file from the server if it's modifed or doForce is true. Returns true if the file was updated.
static int blacklistDownloaded;
The last time the blacklists were downloaded from the server. Used to determine if the file has been modified.
static int configDownloaded;
The last time the config file was downloaded from the server. Used to determine if the file has been modified.