1 /* riemann/attribute.h -- Riemann C client library
2  * Copyright (C) 2013-2017  Gergely Nagy <algernon@madhouse-project.org>
3  *
4  * This library is free software: you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation, either version 3 of
7  * the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef __MADHOUSE_RIEMANN_ATTRIBUTE_H__
19 #define __MADHOUSE_RIEMANN_ATTRIBUTE_H__ 1
20 
21 #include <riemann/proto/riemann.pb-c.h>
22 
23 typedef Attribute riemann_attribute_t;
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 riemann_attribute_t *riemann_attribute_new (void);
30 riemann_attribute_t *riemann_attribute_clone (const riemann_attribute_t *attrib);
31 riemann_attribute_t *riemann_attribute_create (const char *key,
32                                                const char *value);
33 void riemann_attribute_free (riemann_attribute_t *attrib);
34 
35 int riemann_attribute_set_key (riemann_attribute_t *attrib, const char *key);
36 int riemann_attribute_set_value (riemann_attribute_t *attrib, const char *value);
37 int riemann_attribute_set (riemann_attribute_t *attrib,
38                            const char *key, const char *value);
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #endif
45