dca::UpdateModule Class Reference
[DCA Base Package]

#include <base_classes.h>

List of all members.


Detailed Description

The update module is used to download and install DCA content and engine updates.

Definition at line 915 of file base_classes.h.

Public Member Functions

FunctionResult performUpdate (bool force, UpdateResults &results) const
 Performs an update for all licensed and initialized DCA modules and classifiers.
bool cancelUpdate () const
 Cancels a currently running update process. If there is currently no update running, this function does nothing.
LogLevel setLogLevel (LogLevel newLevel)
 Sets the logging level for the given class instance. The old value will be returned.

Static Public Member Functions

static UpdateModule create (const DcaInstance &aDcaInstance, const License &aLicense, const ProxySettings &proxySettings=ProxySettings())
 Initialization of the UpdateModule module.

Static Public Attributes

static DCA_MODULE_ID_TYPE ID
 This is the module id of the update module.

Member Function Documentation

static UpdateModule dca::UpdateModule::create ( const DcaInstance aDcaInstance,
const License aLicense,
const ProxySettings proxySettings = ProxySettings() 
) [static]

Initialization of the UpdateModule module.

Parameters:
[in] aDcaInstance A previously initialized DcaInstance object
[in] aLicense An initialized license object
[in] proxySettings Proxy settings for connecting to the update server. If not specified, the default DCA proxy settings will be used.
Returns:
An initialized UpdateModule instance.
FunctionResult dca::UpdateModule::performUpdate ( bool  force,
UpdateResults results 
) const

Performs an update for all licensed and initialized DCA modules and classifiers.

The update process includes all currently loaded classifiers and their related initialization data. Updates are downloaded and applied as soon as possible. If an update requires the DCA to be restarted this is stated in the UpdateResults.restartRequired().

During the update process, any unknown URLs collected as part of the WebLearn process will be uploaded to the classification servers. WebLearn can be enabled during the initializaion process for a UrlDbClassifier

Parameters:
[in] force The check for updates uses a per-module interval. The interval between update checks is specified by the update server. Subsequent calls to performUpdate will not result in any new file for the module being downloaded until this interval has passed. To enforce a real check for each module (ie ignoring the recommended update interval) set this parameter to true. Usually it is best to set this to false and let the update module itself decide when its time to really update any file.
[out] results The result of the update process
Returns:
If the function fails, the FunctionResult object contains the description.
Note:
This function may take a long time to finish so it is strongly recommended to call this function in a dedicated thread.
When using url classification you will also need to call the DcaInstance::schedule() function to invoke signature database updates and merge processes.
See also:
UrlDbClassifierOptions, DcaInstance::schedule()
bool dca::UpdateModule::cancelUpdate (  )  const

Cancels a currently running update process. If there is currently no update running, this function does nothing.

Since UpdateModule::performUpdate returns only after the complete update process is finished, it is necessary to have the ability to cancel an update process running in another thread.

Returns:
true if the update process was successfully cancelled, false otherwise.
LogLevel dca::UpdateModule::setLogLevel ( LogLevel  newLevel  ) 

Sets the logging level for the given class instance. The old value will be returned.

Usually the logging level is set to LOG_Notice.

Parameters:
[in] newLevel The new LogLevel the class instance should use for logging
Returns:
The old used logging level.

The documentation for this class was generated from the following file:

Generated on 26 Sep 2016 for dca_interface by  doxygen 1.6.1