\r\n

51Degrees Device Detection C/C++  4.5

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

dataset-dd.h

1 /* *********************************************************************
2  * This Original Work is copyright of 51 Degrees Mobile Experts Limited.
3  * Copyright 2023 51 Degrees Mobile Experts Limited, Davidson House,
4  * Forbury Square, Reading, Berkshire, United Kingdom RG1 3EU.
5  *
6  * This Original Work is licensed under the European Union Public Licence
7  * (EUPL) v.1.2 and is subject to its terms as set out below.
8  *
9  * If a copy of the EUPL was not distributed with this file, You can obtain
10  * one at https://opensource.org/licenses/EUPL-1.2.
11  *
12  * The 'Compatible Licences' set out in the Appendix to the EUPL (as may be
13  * amended by the European Commission) shall be deemed incompatible for
14  * the purposes of the Work and the provisions of the compatibility
15  * clause in Article 5 of the EUPL shall not apply.
16  *
17  * If using the Work as, or as part of, a network application, by
18  * including the attribution notice(s) required under Article 5 of the EUPL
19  * in the end user terms of the application under an appropriate heading,
20  * such notice(s) shall fulfill the requirements of that article.
21  * ********************************************************************* */
22 
23 #ifndef FIFTYONE_DEGREES_DATASET_DEVICE_DETECTION_H_INCLUDED
24 #define FIFTYONE_DEGREES_DATASET_DEVICE_DETECTION_H_INCLUDED
25 
26 #include <stdlib.h>
27 #include "common-cxx/dataset.h"
28 #include "common-cxx/exceptions.h"
29 #include "config-dd.h"
30 
52 typedef struct fiftyone_degrees_dataset_device_detection_t {
64 
70 
76 
83 
110  void *state,
111  fiftyoneDegreesPropertiesGetMethod getPropertyMethod,
112  fiftyoneDegreesHeadersGetMethod getHeaderMethod,
113  fiftyoneDegreesOverridesFilterMethod overridesFilter,
114  fiftyoneDegreesEvidencePropertiesGetMethod getEvidencePropertiesMethod,
115  fiftyoneDegreesException* exception);
116 
122 
127 #endif
Device detection data set structure which contains the 'must have's for all device detection data set...
Definition: dataset-dd.h:52
fiftyoneDegreesHeaderPtrArray * ghevHeaders
Array of get high entropy values headers that must all be present to prevent the gethighentropyvalues...
Definition: dataset-dd.h:56
fiftyoneDegreesStatusCode
Status returned from the initialisation of a resource.
Definition: status.h:77
void fiftyoneDegreesDataSetDeviceDetectionReset(fiftyoneDegreesDataSetDeviceDetection *dataSet)
Resets a newly allocated data set structure ready for initialisation.
fiftyoneDegreesStatusCode fiftyoneDegreesDataSetDeviceDetectionInitPropertiesAndHeaders(fiftyoneDegreesDataSetDeviceDetection *dataSet, fiftyoneDegreesPropertiesRequired *properties, void *state, fiftyoneDegreesPropertiesGetMethod getPropertyMethod, fiftyoneDegreesHeadersGetMethod getHeaderMethod, fiftyoneDegreesOverridesFilterMethod overridesFilter, fiftyoneDegreesEvidencePropertiesGetMethod getEvidencePropertiesMethod, fiftyoneDegreesException *exception)
Initialise the header and properties using the fiftyoneDegreesDataSetInitProperties and fiftyoneDegre...
uint32_t(* fiftyoneDegreesEvidencePropertiesGetMethod)(void *state, fiftyoneDegreesPropertyAvailable *property, fiftyoneDegreesEvidenceProperties *evidenceProperties)
Populates the evidence properties structure with the indexes of the properties required by the proper...
Definition: properties.h:213
bool(* fiftyoneDegreesOverridesFilterMethod)(void *state, uint32_t requiredPropertyIndex)
Determines if the required property index is eligible for overriding considering the configuration of...
Definition: overrides.h:134
int ghevRequiredPropertyIndex
Required property index for JavascriptGetHighEntropyValues.
Definition: dataset-dd.h:61
void fiftyoneDegreesDataSetDeviceDetectionRelease(fiftyoneDegreesDataSetDeviceDetection *dataSet)
Releases a reference to a data set which has been fetched via the DataSetGet method.
fiftyoneDegreesDataSetDeviceDetection * fiftyoneDegreesDataSetDeviceDetectionGet(fiftyoneDegreesResourceManager *manager)
Gets a pointer to the active data set from a resource manager.
fiftyoneDegreesDataSetBase b
Base structure members.
Definition: dataset-dd.h:53
const fiftyoneDegreesString *(* fiftyoneDegreesPropertiesGetMethod)(void *state, uint32_t index, fiftyoneDegreesCollectionItem *item)
Returns a string for the property at the index provided or NULL if there is no property available at ...
Definition: properties.h:195
Array of header indexes.
Definition: headers.h:131
Defines a set of properties which are required by a caller.
Definition: properties.h:175
Manager structure used to provide access to a shared and changing resource.
Definition: resource.h:173
uint32_t uniqueUserAgentHeaderIndex
The unique HTTP header for the field name "User-Agent".
Definition: dataset-dd.h:54
Base data set structure which contains the 'must have's for all data sets.
Definition: dataset.h:103
Structure used to represent a 51Degrees exception and passed into methods that might generate excepti...
Definition: exceptions.h:111
long(* fiftyoneDegreesHeadersGetMethod)(void *state, uint32_t index, fiftyoneDegreesCollectionItem *nameItem)
Gets the unique id and name of the header at the requested index.
Definition: headers.h:183
void fiftyoneDegreesDataSetDeviceDetectionFree(fiftyoneDegreesDataSetDeviceDetection *dataSet)
Closes the data set by freeing anything which has been initialised at creation.