Blame src/libotutil/ot-keyfile-utils.h

Packit Service 2a3f3d
/*
Packit Service 2a3f3d
 * Copyright (C) 2011 Colin Walters <walters@verbum.org>.
Packit Service 2a3f3d
 *
Packit Service 2a3f3d
 * SPDX-License-Identifier: LGPL-2.0+
Packit Service 2a3f3d
 *
Packit Service 2a3f3d
 * This library is free software; you can redistribute it and/or
Packit Service 2a3f3d
 * modify it under the terms of the GNU Lesser General Public
Packit Service 2a3f3d
 * License as published by the Free Software Foundation; either
Packit Service 2a3f3d
 * version 2 of the License, or (at your option) any later version.
Packit Service 2a3f3d
 *
Packit Service 2a3f3d
 * This library is distributed in the hope that it will be useful,
Packit Service 2a3f3d
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 2a3f3d
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 2a3f3d
 * Lesser General Public License for more details.
Packit Service 2a3f3d
 *
Packit Service 2a3f3d
 * You should have received a copy of the GNU Lesser General Public
Packit Service 2a3f3d
 * License along with this library; if not, write to the
Packit Service 2a3f3d
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Packit Service 2a3f3d
 * Boston, MA 02111-1307, USA.
Packit Service 2a3f3d
 *
Packit Service 2a3f3d
 * Author: Colin Walters <walters@verbum.org>
Packit Service 2a3f3d
 */
Packit Service 2a3f3d
Packit Service 2a3f3d
#pragma once
Packit Service 2a3f3d
Packit Service 2a3f3d
#include <gio/gio.h>
Packit Service 2a3f3d
Packit Service 2a3f3d
G_BEGIN_DECLS
Packit Service 2a3f3d
Packit Service 2a3f3d
gboolean
Packit Service 2a3f3d
ot_keyfile_get_boolean_with_default (GKeyFile      *keyfile,
Packit Service 2a3f3d
                                     const char    *section,
Packit Service 2a3f3d
                                     const char    *value,
Packit Service 2a3f3d
                                     gboolean       default_value,
Packit Service 2a3f3d
                                     gboolean      *out_bool,
Packit Service 2a3f3d
                                     GError       **error);
Packit Service 2a3f3d
Packit Service 2a3f3d
Packit Service 2a3f3d
gboolean
Packit Service 2a3f3d
ot_keyfile_get_value_with_default (GKeyFile      *keyfile,
Packit Service 2a3f3d
                                   const char    *section,
Packit Service 2a3f3d
                                   const char    *value,
Packit Service 2a3f3d
                                   const char    *default_value,
Packit Service 2a3f3d
                                   char         **out_value,
Packit Service 2a3f3d
                                   GError       **error);
Packit Service 2a3f3d
Packit Service 2a3f3d
gboolean
Packit Service 2a3f3d
ot_keyfile_get_value_with_default_group_optional (GKeyFile      *keyfile,
Packit Service 2a3f3d
                                                  const char    *section,
Packit Service 2a3f3d
                                                  const char    *value,
Packit Service 2a3f3d
                                                  const char    *default_value,
Packit Service 2a3f3d
                                                  char         **out_value,
Packit Service 2a3f3d
                                                  GError       **error);
Packit Service 2a3f3d
Packit Service 2a3f3d
gboolean
Packit Service 2a3f3d
ot_keyfile_get_string_list_with_separator_choice (GKeyFile      *keyfile,
Packit Service 2a3f3d
                                                  const char    *section,
Packit Service 2a3f3d
                                                  const char    *key,
Packit Service 2a3f3d
                                                  const char    *separators,
Packit Service 2a3f3d
                                                  char        ***out_value_list,
Packit Service 2a3f3d
                                                  GError       **error);
Packit Service 2a3f3d
Packit Service 2a3f3d
gboolean
Packit Service 2a3f3d
ot_keyfile_get_string_list_with_default (GKeyFile      *keyfile,
Packit Service 2a3f3d
                                         const char    *section,
Packit Service 2a3f3d
                                         const char    *key,
Packit Service 2a3f3d
                                         char           separator,
Packit Service 2a3f3d
                                         char         **default_value,
Packit Service 2a3f3d
                                         char        ***out_value,
Packit Service 2a3f3d
                                         GError       **error);
Packit Service 2a3f3d
Packit Service 2a3f3d
gboolean
Packit Service 2a3f3d
ot_keyfile_copy_group (GKeyFile   *source_keyfile,
Packit Service 2a3f3d
                       GKeyFile   *target_keyfile,
Packit Service 2a3f3d
                       const char *group_name);
Packit Service 2a3f3d
Packit Service 2a3f3d
G_END_DECLS