NetResponsibility

class Request

Library: Net Responsibility
Package: Core
Header: Request.h

Description

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 Summary

Member Functions: addMac, downloadBlacklist, downloadConfig, sendImprovementData, updateBlacklist, updateConfig

Constructors

Request inline

Request();

Destructor

~Request virtual inline

virtual ~Request();

Member Functions

addMac static

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.

downloadBlacklist static

static void downloadBlacklist(
    Options * options
);

Download a new blacklist

downloadConfig static

static void downloadConfig(
    Options * options,
    string password = ""
);

Download a new config file.

sendImprovementData static

static string sendImprovementData(
    Options * options,
    string impData
);

Send the improvement data to the server. It's given in impData.

updateBlacklist static

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.

updateConfig static

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.

Variables

blacklistDownloaded static

static int blacklistDownloaded;

The last time the blacklists were downloaded from the server. Used to determine if the file has been modified.

configDownloaded static

static int configDownloaded;

The last time the config file was downloaded from the server. Used to determine if the file has been modified.