dca_interface
6.3.4
|
#include <customdb_toolbox.h>
Encapsulates the Custom Database maintenance interface.
Use the setUrl() function to add or modify an existing URL Classification.
Use the getUrl() function to retrieve the classification for a given URL string.
Use the removeUrl() function to remove an URL and its classification.
If you don't specify the protocol then http: is assumed and internally added to the database entry.
Also the default port (related to the protocol) will be added internally if you do not explicitely specify a port. So a setUrl() with
"www.abc.xy" is identical to "http://www.abc.xy:80"
or
"https://www.abc.xy" is identical to "https://www.abc.xy:443".
Definition at line 86 of file customdb_toolbox.h.
Public Member Functions | |
bool | getUrl (const std::string &aUrlString, CategorySet &foundCategories) const |
Retrieves the categories of URL string (if found). More... | |
void | setUrl (const std::string &aUrlString, const CategorySet &categories) |
Updates or creates categories for the given URL string. More... | |
void | removeUrl (const std::string &aUrlString) |
Removes the given URL string from the database, if present. More... | |
bool dca::UrlCustomDb::getUrl | ( | const std::string & | aUrlString, |
CategorySet & | foundCategories | ||
) | const |
Retrieves the categories of URL string (if found).
[in] | aUrlString | A URL string in UTF-8 whose associated categories should be retrieved |
[out] | foundCategories | The associated categories for the URL, if found in the database |
void dca::UrlCustomDb::setUrl | ( | const std::string & | aUrlString, |
const CategorySet & | categories | ||
) |
Updates or creates categories for the given URL string.
[in] | aUrlString | A URL string in UTF-8 to be associated with the given categories |
[in] | categories | The categories to be associated with the given URL. If there were previously associated categories for the specified URL in the database, these will be simply overwritten. Merging of categories is not supported |
void dca::UrlCustomDb::removeUrl | ( | const std::string & | aUrlString | ) |
Removes the given URL string from the database, if present.
[in] | aUrlString | The URL string in UTF-8 to be removed |