dca_interface  6.3.4
DCA Base Package

Introduction

Contents of the DCA Base Package.

Classes

class  dca::Categories
 Definition of a container class for Category objects. More...
 
struct  dca::CategoriesInfoInitData
 Initialization struct that defines where to find the associated Categories, Groups and Locales definitions. More...
 
class  dca::CategoriesInfo
 A container class that allows access to the contained Categories, Groups and Locales. More...
 
class  dca::Category
 Encapsulates a category as defined in the categories XML schema (see Categories XML: Categories). More...
 
class  dca::FunctionResult
 Standard function result. More...
 
class  dca::ExDca
 Exception class used in the DCA. More...
 
struct  dca::InitData
 This structure is used to initialize the DcaInstance. More...
 
struct  dca::ProxySettings
 If you are using one or more proxy servers set up this structure and use it for e.g. the creation of a DbConnection. More...
 
class  dca::DcaInstance
 Encapsulates the init and deinit of the DCA API. More...
 
class  dca::ScheduleEventSubscriberIntf
 An interface for schedule event notifications. Derive a class from this interface and implement onEvent() to receive notifications. More...
 
struct  dca::LicenseData
 Is used to create a License object. A license first must be created with DcaInstance::createLicense to initialize a classification module or a toolbox package. More...
 
class  dca::License
 Use a License to initialize a classification package or a toolbox package. More...
 
struct  dca::DbConnectionLocalData
 Stores the connection data for a local database. More...
 
struct  dca::DbConnectionCustomData
 Class to store the Database connection data for a custom database. More...
 
struct  dca::DbConnectionRemoteServerData
 Stores the remote server data for the connection to a remote database. More...
 
struct  dca::DbConnectionData
 Stores the connection data for a database. More...
 
struct  dca::DatabaseInformation
 Contains information about underlying database. More...
 
class  dca::DbConnection
 Database connection class for a local or remote database. More...
 
class  dca::UpdateModule
 The update module is used to download and install DCA content and engine updates. More...
 
class  dca::UpdateResults
 Encapsulates the results of an update process. More...
 
class  dca::UpdateResult
 Encapsulates one of the results of an update process. More...
 
class  dca::UpdateResultDetail
 Encapsulates the details of a result of an update process. More...
 
class  dca::Email
 Encapsulates an email object. More...
 
class  dca::Group
 Encapsulates a group as defined in the related categories XML schema (see Categories XML: Groups). More...
 
class  dca::Groups
 Definition of a container class for Group objects. More...
 
class  dca::HtmlText
 Encapsulates an HTML text object. More...
 
class  dca::Locale
 Encapsulation of a locale class, which allows access to the language id and the display name of locale definitions (see Categories XML: Locales). More...
 
class  dca::Locales
 Definition of a container class for Locale objects. More...
 
class  dca::OptionValue
 Generic encapsulation of a value used in Options objects. More...
 
class  dca::Options
 Generic option class, used to set up optional options for several classes, modules etc. More...
 
class  dca::Url
 Encapsulates a URL object. More...
 
class  dca::VersionInfoResultDetail
 Class that contains all details of a dca::VersionInfoResult object. More...
 
class  dca::VersionInfoResult
 Class that contains all details of type dca::VersionInfoResult object. More...
 
class  dca::VersionInfoResults
 Class that contains all version information of all initialized DCA modules. More...
 

Files

file  base_categories.h
 Container class for Category objects.
 
file  base_categoriesinfo.h
 Container class for Categories, Groups and Locales.
 
file  base_category.h
 Encapsulates a single Category as defined in the categories XML schema.
 
file  base_classes.h
 Package of shared base classes, functions and definitions.
 
file  base_defines.h
 Base definitions for the DCA.
 
 
file  base_group.h
 Encapsulates a single Group as defined in the categories XML schema.
 
file  base_groups.h
 Container class for Group objects.
 
file  base_htmltext.h
 Creation of a base HTML text object.
 
file  base_locale.h
 Encapsulates a single Locale as defined in the categories XML schema.
 
file  base_locales.h
 Container class for Locale objects.
 
file  base_options.h
 Definitions for a generic DCA option class.
 
file  base_types.h
 Basic types definitions for the DCA.
 
file  base_url.h
 Creation of a base URL object.
 
file  base_versioninfo.h
 Classes used with dca::DcaInstance::getVersionInfo().
 

Typedefs

typedef int DCA_MODULE_ID_TYPE
 Type for module ids.
 
typedef char * DCA_CATEGORIES_INFO_TYPE
 Type for CategoryInfo objects.
 
typedef int DCA_CATEGORY_ID_TYPE
 Type for category ids.
 
typedef int DCA_GROUP_ID_TYPE
 Type for group ids.
 
typedef int DCA_ACTION_ID_TYPE
 Type for action ids.
 
typedef int DCA_APPLICATION_ID_TYPE
 Type for application ids.
 
typedef int DCA_TAG_ID_TYPE
 Type for tag ids.
 
typedef int DCA_RESULT_TYPE
 Type for return codes.
 
typedef size_t DCA_INDEX_TYPE
 Type for index access (used for arrays and collections).
 
typedef size_t DCA_SIZE_TYPE
 Type for size (used for size of array and collections).
 
typedef int DbType
 Type for DbConnection classes.
 

Enumerations

enum  dca::LogLevel {
  dca::LOG_Initial = -1, dca::LOG_Critical = 0, dca::LOG_Error = 1, dca::LOG_Warning = 2,
  dca::LOG_Notice = 3, dca::LOG_Info = 4, dca::LOG_Extensive = 5, dca::LOG_Debug = 6
}
 This enum is used in all setLogLevel() functions to change the verbosity level of the classes. More...
 
enum  dca::ScheduleActionType {
  dca::SAT_StartDbDownload = 0, dca::SAT_ProgressDbDownload, dca::SAT_StopDbDownload, dca::SAT_ErrorDbDownload,
  dca::SAT_StartDbMerge, dca::SAT_StopDbMerge, dca::SAT_ErrorDbMerge, dca::SAT_UserCancel
}
 This defines the action type of a schedule event. More...
 
enum  dca::ScheduleModuleId {
  dca::SMI_UrlDb = 0, dca::SMI_MailDb, dca::SMI_CustomDb, dca::SMI_WacDb,
  dca::SMI_IprDb, dca::SMI_MalwareDb
}
 This defines the module id of a schedule event. More...
 

Variables

Category dca::NullCategory
 Defines a constant unassigned Category you can use for checks. if( myCat == NullCategory ) --> myCat is not assigned yet!
 
const DbType dca::DBT_Url
 Used for DbConnection classes for URL classification.
 
const DbType dca::DBT_Mail
 Used for DbConnection classes for ZLA classification.
 
const DbType dca::DBT_Custom
 Used for DbConnection classes of custom databases.
 
const int dca::ERR_INVALID_DATABASE
 Error code: An attempt to connect to a local or custom database was not successful.
 
const int dca::ERR_INVALID_FOLDER
 Error code: One (or more) of the specified folders were invalid (types or inaccessable)
 
const int dca::ERR_INVALID_XML_FILES
 Error code: The specified XML files are missing or corrupt.
 
const int dca::ERR_DB_UPDATE_ABORTED
 Error code: A (scheduled) database update was aborted unexpectly.
 
const int dca::ERR_DB_DOWNLOAD_ABORTED
 Error code: A download of a database update was aborted unexpectly.
 
const int dca::ERR_DATABASE_ALREADY_EXISTING
 Error code: The specified database already exists.
 
const int dca::ERR_URL_INVALID
 Error code: The URL is invalid.
 
const int dca::ERR_URL_UNSUPPORTED_PROTOCOL
 Error code: The protocol of the URL is unsupported.
 
const int dca::ERR_CUSTOMDB_INVALID_CATEGORIES
 Error code: The given categories are invalid.
 
const int dca::DCA_SUCCESS
 A return code to indicate a successful function call.
 
const unsigned int dca::DCA_SIG_ABORT
 Currently the only supported signal parameter for the DcaInstance::signal() function.
 
const int dca::DCA_UPDATE_DOWNLOAD_SCHEDULED
 Internal DCA status code to indicate that a potentially time consuming download has been scheduled. The download will be performed during the next schedule.
 
const DCA_CATEGORIES_INFO_TYPE dca::DCA_CAT_INFO_TYPE_MAIL
 Refers to the internal categories info for email.
 
const DCA_CATEGORIES_INFO_TYPE dca::DCA_CAT_INFO_TYPE_TEXT
 Refers to the internal categories info for text classification.
 
const DCA_CATEGORIES_INFO_TYPE dca::DCA_CAT_INFO_TYPE_URL
 Refers to the internal categories info for URL classification.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_UNKNOWN
 Global value for an unknown category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_TEXT_PORNOGRAPHY
 Text category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_TEXT_WAREZ
 Text category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_TEXT_GAMBLING
 Text category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_TEXT_ANONYMOUS_PROXIES
 Text category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_TEXT_ILLEGAL_DRUGS
 Text category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_TEXT_WEAPONS
 Text category.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_TEXT_PORNOGRAPHY
 Text group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_TEXT_CRIMINAL_ACTIVITIES
 Text group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_TEXT_GAMES
 Text group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_TEXT_INFORMATION_TECHNOLOGY
 Text group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_TEXT_DRUGS
 Text group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_TEXT_WEAPONS
 Text group.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_PORNOGRAPHY
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_EROTIC
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SWIMWEAR
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SHOPPING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_AUCTIONS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_GOVERNMENTAL_ORGANIZATIONS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_NON_GOVERNMENTAL_ORGANIZATIONS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_CITIES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_EDUCATION
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_POLITICAL_PARTIES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_RELIGION
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SECTS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ILLEGAL_ACTIVITIES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_COMPUTER_CRIME
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_POLITICAL_EXTREME
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_WAREZ
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_VIOLENCE
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_GAMBLING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_COMPUTER_GAMES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_TOYS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_CINEMA
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_RECREATIONAL_FACILITIES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ARTS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_MUSIC
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_LITERATURE
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_HUMOR
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_NEWS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_WEBMAIL
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_CHAT
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_BLOGS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_MOBILE_TELEPHONY
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_DIGITAL_POSTCARDS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SEARCH_ENGINES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SOFTWARE
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_COMMUNICATION_SERVICES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_IT_SECURITY
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_WEB_SITE_TRANSLATION
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ANONYMOUS_PROXIES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ILLEGAL_DRUGS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ALCOHOL
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_TOBACCO
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SELF_HELP
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_DATING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_RESTAURANTS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_TRAVEL
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_FASHION
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SPORTS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ARCHITECTURE
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ENVIRONMENT
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_PERSONAL_WEB_SITES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_JOB_SEARCH
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_BROKERS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_FINANCIAL_SERVICES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_BANKING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_VEHICLES
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_WEAPONS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_HEALTH
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_ABORTION
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SPAM_URLS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_MALWARE
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_PHISHING_URLS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_INSTANT_MESSAGING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_GENERAL_BUSINESS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_BANNER_ADVERTISEMENTS
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SOCIAL_NETWORKING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_BUSINESS_NETWORKING
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_SOCIAL_MEDIA
 URL category.
 
const DCA_CATEGORY_ID_TYPE dca::CATEGORY_ID_URL_WEB_STORAGE
 URL category.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_PORNOGRAPHY
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_ORDERING
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_SOCIETY
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_CRIMINAL_ACTIVITIES
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_VIOLENCE
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_GAMES
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_ENTERTAINMENT
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_INFORMATION
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_INFORMATION_TECHNOLOGY
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_DRUGS
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_LIFESTYLE
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_PERSONAL_WEB_SITES
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_JOB_SEARCH
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_FINANCE
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_VEHICLES
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_WEAPONS
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_MEDICINE
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_SPAM
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_MALWARE
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_GENERAL_BUSINESS
 URL group.
 
const DCA_GROUP_ID_TYPE dca::GROUP_ID_URL_SOCIAL_NETWORKING
 URL group.
 
Group dca::NullGroup
 Defines a constant un-assigned Group you can use for checks. if( myGroup == NullGroup ) --> myGroup is not assigned yet!
 
Locale dca::NullLocale
 defines a constant unassigned Locale you can use for checks. if( myLocale == NullLocale ) --> myLocale is not assigned yet!
 
Options dca::DefaultOptions
 A constant for a default empty options object. This can be used for functions which require an Options object, but you don't wish to specify any options for the function.
 

Enumeration Type Documentation

◆ LogLevel

This enum is used in all setLogLevel() functions to change the verbosity level of the classes.

If you do not change the value of the logging level of a class the LOG_Notice level is used. This means critical errors, common errors, warnings and important notices are logged out. Logging at level Info is more verbose and extensive is very verbose. Logging at debug level logs out all available information. Please note that logging may negatively impact the performance and may generate very large log files.

The DCA logs all output to a single log file dca_info.log located in the log folder specified when initializing your DcaInstance.

Changing the logging level of a class is not persistant, and each time the DCA restarts the level will be reset to LOG_Notice. To permanently change a logging level for a DCA module you may also change the related ini file keys.

Enumerator
LOG_Initial 

Initial internal log level, do not use.

LOG_Critical 

Critical events will be logged out.

LOG_Error 

Errors will be logged out.

LOG_Warning 

Warnings will be logged.

LOG_Notice 

Write notices / important information to the log file.

LOG_Info 

Write less important information to the log file.

LOG_Extensive 

Use extensive logging, this may greatly increase the size of the log file.

LOG_Debug 

Tracing log level, all available information will be written to the log file. This will enormously increase the size of the log file and lead to performance loss. Just use this for a short time, only for troubleshooting.

Definition at line 212 of file base_classes.h.

◆ ScheduleActionType

This defines the action type of a schedule event.

SAT_StartDbDownload marks the start of a complete database download. This will be followed by either SAT_ProgressDbDownload to display the progress, SAT_StopDbDownload to signal a successful completion, SAT_ErrorDbDownload to signal that an error occured during the download, or SAT_UserCancel to indicate that the download operation was cancelled by the user.

SAT_StartDbMerge marks the start of a database merge operation. This will be followed by either SAT_StopDbMerge to indicate that the merge process finished successfully, SAT_ErrorDbMerge to signal that an error occured during the merge process, or SAT_UserCancel to indicate that the merge operation was cancelled by the user.

Enumerator
SAT_StartDbDownload 

A complete database download has started.

SAT_ProgressDbDownload 

Complete database download progress information.

SAT_StopDbDownload 

A complete database download has successfully finished.

SAT_ErrorDbDownload 

An error occured during a complete db download.

SAT_StartDbMerge 

A database merge process has started.

SAT_StopDbMerge 

A database merge process has successfully finished.

SAT_ErrorDbMerge 

An error occured during the database merge process.

SAT_UserCancel 

The user has cancelled the operation.

Definition at line 494 of file base_classes.h.

◆ ScheduleModuleId

This defines the module id of a schedule event.

Enumerator
SMI_UrlDb 

ID for a URL database.

SMI_MailDb 

ID for a mail database.

SMI_CustomDb 

ID for a custom database database.

SMI_WacDb 

ID for a WAC database.

SMI_IprDb 

ID for a IPR database.

SMI_MalwareDb 

ID for a Malware database.

Definition at line 510 of file base_classes.h.