\r\n

51Degrees Device Detection C/C++  4.5

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

config-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 
24 #ifndef FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_H_INCLUDED
25 #define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_H_INCLUDED
26 
44 #include <stdint.h>
45 #include "common-cxx/config.h"
46 
52 typedef struct fiftyone_degrees_config_device_detecton_t {
70 
72 #define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE_DEFAULT true
73 
75 #ifndef FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED
76 #define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED false
77 #endif
78 
79 #ifndef FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE
80 #define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE true
81 #endif
82 
87 #define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE \
88 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE_DEFAULT
89 
94 #define FIFTYONE_DEGREES_DEVICE_DETECTION_CONFIG_DEFAULT_WITH_INDEX \
95  FIFTYONE_DEGREES_CONFIG_DEFAULT_WITH_INDEX, \
96  FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE, \
97  500, /* Default to 500 characters for the matched User-Agent */ \
98  FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED, \
99  FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE
100 
105 #define FIFTYONE_DEGREES_DEVICE_DETECTION_CONFIG_DEFAULT_NO_INDEX \
106  FIFTYONE_DEGREES_CONFIG_DEFAULT_NO_INDEX, \
107  FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE, \
108  500, /* Default to 500 characters for the matched User-Agent */ \
109  FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED, \
110  FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE
111 
116 #endif
bool processSpecialEvidence
Some evidence requires additional processing that doesn't need to be checked for if being used in an ...
Definition: config-dd.h:63
bool updateMatchedUserAgent
True if the detection should record the matched characters from the target User-Agent.
Definition: config-dd.h:54
bool allowUnmatched
True if there should be at least one matched node in order for the results to be considered valid.
Definition: config-dd.h:60
Base configuration structure containing common configuration options, and options that apply to struc...
Definition: config.h:49
fiftyoneDegreesConfigBase b
Base structure members.
Definition: config-dd.h:53
Device detection configuration structure containing device detection specific configuration options,...
Definition: config-dd.h:52
size_t maxMatchedUserAgentLength
Number of characters to consider in the matched User-Agent.
Definition: config-dd.h:57