|
DeviceAtlas C++ Api documentation
|
Public Types | |
| enum | { NoREFold = 1 << 0, Debug = 1 << 1, OverwriteUnconflicted = 1 << 2 } |
Public Member Functions | |
| const Property * | getpropId () const |
| const Property * | getpropOname () const |
| const Property * | getpropOversion () const |
| const Property * | getpropOversionNm () const |
| const Property * | getpropIsbw () const |
| void | doReplacements (const std::vector< size_t > *, char *, size_t) const |
| void | setConfig (DaConfig &_dcfg) |
| bool | hasUAProps () const |
| bool | hasLangProps () const |
| bool | hasMatchedProps () const |
| const std::shared_ptr< UAR > | getUAR () const |
| const std::shared_ptr< CPR > | getCPR () const |
| DeviceAtlas (DaConfig &_dcfg) | |
| DeviceAtlas (std::istream &, const char *treeFields[]=getTreeUA(), unsigned long flags=0) | |
| Constructor, adds minimum _matched, _unmatched properties. More... | |
| void | loadDataFromFile (const char *, const char *treeFields[]=getTreeUA(), unsigned long flags=0) |
| Loads the json from file path. More... | |
| void | loadDataFromStream (std::istream &, const char *treeFields[]=getTreeUA(), unsigned long flags=0) |
| Loads the json from file stream. More... | |
| const Value * | getValue (size_t) const |
| const std::string & | getResetWalkString (size_t) const |
| int | getTreeRevision () const |
| Returns creation date. More... | |
| time_t | getTreeGeneration () const |
| int | getDataRevision () const |
| time_t | getDataGeneration () const |
Public Member Functions inherited from Mobi::Mtld::Da::CommonDeviceAtlas | |
| const Property & | addProperty (const char *name, PropertyType type) |
| const Property * | findPropertyDescr (const char *p) const |
| const Property & | getPropertyDescr (const char *p) const |
| const Property & | getPropertyDescr (size_t off) const |
| size_t | getPropertyCount () const |
| const propvec & | getPropertyNames () const |
| Returns the Json's properties list. More... | |
| __attribute__ ((malloc)) char *strdup(const char *) | |
| __attribute__ ((malloc)) char *strdup(const char * | |
Static Public Member Functions | |
| static const char ** | getTreeUA () |
| static const char ** | getTreeAll () |
Public Attributes | |
| Node * | roots [TREEID_MAX] |
| unsigned long | flags |
| unsigned | maxDepth |
| struct { | |
| size_t _user_agent_matched | |
| size_t _user_agent_unmatched | |
| size_t _language_locale | |
| size_t _language | |
| } | synthetic |
| These are property indexes of artificial properties, added after the JSON is parsed. | |
Public Attributes inherited from Mobi::Mtld::Da::CommonDeviceAtlas | |
| size_t | |
Static Public Attributes | |
| static const char * | treeUA [] = { "t", 0 } |
| When constructing the atlas, this null-terminated list of strings is used to indicate the field names used to encode each tree. treeUA is the value { "t", 0 }, while treeAll is { "t", "u", 0 }. treeUA is the current default: future evidence trees can be added without recourse to updating the API. | |
| static const char * | treeAll [] = { "t", "u", 0 } |
| Mobi::Mtld::Da::DeviceAtlas::DeviceAtlas | ( | std::istream & | , |
| const char * | treeFields[] = getTreeUA(), |
||
| unsigned long | flags = 0 |
||
| ) |
Constructor, adds minimum _matched, _unmatched properties.
| f | generic input stream |
| treeFields | |
| flags |
| int Mobi::Mtld::Da::DeviceAtlas::getTreeRevision | ( | ) | const |
Returns creation date.
| void Mobi::Mtld::Da::DeviceAtlas::loadDataFromFile | ( | const char * | jsonpath, |
| const char * | treeFields[] = getTreeUA(), |
||
| unsigned long | flags = 0 |
||
| ) |
Loads the json from file path.
| jsonpath | path of json file |
| void Mobi::Mtld::Da::DeviceAtlas::loadDataFromStream | ( | std::istream & | , |
| const char * | treeFields[] = getTreeUA(), |
||
| unsigned long | flags = 0 |
||
| ) |
Loads the json from file stream.
| stream |
1.8.14