\r\n

51Degrees Device Detection C/C++  4.5

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...
struct  fiftyoneDegreesPropertyTypeRecord
Property structure containing stored type of a property. More...

Functions

const fiftyoneDegreesString *  fiftyoneDegreesPropertyGetName (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string name of the property using the item provided. More...
fiftyoneDegreesPropertyValueType  fiftyoneDegreesPropertyGetStoredType (const fiftyoneDegreesCollection *propertyTypesCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesException *exception)
Returns the type the property is stored as. More...
fiftyoneDegreesPropertyValueType  fiftyoneDegreesPropertyGetStoredTypeByIndex (const fiftyoneDegreesCollection *propertyTypesCollection, uint32_t index, fiftyoneDegreesException *exception)
Returns the type the property is stored as. More...
const fiftyoneDegreesString *  fiftyoneDegreesPropertyGetDescription (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string description of the property using the item provided. More...
const fiftyoneDegreesString *  fiftyoneDegreesPropertyGetCategory (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
Returns the string category of the property using the item provided. More...
const fiftyoneDegreesString *  fiftyoneDegreesPropertyGetUrl (const fiftyoneDegreesCollection *stringsCollection, const 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...
const 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...

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()

const 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()

const fiftyoneDegreesString* fiftyoneDegreesPropertyGetCategory ( const fiftyoneDegreesCollection *   stringsCollection,
const 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()

const fiftyoneDegreesString* fiftyoneDegreesPropertyGetDescription ( const fiftyoneDegreesCollection *   stringsCollection,
const 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()

const fiftyoneDegreesString* fiftyoneDegreesPropertyGetName ( const fiftyoneDegreesCollection *   stringsCollection,
const 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.

◆ fiftyoneDegreesPropertyGetStoredType()

fiftyoneDegreesPropertyValueType fiftyoneDegreesPropertyGetStoredType ( const fiftyoneDegreesCollection *   propertyTypesCollection,
const fiftyoneDegreesProperty *   property,
fiftyoneDegreesException *   exception  
)

Returns the type the property is stored as.

Parameters
propertyTypesCollection - collection of property types retrieved by offsets.
property - structure for the type required.
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a type the property is stored as.

◆ fiftyoneDegreesPropertyGetStoredTypeByIndex()

fiftyoneDegreesPropertyValueType fiftyoneDegreesPropertyGetStoredTypeByIndex ( const fiftyoneDegreesCollection *   propertyTypesCollection,
uint32_t   index,
fiftyoneDegreesException *   exception  
)

Returns the type the property is stored as.

Parameters
propertyTypesCollection - collection of property types retrieved by offsets.
index - of the property to get
exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
a type the property is stored as.

◆ fiftyoneDegreesPropertyGetUrl()

const fiftyoneDegreesString* fiftyoneDegreesPropertyGetUrl ( const fiftyoneDegreesCollection *   stringsCollection,
const 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.
On This Page