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.
fiftyoneDegreesPropertyValueType fiftyoneDegreesPropertyGetStoredType (const fiftyoneDegreesCollection *propertyTypesCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesException *exception)
 Returns the type the property is stored as.
fiftyoneDegreesPropertyValueType fiftyoneDegreesPropertyGetStoredTypeByIndex (const fiftyoneDegreesCollection *propertyTypesCollection, uint32_t index, fiftyoneDegreesException *exception)
 Returns the type the property is stored as.
const fiftyoneDegreesString * fiftyoneDegreesPropertyGetDescription (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
 Returns the string description of the property using the item provided.
const fiftyoneDegreesString * fiftyoneDegreesPropertyGetCategory (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
 Returns the string category of the property using the item provided.
const fiftyoneDegreesString * fiftyoneDegreesPropertyGetUrl (const fiftyoneDegreesCollection *stringsCollection, const fiftyoneDegreesProperty *property, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
 Returns the string URL of the property using the item provided.
byte fiftyoneDegreesPropertyGetValueType (fiftyoneDegreesCollection *properties, uint32_t index, fiftyoneDegreesException *exception)
 Gets the value type for the property at the index in the collection.
fiftyoneDegreesProperty * fiftyoneDegreesPropertyGet (fiftyoneDegreesCollection *properties, uint32_t index, fiftyoneDegreesCollectionItem *item, fiftyoneDegreesException *exception)
 Gets the property at the requested index from the properties collection provided.
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.

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
propertiesto get the property from
indexof the property to get
itemto store the property item in
exceptionpointer 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
propertiesto get the property from
stringscollection containing the names of the properties
requiredPropertyNamename of the property to get
itemto store the property item in
exceptionpointer to an exception data structure to be used if an exception occurs. See exceptions.h.
Returns
the property requested or NULL

◆ 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
stringsCollectioncollection of strings retrieved by offsets.
propertystructure for the category required.
itemused to store the resulting string in.
exceptionpointer 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
stringsCollectioncollection of strings retrieved by offsets.
propertystructure for the description required.
itemused to store the resulting string in.
exceptionpointer 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
stringsCollectioncollection of strings retrieved by offsets.
propertystructure for the name required.
itemused to store the resulting string in.
exceptionpointer 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
propertyTypesCollectioncollection of property types retrieved by offsets.
propertystructure for the type required.
exceptionpointer 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
propertyTypesCollectioncollection of property types retrieved by offsets.
indexof the property to get
exceptionpointer 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
stringsCollectioncollection of strings retrieved by offsets.
propertystructure for the URL required.
itemused to store the resulting string in.
exceptionpointer 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, or to an empty string if the property has no URL.

◆ fiftyoneDegreesPropertyGetValueType()

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

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

Parameters
propertiescollection to retrieve the property type from
indexof the property in the collection
exceptionpointer 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.