This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
buxtonsimple.h
144 lines (139 loc) · 4.75 KB
/
buxtonsimple.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
* This file is part of buxton.
*
* Copyright (C) 2014 Intel Corporation
*
* Buxton is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1
* of the license, or (at your option) any later version.
*/
/**
* \file buxtonsimple.h Buxton public header
*
*
* \copyright Copyright (C) 2014 Intel corporation
* \par License
* GNU Lesser General Public License 2.1
*/
#include "buxton.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#if (__GNUC__ >= 4)
/* Export symbols */
# define _bx_export_ __attribute__ ((visibility("default")))
#else
# define _bx_export_
#endif
/*Buxton Simple API Methods*/
/**
* Creates a group if it does not exist and uses that group for all following get and set calls
* If the group already exists, it will be used for all following get and set calls
* Group and layer names longer than 256 bits will be truncated
* @param group A group name that is a string (char *)
* @param layer A layer name that is a string (char *)
*/
_bx_export_ void sbuxton_set_group(char *group, char *layer);
/**
* Buxton set int32_t sets an int32_t value for a given key
* @param key A key name that is a string (char *)
* @param value A 32-bit integer value
*/
_bx_export_ void sbuxton_set_int32(char *key, int32_t value);
/**
* Buxton get int32_t gets an int32_t value from a given key
* @param key A key name that is a string (char *)
* @return A 32-bit integer value
*/
_bx_export_ int32_t sbuxton_get_int32(char *key);
/**
* Buxton set string sets a string (char *) value for a given key
* @param key A key name that is a string (char *)
* @param value A string (char *) value
*/
_bx_export_ void sbuxton_set_string(char *key, char *value );
/**
* Buxton get string gets a string (char *) value from a given key
* @param key A key name that is a string (char *)
* @return A string (char *) value
*/
_bx_export_ char* sbuxton_get_string(char *key);
/**
* Buxton set uint32_t sets a uint32_t value for a given key
* @param key A key name that is a string (char *)
* @param value A 32-bit unsigned integer value
*/
_bx_export_ void sbuxton_set_uint32(char *key, uint32_t value);
/**
* Buxton get uint32_t gets an uint32_t value from a given key
* @param key A key name that is a string (char *)
* @return A 32-bit unsigned integer value
*/
_bx_export_ uint32_t sbuxton_get_uint32(char *key);
/**
* Buxton set int64_t sets an int64_t value for a given key
* @param key A key name that is a string (char *)
* @param value A 64-bit integer value
*/
_bx_export_ void sbuxton_set_int64(char *key, int64_t value);
/**
* Buxton get int64_t gets an int64_t value from a given key
* @param key A key name that is a string (char *)
* @return A 64-bit integer value
*/
_bx_export_ int64_t sbuxton_get_int64(char *key);
/**
* Buxton set uint64_t sets a uint64_t value for a given key
* @param key A key name that is a string (char *)
* @param value A 64-bit unsigned integer value
*/
_bx_export_ void sbuxton_set_uint64(char *key, uint64_t value);
/**
* Buxton get uint64_t gets a uint64_t value from a given key
* @param key A key name that is a string (char *)
* @return A 64-bit unsigned integer value
*/
_bx_export_ uint64_t sbuxton_get_uint64(char *key);
/**
* Buxton set float sets a floating point value for a given key
* @param key A key name that is a string (char *)
* @param value A floating point value
*/
_bx_export_ void sbuxton_set_float(char *key, float value);
/**
* Buxton get float gets a floating point value from a given key
* @param key A key name that is a string (char *)
* @return A floating point value
*/
_bx_export_ float sbuxton_get_float(char *key);
/**
* Buxton set double sets a double value for a given key
* @param key A key name that is a string (char *)
* @param value A double value
*/
_bx_export_ void sbuxton_set_double(char *key, double value);
/**
* Buxton get double gets a double value from a given key
* @param key A key name that is a string (char *)
* @return A double value
*/
_bx_export_ double sbuxton_get_double(char *key);
/**
* Buxton set bool sets a boolean value for a given key
* @param key A key name that is a string (char *)
* @param value A boolean value
*/
_bx_export_ void sbuxton_set_bool(char *key, bool value);
/**
* Buxton get bool gets a boolean value from a given key
* @param key A key name that is a string (char *)
* @return A boolean value
*/
_bx_export_ bool sbuxton_get_bool(char *key);
/**
* Removes a group and clears all of the key value pairs in that group
* @param group_name A group name that is a string (char *)
* @param layer A layer name that is a string (char *)
*/
_bx_export_ void sbuxton_remove_group(char *group_name, char *layer);