libeconf 0.5.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
28#include <stdbool.h>
29#include <stdint.h>
30#include <stdlib.h>
31#include "libeconf.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
39 char **values;
41 char *file;
43 uint64_t line_number;
48};
49
51
52
62extern econf_err econf_getExtValue(econf_file *kf, const char *group,
63 const char *key, econf_ext_value **result);
64
71extern void econf_freeExtValue(econf_ext_value *to_free);
72
73#ifdef __cplusplus
74}
75#endif
Public API for the econf library.
struct econf_file econf_file
Definition: libeconf.h:123
econf_err
libeconf error codes
Definition: libeconf.h:41
void econf_freeExtValue(econf_ext_value *to_free)
Free an complete econf_ext_value struct.
econf_err econf_getExtValue(econf_file *kf, const char *group, const char *key, econf_ext_value **result)
Evaluating more information for given group/key.
char * comment_before_key
Comment before the key/value entry.
Definition: libeconf_ext.h:45
char ** values
Values of a given key in form of an string array.
Definition: libeconf_ext.h:39
uint64_t line_number
Line number of the configuration key/value.
Definition: libeconf_ext.h:43
char * file
Path of the configuration file where this value has been read.
Definition: libeconf_ext.h:41
char * comment_after_value
Comment after the value entry.
Definition: libeconf_ext.h:47