\r\n

51Degrees Device Detection C/C++  4.4

A device detection library that is used natively or by 51Degrees products

Property

Detailed Description

Property in a data set relating to a single component.

Introduction

A property is stored in a properties collection and contains the meta data for a specific property in a data set.

Get

A property can be fetched from a properties collection in one of two ways:

By Index : The fiftyoneDegreesPropertyGet method return the property at a specified index. This provides a way to access a property at a known index, or iterate over all properties.

By Name : If the index of a property is not known, then the property can be fetched using the fiftyoneDegreesPropertyGetByName method to find the property in a properties collection.

Collaboration diagram for Property:

Structs

struct  fiftyoneDegreesProperty
Property structure containing all the meta data relating to a property. More...

Enumerations

Functions

fiftyoneDegreesString *  fiftyoneDegreesPropertyGetName (fiftyoneDegreesCollection *stringsCollection, fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string name of the property using the item provided. More...
fiftyoneDegreesString *  fiftyoneDegreesPropertyGetDescription (fiftyoneDegreesCollection *stringsCollection, fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string description of the property using the item provided. More...
fiftyoneDegreesString *  fiftyoneDegreesPropertyGetCategory (fiftyoneDegreesCollection *stringsCollection, fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string category of the property using the item provided. More...
fiftyoneDegreesString *  fiftyoneDegreesPropertyGetUrl (fiftyoneDegreesCollection *stringsCollection, fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string URL of the property using the item provided. More...
byte  fiftyoneDegreesPropertyGetValueType (fiftyoneDegreesCollection *properties, uint32_t index, fiftyoneDegreesException *exception)
Gets the value type for the property at the index in the collection. More...
fiftyoneDegreesProperty *  fiftyoneDegreesPropertyGet (fiftyoneDegreesCollection *properties, uint32_t index, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Gets the property at the requested index from the properties collection provided. More...
fiftyoneDegreesProperty *  fiftyoneDegreesPropertyGetByName (fiftyoneDegreesCollection *properties, fiftyoneDegreesCollection *strings, const char *requiredPropertyName, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Gets the property with the requested name from the properties collection provided. More...

Enumeration Type Documentation

◆ fiftyoneDegreesPropertyValueType

Enum of property types.

Enumerator

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_STRING 

String.

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_INTEGER 

Integer.

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_DOUBLE 

Double.

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_BOOLEAN 

Boolean.

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_JAVASCRIPT 

JavaScript string.

FIFTYONE_DEGREES_PROPERTY_VALUE_SINGLE_PRECISION_FLOAT 

Single precision floating point value.

FIFTYONE_DEGREES_PROPERTY_VALUE_SINGLE_BYTE 

Single byte value.

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_COORDINATE 

Coordinate.

FIFTYONE_DEGREES_PROPERTY_VALUE_TYPE_IP_ADDRESS 

Ip Range.

Function Documentation

◆ fiftyoneDegreesPropertyGet()

fiftyoneDegreesProperty* fiftyoneDegreesPropertyGet ( fiftyoneDegreesCollection *   properties,
uint32_t   index,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Gets the property at the requested index from the properties collection provided.

Parameters
properties - to get the property from
index - of the property to get
item - to store the property item in
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
the property requested or NULL

◆ fiftyoneDegreesPropertyGetByName()

fiftyoneDegreesProperty* fiftyoneDegreesPropertyGetByName ( fiftyoneDegreesCollection *   properties,
fiftyoneDegreesCollection *   strings,
const char *   requiredPropertyName,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Gets the property with the requested name from the properties collection provided.

Parameters
properties - to get the property from
strings - collection containing the names of the properties
requiredPropertyName - name of the property to get
item - to store the property item in
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
the property requested or NULL
Examples
Hash/StronglyTyped.c.

◆ fiftyoneDegreesPropertyGetCategory()

fiftyoneDegreesString* fiftyoneDegreesPropertyGetCategory ( fiftyoneDegreesCollection *   stringsCollection,
fiftyoneDegreesProperty *   property,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string category of the property using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
stringsCollection - collection of strings retrieved by offsets.
property - structure for the category required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.

◆ fiftyoneDegreesPropertyGetDescription()

fiftyoneDegreesString* fiftyoneDegreesPropertyGetDescription ( fiftyoneDegreesCollection *   stringsCollection,
fiftyoneDegreesProperty *   property,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string description of the property using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
stringsCollection - collection of strings retrieved by offsets.
property - structure for the description required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.

◆ fiftyoneDegreesPropertyGetName()

fiftyoneDegreesString* fiftyoneDegreesPropertyGetName ( fiftyoneDegreesCollection *   stringsCollection,
fiftyoneDegreesProperty *   property,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string name of the property using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
stringsCollection - collection of strings retrieved by offsets.
property - structure for the name required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.

◆ fiftyoneDegreesPropertyGetUrl()

fiftyoneDegreesString* fiftyoneDegreesPropertyGetUrl ( fiftyoneDegreesCollection *   stringsCollection,
fiftyoneDegreesProperty *   property,
fiftyoneDegreesCollectionItem *   item,
fiftyoneDegreesException *   exception  
)

Returns the string URL of the property using the item provided.

The collection item must be released when the caller is finished with the string.

Parameters
stringsCollection - collection of strings retrieved by offsets.
property - structure for the URL required.
item - used to store the resulting string in.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a pointer to a string in the collection item data structure.

◆ fiftyoneDegreesPropertyGetValueType()

byte fiftyoneDegreesPropertyGetValueType ( fiftyoneDegreesCollection *   properties,
uint32_t   index,
fiftyoneDegreesException *   exception  
)

Gets the value type for the property at the index in the collection.

Parameters
properties - collection to retrieve the property type from
index - of the property in the collection
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
the value type as a byte for the property at the index.