CAPS Universe documentation  1.0.4
All you need to know to be successful
libcapskeyvalue.h
Go to the documentation of this file.
1#pragma once
2
3/*
4 * (c) 2017 Juergen Borleis <projects@caps-printing.org>
5 *
6 * This library is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by the Free
8 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * any later version.
10 *
11 * This library is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
14 * details.
15 */
16
17#include <features.h>
18#include <libcapsbase.h>
19#include <libcapstable.h>
20
21__BEGIN_DECLS
22
33{
35};
43void caps_libkv_init(void);
48void caps_kv_init(struct caps_kv_table *kvt) __nonnull();
53void caps_kv_cleanup(struct caps_kv_table *kvt) __nonnull();
61void caps_kv_duplicate(struct caps_kv_table *dst, const struct caps_kv_table *src) __nonnull();
73void caps_kv_key_value_add(struct caps_kv_table *kvt, const char *key, const char *value) __nonnull((1,2));
86const char *caps_kv_keys_value_get(const struct caps_kv_table *kvt, const char *key) __nonnull();
98void caps_kv_keys_value_set(struct caps_kv_table *kvt, const char *key, const char *val) __nonnull((1,2));
108void caps_kv_raw_entry_get(const struct caps_kv_table *kvt, size_t entry, const char **key, const char **val) __nonnull();
117const struct key_value *caps_kv_base_get(const struct caps_kv_table *kvt) __nonnull();
124size_t caps_kv_element_count_get(const struct caps_kv_table *kvt) __nonnull();
144int caps_kv_key_value_parse_from_string(struct caps_kv_table *kvt, const char *string) __nonnull((1));
145
146__END_DECLS
#define __nonnull(params)
Definition: libcapsbase.h:84
Basic API for everything else of the CAPS universe.
const struct key_value * caps_kv_base_get(const struct caps_kv_table *kvt)
Definition: libcapskeyvalue.c:264
void caps_kv_init(struct caps_kv_table *kvt)
Definition: libcapskeyvalue.c:220
void caps_libkv_init(void)
Definition: libcapskeyvalue.c:49
void caps_kv_raw_entry_get(const struct caps_kv_table *kvt, size_t entry, const char **key, const char **val)
Definition: libcapskeyvalue.c:135
void caps_kv_key_value_add(struct caps_kv_table *kvt, const char *key, const char *value)
Definition: libcapskeyvalue.c:157
int caps_kv_key_value_parse_from_string(struct caps_kv_table *kvt, const char *string)
Definition: libcapskeyvalue.c:435
const char * caps_kv_keys_value_get(const struct caps_kv_table *kvt, const char *key)
Definition: libcapskeyvalue.c:114
void caps_kv_cleanup(struct caps_kv_table *kvt)
Definition: libcapskeyvalue.c:230
void caps_kv_duplicate(struct caps_kv_table *dst, const struct caps_kv_table *src)
Definition: libcapskeyvalue.c:248
size_t caps_kv_element_count_get(const struct caps_kv_table *kvt)
Definition: libcapskeyvalue.c:269
void caps_kv_keys_value_set(struct caps_kv_table *kvt, const char *key, const char *val)
Definition: libcapskeyvalue.c:188
Manage variable arrays.
Definition: libcapskeyvalue.h:33
struct caps_var_table vt
Definition: libcapskeyvalue.h:34
Variable table.
Definition: libcapstable.h:105
Definition: libcapskeyvalue.c:34