GCC Code Coverage Report


Directory: ./
File: panels/network/connection-editor/ce-page.h
Date: 2024-05-04 07:58:27
Exec Total Coverage
Lines: 0 1 0.0%
Functions: 0 3 0.0%
Branches: 0 6 0.0%

Line Branch Exec Source
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2012 Red Hat, Inc.
4 *
5 * Licensed under the GNU General Public License Version 2
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 */
21
22 #pragma once
23
24 #include <glib-object.h>
25
26 #include <NetworkManager.h>
27
28 #include <gtk/gtk.h>
29
30 G_BEGIN_DECLS
31
32 G_DECLARE_INTERFACE (CEPage, ce_page, CE, PAGE, GObject)
33
34 struct _CEPageInterface
35 {
36 GTypeInterface g_iface;
37
38 gboolean (*validate) (CEPage *page, NMConnection *connection, GError **error);
39 const gchar *(*get_title) (CEPage *page);
40 const gchar *(*get_security_setting) (CEPage *page);
41 };
42
43 const gchar *ce_page_get_title (CEPage *page);
44 const gchar *ce_page_get_security_setting (CEPage *page);
45 gboolean ce_page_validate (CEPage *page,
46 NMConnection *connection,
47 GError **error);
48 void ce_page_changed (CEPage *page);
49 void ce_page_complete_init (CEPage *page,
50 NMConnection *connection,
51 const gchar *setting_name,
52 GVariant *variant,
53 GError *error);
54
55 gchar **ce_page_get_mac_list (NMClient *client,
56 GType device_type,
57 const gchar *mac_property);
58 void ce_page_setup_mac_combo (GtkComboBoxText *combo,
59 const gchar *current_mac,
60 gchar **mac_list);
61 void ce_page_setup_cloned_mac_combo (GtkComboBoxText *combo,
62 const char *current,
63 gboolean is_wifi);
64 gint ce_get_property_default (NMSetting *setting,
65 const gchar *property_name);
66 gboolean ce_page_address_is_valid (const gchar *addr);
67 gchar *ce_page_trim_address (const gchar *addr);
68 char *ce_page_cloned_mac_get (GtkComboBoxText *combo);
69 gboolean ce_page_cloned_mac_combo_valid (GtkComboBoxText *combo);
70
71 typedef enum {
72 NAME_FORMAT_TYPE,
73 NAME_FORMAT_PROFILE
74 } NameFormat;
75
76 gchar * ce_page_get_next_available_name (const GPtrArray *connections,
77 NameFormat format,
78 const gchar *type_name);
79
80 G_END_DECLS
81