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

indices.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#ifndef FIFTYONE_DEGREES_INDICES_H_INCLUDED
24#define FIFTYONE_DEGREES_INDICES_H_INCLUDED
25
26#ifdef FIFTYONE_DEGREES_IPI_SYMBOLS
27#include "ipiSymbols.h"
28#endif
29
90
91#include <stdint.h>
92#ifdef _MSC_VER
93#pragma warning (push)
94#pragma warning (disable: 5105)
95#include <windows.h>
96#pragma warning (default: 5105)
97#pragma warning (pop)
98#endif
99#include "array.h"
100#include "data.h"
101#include "exceptions.h"
102#include "collection.h"
103#include "property.h"
104#include "properties.h"
105#include "common.h"
106
113#define FIFTYONE_DEGREES_INDICES_NO_VALUE UINT32_MAX
114
121typedef struct fiftyone_degrees_index_property_profile{
122 uint32_t* valueIndexes; // array of value indexes
123 uint32_t availablePropertyCount; // number of available properties
124 uint32_t minProfileId; // minimum profile id
125 uint32_t maxProfileId; // maximum profile id
126 uint32_t profileCount; // total number of profiles
127 uint32_t size; // number elements in the valueIndexes array
128 uint32_t filled; // number of elements with values
130
146 fiftyoneDegreesCollection* profileOffsets,
149 fiftyoneDegreesException* exception);
150
158
177 uint32_t profileId,
178 uint32_t availablePropertyIndex);
179
183
184#endif
uint32_t fiftyoneDegreesIndicesPropertyProfileLookup(fiftyoneDegreesIndicesPropertyProfile *index, uint32_t profileId, uint32_t availablePropertyIndex)
For a given profile id and available property index returns the first value index,...
fiftyoneDegreesIndicesPropertyProfile * fiftyoneDegreesIndicesPropertyProfileCreate(fiftyoneDegreesCollection *profiles, fiftyoneDegreesCollection *profileOffsets, fiftyoneDegreesPropertiesAvailable *available, fiftyoneDegreesCollection *values, fiftyoneDegreesException *exception)
Create an index for the profiles, available properties, and values provided such that given the index...
void fiftyoneDegreesIndicesPropertyProfileFree(fiftyoneDegreesIndicesPropertyProfile *index)
Frees an index previously created by fiftyoneDegreesIndicesPropertyProfileCreate.
fiftyoneDegreesPropertyAvailableArray fiftyoneDegreesPropertiesAvailable
Array of properties which are available in a data set.
Definition properties.h:223
All the shared methods and fields required by file, memory and cached collections.
Definition collection.h:408
Structure used to represent a 51Degrees exception and passed into methods that might generate excepti...
Definition exceptions.h:115
Maps the profile index and the property index to the first value index of the profile for the propert...
Definition indices.h:121