Debian Codegraph @

src/libqmi-glib/qmi-utils.c

raw
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3 /*
4 * libqmi-glib -- GLib/GIO based library to control QMI devices
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA.
20 *
21 * Copyright (C) 2012-2020 Dan Williams <[email protected]>
22 * Copyright (C) 2012-2020 Aleksander Morgado <[email protected]>
23 * Copyright (c) 2022 Qualcomm Innovation Center, Inc.
24 */
25
26 #include <config.h>
27 #include "qmi-utils.h"
28
29 /*****************************************************************************/
30
31 static volatile gint __traces_enabled = FALSE;
32 static volatile gint __hide_personal_info = FALSE;
33
34 gboolean
35 qmi_utils_get_traces_enabled (void)
36 {
37 return (gboolean) g_atomic_int_get (&__traces_enabled);
38 }
39
40 void
41 qmi_utils_set_traces_enabled (gboolean enabled)
42 {
43 g_atomic_int_set (&__traces_enabled, enabled);
44 }
45
46 void
47 qmi_utils_set_show_personal_info (gboolean hide_personal_info)
48 {
49 g_atomic_int_set (&__hide_personal_info, hide_personal_info);
50 }
51
52 gboolean
53 qmi_utils_get_show_personal_info (void)
54 {
55 return (gboolean) g_atomic_int_get (&__hide_personal_info);
56 }