libeconf 0.7.1

libeconf_ext.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2021 SUSE LLC
3
4 Permission is hereby granted, free of charge, to any person obtaining a copy
5 of this software and associated documentation files (the "Software"), to deal
6 in the Software without restriction, including without limitation the rights
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 copies of the Software, and to permit persons to whom the Software is
9 furnished to do so, subject to the following conditions:
10
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
13
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 SOFTWARE.
21 */
22
23 #pragma once
24
28 #include <stdbool.h>
29 #include <stdint.h>
30 #include <stdlib.h>
31 #include "libeconf.h"
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 struct econf_ext_value {
39 char **values;
41 char *file;
43 uint64_t line_number;
45 char *comment_before_key;
47 char *comment_after_value;
48 };
49
50 typedef struct econf_ext_value econf_ext_value;
51
52
62 extern econf_err econf_getExtValue(econf_file *kf, const char *group,
63 const char *key, econf_ext_value **result);
64
71 extern void econf_freeExtValue(econf_ext_value *to_free);
72
73 #ifdef __cplusplus
74 }
75 #endif
econf_file
struct econf_file econf_file
Definition: libeconf.h:129
econf_freeExtValue
void econf_freeExtValue(econf_ext_value *to_free)
Free an complete econf_ext_value struct.
econf_ext_value::line_number
uint64_t line_number
Line number of the configuration key/value.
Definition: libeconf_ext.h:43
econf_ext_value::file
char * file
Path of the configuration file where this value has been read.
Definition: libeconf_ext.h:41
econf_ext_value::comment_after_value
char * comment_after_value
Comment after the value entry.
Definition: libeconf_ext.h:47
libeconf.h
Public API for the econf library.
econf_ext_value
Definition: libeconf_ext.h:37
econf_ext_value::comment_before_key
char * comment_before_key
Comment before the key/value entry.
Definition: libeconf_ext.h:45
econf_getExtValue
econf_err econf_getExtValue(econf_file *kf, const char *group, const char *key, econf_ext_value **result)
Evaluating more information for given group/key.
econf_ext_value::values
char ** values
Values of a given key in form of a string array.
Definition: libeconf_ext.h:39
econf_err
econf_err
libeconf error codes
Definition: libeconf.h:41