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 2026 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
43
44#include <stdint.h>
45#include "../common/config.h"
46
52typedef struct fiftyone_degrees_config_device_detecton_t {
80
82#define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE_DEFAULT true
83
85#ifndef FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED
86#define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED false
87#endif
88
89#ifndef FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE
90#define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE true
91#endif
92
97#define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE \
98FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE_DEFAULT
99
106#define FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_MAX_LENGTH 500
107
112#define FIFTYONE_DEGREES_DEVICE_DETECTION_CONFIG_DEFAULT_WITH_INDEX \
113 FIFTYONE_DEGREES_CONFIG_DEFAULT_WITH_INDEX, \
114 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE, \
115 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_MAX_LENGTH, \
116 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED, \
117 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE
118
123#define FIFTYONE_DEGREES_DEVICE_DETECTION_CONFIG_DEFAULT_NO_INDEX \
124 FIFTYONE_DEGREES_CONFIG_DEFAULT_NO_INDEX, \
125 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_UPDATE, \
126 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_MAX_LENGTH, \
127 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_UNMATCHED, \
128 FIFTYONE_DEGREES_CONFIG_DEVICE_DETECTION_DEFAULT_SPECIAL_EVIDENCE
129
133
134#endif
Base configuration structure containing common configuration options, and options that apply to struc...
Definition config.h:53
Device detection configuration structure containing device detection specific configuration options,...
Definition config-dd.h:52
size_t maxMatchedUserAgentLength
Limit in bytes on the length of a single header such as User-Agent, of a pseudo header including the ...
Definition config-dd.h:69
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:70
fiftyoneDegreesConfigBase b
Base structure members.
Definition config-dd.h:53
bool processSpecialEvidence
Some evidence requires additional processing that doesn't need to be checked for if being used in an ...
Definition config-dd.h:73
bool updateMatchedUserAgent
True if the detection should record the matched characters from the target User-Agent.
Definition config-dd.h:54