GCC Code Coverage Report


Directory: ./
File: libgsystemservice/config-file.h
Date: 2024-04-09 14:29:48
Exec Total Coverage
Lines: 1 1 100.0%
Functions: 4 4 100.0%
Branches: 5 7 71.4%

Line Branch Exec Source
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
2 *
3 * Copyright © 2013 Collabora Ltd.
4 * Copyright © 2016 Kinvolk GmbH
5 * Copyright © 2017, 2018 Endless Mobile, Inc.
6 *
7 * SPDX-License-Identifier: LGPL-2.1-or-later
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 *
23 * Authors:
24 * - Vivek Dasmohapatra <vivek@etla.org>
25 * - Krzesimir Nowak <krzesimir@kinvolk.io>
26 * - Philip Withnall <withnall@endlessm.com>
27 */
28
29 #pragma once
30
31 #include <gio/gio.h>
32 #include <glib.h>
33 #include <glib-object.h>
34
35 G_BEGIN_DECLS
36
37 #define GSS_TYPE_CONFIG_FILE gss_config_file_get_type ()
38
5/7
✓ Branch 0 taken 7 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 9 times.
✓ Branch 3 taken 9 times.
✗ Branch 4 not taken.
✓ Branch 5 taken 9 times.
✗ Branch 6 not taken.
120 G_DECLARE_FINAL_TYPE (GssConfigFile, gss_config_file, GSS, CONFIG_FILE, GObject)
39
40 GssConfigFile *gss_config_file_new (const gchar * const *key_file_paths,
41 GResource *default_resource,
42 const gchar *default_path);
43
44 guint gss_config_file_get_uint (GssConfigFile *self,
45 const gchar *group_name,
46 const gchar *key_name,
47 guint min_value,
48 guint max_value,
49 GError **error);
50 gboolean gss_config_file_get_boolean (GssConfigFile *self,
51 const gchar *group_name,
52 const gchar *key_name,
53 GError **error);
54 gchar *gss_config_file_get_string (GssConfigFile *self,
55 const gchar *group_name,
56 const gchar *key_name,
57 GError **error);
58 gchar **gss_config_file_get_strv (GssConfigFile *self,
59 const gchar *group_name,
60 const gchar *key_name,
61 gsize *n_elements_out,
62 GError **error);
63
64 gchar **gss_config_file_get_groups (GssConfigFile *self,
65 gsize *n_groups_out,
66 GError **error);
67
68 G_END_DECLS
69