1/*
2 * Copyright © 2020 Canonical Ltd.
3 * Copyright © 2021 Alexandros Theodotou
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __G_STRVBUILDER_H__
20#define __G_STRVBUILDER_H__
21
22#if !defined(__GLIB_H_INSIDE__) && !defined(GLIB_COMPILATION)
23#error "Only <glib.h> can be included directly."
24#endif
25
26#include <glib/gstrfuncs.h>
27#include <glib/gtypes.h>
28
29G_BEGIN_DECLS
30
31/**
32 * GStrvBuilder:
33 *
34 * A helper object to build a %NULL-terminated string array
35 * by appending. See g_strv_builder_new().
36 *
37 * Since: 2.68
38 */
39typedef struct _GStrvBuilder GStrvBuilder;
40
41GLIB_AVAILABLE_IN_2_68
42GStrvBuilder *g_strv_builder_new (void);
43
44GLIB_AVAILABLE_IN_2_68
45void g_strv_builder_unref (GStrvBuilder *builder);
46
47GLIB_AVAILABLE_IN_2_68
48GStrvBuilder *g_strv_builder_ref (GStrvBuilder *builder);
49
50GLIB_AVAILABLE_IN_2_68
51void g_strv_builder_add (GStrvBuilder *builder,
52 const char *value);
53
54GLIB_AVAILABLE_IN_2_70
55void g_strv_builder_addv (GStrvBuilder *builder,
56 const char **value);
57
58GLIB_AVAILABLE_IN_2_70
59void g_strv_builder_add_many (GStrvBuilder *builder,
60 ...) G_GNUC_NULL_TERMINATED;
61
62GLIB_AVAILABLE_IN_2_68
63GStrv g_strv_builder_end (GStrvBuilder *builder);
64
65G_END_DECLS
66
67#endif /* __G_STRVBUILDER_H__ */
68

source code of include/glib-2.0/glib/gstrvbuilder.h