\r\n

51Degrees Device Detection C/C++  4.4

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

Device Detection Results

Detailed Description

Structure returned by a device detection engine's process method(s), containing values.

Introduction

Results are the structure returned by an engine's process method(s) and contains the values for the properties in the engine. The base structure contains only the essential element of a data set, which is needed to return values. Any engine can extend this structure to add any additional elements which may be needed to format or return values.

The data set pointer is a managed resource, meaning that while the results exist, the data set will not be freed by the resource manager. This ensures that values contained in the data set used for processing can always be returned.

For more info, see FiftyOneDegreesResults

Collaboration diagram for Device Detection Results:

Structs

struct  fiftyoneDegreesResultUserAgent
Singular User-Agent result returned by a device detection process method. More...
struct  fiftyoneDegreesResultsDeviceDetection
Device detection specific results structure which any device detection processing results should extend. More...

Functions

void  fiftyoneDegreesResultsDeviceDetectionInit (fiftyoneDegreesResultsDeviceDetection *results, fiftyoneDegreesDataSetDeviceDetection *dataSet, uint32_t overridesCapacity)
Initialise a set of results by setting the data set they are associated with. More...
void  fiftyoneDegreesResultsDeviceDetectionFree (fiftyoneDegreesResultsDeviceDetection *results)
Free any extra data within the results. More...
void  fiftyoneDegreesResultsUserAgentReset (const fiftyoneDegreesConfigDeviceDetection *config, fiftyoneDegreesResultUserAgent *result)
Reset the matched and target User-Agents in the result. More...
void  fiftyoneDegreesResultsUserAgentInit (const fiftyoneDegreesConfigDeviceDetection *config, fiftyoneDegreesResultUserAgent *result)
Initialise a single result using the configuration provided. More...
void  fiftyoneDegreesResultsUserAgentFree (fiftyoneDegreesResultUserAgent *result)
Free the memory allocated in a single result,. More...

Function Documentation

◆ fiftyoneDegreesResultsDeviceDetectionInit()

void fiftyoneDegreesResultsDeviceDetectionInit ( fiftyoneDegreesResultsDeviceDetection *   results,
fiftyoneDegreesDataSetDeviceDetection *   dataSet,
uint32_t   overridesCapacity  
)

Initialise a set of results by setting the data set they are associated with.

Also initialise the overrides using the fiftyoneDegreesOverrideValuesCreate method.

Parameters
results - pointer to the results to initialise
dataSet - pointer to the data set which will be using the results
overridesCapacity - size of the overrides structure

◆ fiftyoneDegreesResultsUserAgentFree()

void fiftyoneDegreesResultsUserAgentFree ( fiftyoneDegreesResultUserAgent *   result )

Free the memory allocated in a single result,.

This frees the matched User-Agent.

Parameters
result - pointer to the result to free

◆ fiftyoneDegreesResultsUserAgentInit()

void fiftyoneDegreesResultsUserAgentInit ( const fiftyoneDegreesConfigDeviceDetection *   config,
fiftyoneDegreesResultUserAgent *   result  
)

Initialise a single result using the configuration provided.

This allocates the memory needed, initialises NULL pointers, and sets all characters of the matched User-Agent to '_'.

Parameters
config - pointer to the configuration to use
result - pointer to the result to initialise

◆ fiftyoneDegreesResultsUserAgentReset()

void fiftyoneDegreesResultsUserAgentReset ( const fiftyoneDegreesConfigDeviceDetection *   config,
fiftyoneDegreesResultUserAgent *   result  
)

Reset the matched and target User-Agents in the result.

This means nulling the target User-Agent, and setting all characters of the matched User-Agent to '_'.

Parameters
config - pointer to the configuration to use
result - pointer to the result to reset
On This Page