libeconf_ext.h
Go to the documentation of this file.
/*
Copyright (C) 2021 SUSE LLC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "libeconf.h"
#ifdef __cplusplus
extern "C" {
#endif
struct econf_ext_value {
char **values;
char *file;
uint64_t line_number;
char *comment_before_key;
char *comment_after_value;
};
typedef struct econf_ext_value econf_ext_value;
extern econf_err econf_getExtValue(econf_file *kf, const char *group,
const char *key, econf_ext_value **result);
extern void econf_freeExtValue(econf_ext_value *to_free);
#ifdef __cplusplus
}
#endif
libeconf.h
Public API for the econf library.
econf_file
struct econf_file econf_file
Definition libeconf.h:125
econf_err
econf_err
libeconf error codes
Definition libeconf.h:41
econf_freeExtValue
void econf_freeExtValue(econf_ext_value *to_free)
Free an complete econf_ext_value struct.
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
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_ext_value::values
char ** values
Values of a given key in form of a string array.
Definition libeconf_ext.h:39
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