51Degrees Common C/C++  4.1

A shared functionality library that is used by 51Degrees products

config.h

1 /* *********************************************************************
2  * This Source Code Form is copyright of 51 Degrees Mobile Experts Limited.
3  * Copyright 2019 51 Degrees 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 #ifndef FIFTYONE_DEGREES_CONFIG_H_INCLUDED
17 #define FIFTYONE_DEGREES_CONFIG_H_INCLUDED
18 
42 typedef struct fiftyone_degrees_config_base_t {
43  bool allInMemory;
47  bool freeData;
51  bool useTempFile;
56  const char **tempDirs;
60 
62 #define FIFTYONE_DEGREES_CONFIG_USE_TEMP_FILE_DEFAULT false
63 
68 #define FIFTYONE_DEGREES_CONFIG_USE_TEMP_FILE \
69 FIFTYONE_DEGREES_CONFIG_USE_TEMP_FILE_DEFAULT
70 
72 #ifndef FIFTYONE_DEGREES_MEMORY_ONLY
73 #define FIFTYONE_DEGREES_CONFIG_ALL_IN_MEMORY_DEFAULT false
74 #else
75 #define FIFTYONE_DEGREES_CONFIG_ALL_IN_MEMORY_DEFAULT true
76 #endif
77 
82 #define FIFTYONE_DEGREES_CONFIG_ALL_IN_MEMORY \
83 FIFTYONE_DEGREES_CONFIG_ALL_IN_MEMORY_DEFAULT
84 
88 #define FIFTYONE_DEGREES_CONFIG_DEFAULT \
89  FIFTYONE_DEGREES_CONFIG_ALL_IN_MEMORY, /* allInMemory */ \
90  true, /* usesUpperPrefixedHeaders */ \
91  false, /* freeData */ \
92  FIFTYONE_DEGREES_CONFIG_USE_TEMP_FILE, /* useTempFile */ \
93  false, /* reuseTempFile */ \
94  NULL, /* tempDirs */ \
95  0 /* tempDirCount */
96 
100 #endif
const char ** tempDirs
Array of temp directories which can be used in order of preference.
Definition: config.h:56
int tempDirCount
Number of directories in the tempDirs array.
Definition: config.h:58
bool useTempFile
Indicates whether a temporary file should be created instead of using the original file.
Definition: config.h:51
bool allInMemory
True if the data file should be loaded entirely into continuous memory.
Definition: config.h:43
Base configuration structure containing common configuration options, and options that apply to struc...
Definition: config.h:42
bool reuseTempFile
Indicates that an existing temp file may be used.
Definition: config.h:53
bool usesUpperPrefixedHeaders
True if the HTTP header field names MIGHT include the prefix HTTP_.
Definition: config.h:45
bool freeData
True if the memory containing the data set should be freed after it is no longer needed.
Definition: config.h:47