Debian Codegraph @

src/technology.h

raw
1 /*
2 * ConnMan GTK GUI
3 *
4 * Copyright (C) 2015 Intel Corporation. All rights reserved.
5 * Author: Jaakko Hannikainen <[email protected]>
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, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef _CONNMAN_GTK_TECHNOLOGY_H
22 #define _CONNMAN_GTK_TECHNOLOGY_H
23
24 #include <gio/gio.h>
25 #include <glib.h>
26 #include <gtk/gtk.h>
27
28 #include "connection.h"
29 #include "service.h"
30
31 struct technology;
32
33 struct technology_list_item {
34 struct technology *technology;
35
36 GtkWidget *item;
37
38 GtkWidget *icon;
39 GtkWidget *label;
40 };
41
42 struct technology_settings {
43 struct technology *technology;
44 struct service *selected;
45 GHashTable *properties;
46
47 GDBusProxy *proxy;
48
49 GtkWidget *grid;
50
51 GtkWidget *title;
52 GtkWidget *status;
53 GtkWidget *icon;
54 GtkWidget *power_switch;
55 gint powersig;
56
57 GtkWidget *contents;
58 GtkWidget *services;
59
60 GtkWidget *buttons;
61 GtkWidget *tethering;
62 GtkWidget *filler;
63 GtkWidget *connect_button;
64 };
65
66 struct technology {
67 struct technology_list_item *list_item;
68 struct technology_settings *settings;
69 GHashTable *services;
70 gchar *path;
71 enum connection_type type;
72 void *data;
73 };
74
75 struct technology *technology_create(GDBusProxy *proxy, const gchar *path,
76 GVariant *properties);
77 void technology_init(struct technology *tech, GVariant *properties_v,
78 GDBusProxy *proxy);
79 void technology_property_changed(struct technology *item, const gchar *key);
80 void technology_services_updated(struct technology *item);
81 void technology_add_service(struct technology *item, struct service *serv);
82 void technology_service_updated(struct technology *item, struct service *serv);
83 void technology_remove_service(struct technology *item, const gchar *path);
84 GVariant *technology_get_property(struct technology *item, const gchar *key);
85 const gchar *technology_get_property_string(struct technology *item,
86 const gchar *key);
87 gboolean technology_get_property_bool(struct technology *item,
88 const gchar *key);
89 void technology_set_property(struct technology *item, const gchar *key,
90 GVariant *value);
91 void technology_free(struct technology *item);
92
93 #endif /* _CONNMAN_GTK_TECHNOLOGY_H */