blob: 7453061bed8ec1b636eddd8b54edc0daa0500977 [file] [log] [blame]
Ben51Degrees31c3d512019-06-12 15:42:53 +01001/* *********************************************************************
2 * This Source Code Form is copyright of 51Degrees Mobile Experts Limited.
3 * Copyright 2019 51Degrees Mobile Experts Limited, 5 Charlotte Close,
4 * Caversham, Reading, Berkshire, United Kingdom RG4 7BY
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0.
8 *
9 * If a copy of the MPL was not distributed with this file, You can obtain
10 * one at http://mozilla.org/MPL/2.0/.
11 *
12 * This Source Code Form is "Incompatible With Secondary Licenses", as
13 * defined by the Mozilla Public License, v. 2.0.
14 * *********************************************************************/
15
16/* *********************************************************************
17 * Dummy library for HAProxy. This does not function, and is designed
18 * solely for HAProxy testing purposes.
19 * *********************************************************************/
20#include "51Degrees.h"
21#include <stdlib.h>
22
23int fiftyoneDegreesGetDeviceOffset(
24 fiftyoneDegreesDataSet *dataSet,
25 const char *userAgent) {
26 return 0;
27}
28
29const char** fiftyoneDegreesGetRequiredPropertiesNames(
30 fiftyoneDegreesDataSet *dataSet) {
31 return NULL;
32}
33
34int fiftyoneDegreesGetRequiredPropertiesCount(
35 fiftyoneDegreesDataSet *dataSet) {
36 return 0;
37}
38
39int fiftyoneDegreesGetValueFromOffsets(
40 fiftyoneDegreesDataSet *dataSet,
41 fiftyoneDegreesDeviceOffsets* deviceOffsets,
42 int requiredPropertyIndex,
43 char* values,
44 int size) {
45 return 0;
46}
47
48static fiftyoneDegreesDeviceOffset dummyOffset = { 0, 0, "dummy-user-agent" };
49
50static fiftyoneDegreesDeviceOffsets dummyOffsets = { 1, &dummyOffset, NULL };
51
52fiftyoneDegreesDeviceOffsets* fiftyoneDegreesCreateDeviceOffsets(
53 fiftyoneDegreesDataSet *dataSet) {
54 return &dummyOffsets;
55}
56
57void fiftyoneDegreesFreeDeviceOffsets(
58 fiftyoneDegreesDeviceOffsets* offsets) {
59 return;
60}
61
62int fiftyoneDegreesGetHttpHeaderCount(
63 fiftyoneDegreesDataSet *dataSet) {
64 return 0;
65}
66
67int fiftyoneDegreesGetHttpHeaderNameOffset(
68 fiftyoneDegreesDataSet *dataSet,
69 int httpHeaderIndex) {
70 return 0;
71}
72
73const char* fiftyoneDegreesGetHttpHeaderNamePointer(
74 fiftyoneDegreesDataSet *dataSet,
75 int httpHeaderIndex) {
76 return "dummy-header-name";
77}
78
79fiftyoneDegreesDataSetInitStatus fiftyoneDegreesInitWithPropertyArray(
80 const char* fileName,
81 fiftyoneDegreesDataSet *dataSet,
82 const char** properties,
83 int propertyCount) {
84 return DATA_SET_INIT_STATUS_SUCCESS;
85}
86
87void fiftyoneDegreesDataSetFree(fiftyoneDegreesDataSet *dataSet) {
88 return;
89}