Merge lp:~kvalo/indicator-network/bug-686356 into lp:~indicator-applet-developers/indicator-network/indicator-network

Proposed by Kalle Valo
Status: Merged
Merged at revision: 174
Proposed branch: lp:~kvalo/indicator-network/bug-686356
Merge into: lp:~indicator-applet-developers/indicator-network/indicator-network
Diff against target: 1103 lines (+816/-6)
10 files modified
.bzrignore (+1/-0)
src/libconnman/Connman-1.0.vapi (+33/-0)
src/libconnman/Makefile.am (+3/-1)
src/libconnman/connman-ipv6.c (+315/-0)
src/libconnman/connman-ipv6.h (+93/-0)
src/libconnman/connman-service.c (+243/-5)
src/libconnman/connman-service.h (+5/-0)
src/libconnman/connman.h (+2/-0)
src/libconnman/generate_vapi (+1/-0)
src/settings/frontend/widgets/dialogs/edit-connection.vala (+120/-0)
To merge this branch: bzr merge lp:~kvalo/indicator-network/bug-686356
Reviewer Review Type Date Requested Status
Mikkel Kamstrup Erlandsen (community) Approve
Review via email: mp+53980@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Really really tight work Kalle.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2011-03-09 13:29:43 +0000
+++ .bzrignore 2011-03-18 12:46:25 +0000
@@ -121,3 +121,4 @@
121src/indicator/toggleswitch.c121src/indicator/toggleswitch.c
122src/indicator/toggleswitch.h122src/indicator/toggleswitch.h
123src/indicator/toggleswitch.stamp123src/indicator/toggleswitch.stamp
124src/libconnman/libconnman_la-connman-ipv6.lo
124125
=== modified file 'src/libconnman/Connman-1.0.vapi'
--- src/libconnman/Connman-1.0.vapi 2011-02-22 13:57:51 +0000
+++ src/libconnman/Connman-1.0.vapi 2011-03-18 12:46:25 +0000
@@ -20,6 +20,22 @@
20 public uint method { get; construct; }20 public uint method { get; construct; }
21 public string netmask { get; construct; }21 public string netmask { get; construct; }
22 }22 }
23 [CCode (cheader_filename = "connman-ipv6.h")]
24 public class IPv6 : GLib.Object {
25 [CCode (has_construct_function = false)]
26 public IPv6 (Connman.IPv6Method method, string address, uint8 prefix_length, string gateway) throws GLib.Error;
27 public unowned string get_address ();
28 public unowned string get_gateway ();
29 public Connman.IPv6Method get_method ();
30 public unowned string get_method_as_string ();
31 public uint8 get_prefix_length ();
32 [CCode (has_construct_function = false)]
33 public IPv6.with_strings (string method, string address, uint8 prefix_length, string gateway) throws GLib.Error;
34 public string address { get; construct; }
35 public string gateway { get; construct; }
36 public uint method { get; construct; }
37 public uint8 prefix_length { get; construct; }
38 }
23 [CCode (cheader_filename = "connman-manager.h")]39 [CCode (cheader_filename = "connman-manager.h")]
24 public class Manager : GLib.Object {40 public class Manager : GLib.Object {
25 public weak GLib.Object parent;41 public weak GLib.Object parent;
@@ -63,6 +79,8 @@
63 public bool get_immutable ();79 public bool get_immutable ();
64 public unowned Connman.IPv4 get_ipv4 ();80 public unowned Connman.IPv4 get_ipv4 ();
65 public unowned Connman.IPv4 get_ipv4_configuration ();81 public unowned Connman.IPv4 get_ipv4_configuration ();
82 public unowned Connman.IPv6 get_ipv6 ();
83 public unowned Connman.IPv6 get_ipv6_configuration ();
66 public bool get_login_required ();84 public bool get_login_required ();
67 public unowned string get_mcc ();85 public unowned string get_mcc ();
68 public unowned string get_mnc ();86 public unowned string get_mnc ();
@@ -87,6 +105,7 @@
87 public void set_autoconnect (bool autoconnect);105 public void set_autoconnect (bool autoconnect);
88 public void set_domains_configuration ([CCode (array_length = false, array_null_terminated = true)] string[] domains);106 public void set_domains_configuration ([CCode (array_length = false, array_null_terminated = true)] string[] domains);
89 public void set_ipv4_configuration (Connman.IPv4 ipv4);107 public void set_ipv4_configuration (Connman.IPv4 ipv4);
108 public void set_ipv6_configuration (Connman.IPv6 ipv6);
90 public void set_nameservers_configuration ([CCode (array_length = false, array_null_terminated = true)] string[] nameservers);109 public void set_nameservers_configuration ([CCode (array_length = false, array_null_terminated = true)] string[] nameservers);
91 public void set_passphrase (string passphrase);110 public void set_passphrase (string passphrase);
92 public static unowned string state2str (Connman.ServiceState state);111 public static unowned string state2str (Connman.ServiceState state);
@@ -104,6 +123,8 @@
104 public bool immutable { get; }123 public bool immutable { get; }
105 public Connman.IPv4 ipv4 { get; }124 public Connman.IPv4 ipv4 { get; }
106 public Connman.IPv4 ipv4_configuration { get; set; }125 public Connman.IPv4 ipv4_configuration { get; set; }
126 public Connman.IPv6 ipv6 { get; }
127 public Connman.IPv6 ipv6_configuration { get; set; }
107 public bool login_required { get; }128 public bool login_required { get; }
108 public string mcc { get; }129 public string mcc { get; }
109 public string mnc { get; }130 public string mnc { get; }
@@ -132,6 +153,18 @@
132 FIXED,153 FIXED,
133 DHCP154 DHCP
134 }155 }
156 [CCode (cprefix = "CONNMAN_IPV6_ERROR_INVALID_", cheader_filename = "connman-ipv6.h")]
157 public enum IPv6Error {
158 METHOD,
159 SETTINGS
160 }
161 [CCode (cprefix = "CONNMAN_IPV6_METHOD_", cheader_filename = "connman-ipv6.h")]
162 public enum IPv6Method {
163 OFF,
164 MANUAL,
165 FIXED,
166 AUTO
167 }
135 [CCode (cprefix = "CONNMAN_SERVICE_MODE_", cheader_filename = "connman-service.h")]168 [CCode (cprefix = "CONNMAN_SERVICE_MODE_", cheader_filename = "connman-service.h")]
136 public enum ServiceMode {169 public enum ServiceMode {
137 MANAGED,170 MANAGED,
138171
=== modified file 'src/libconnman/Makefile.am'
--- src/libconnman/Makefile.am 2011-02-02 13:50:19 +0000
+++ src/libconnman/Makefile.am 2011-03-18 12:46:25 +0000
@@ -7,7 +7,9 @@
7 connman-service.c \7 connman-service.c \
8 connman-service.h \8 connman-service.h \
9 connman-ipv4.c \9 connman-ipv4.c \
10 connman-ipv4.h10 connman-ipv4.h \
11 connman-ipv6.c \
12 connman-ipv6.h
1113
12libconnman_la_LIBADD = \14libconnman_la_LIBADD = \
13 $(GLIB_LIBS) \15 $(GLIB_LIBS) \
1416
=== added file 'src/libconnman/connman-ipv6.c'
--- src/libconnman/connman-ipv6.c 1970-01-01 00:00:00 +0000
+++ src/libconnman/connman-ipv6.c 2011-03-18 12:46:25 +0000
@@ -0,0 +1,315 @@
1/*
2 * indicator-network - user interface for connman
3 * Copyright 2011 Canonical Ltd.
4 *
5 * Authors:
6 * Kalle Valo <kalle.valo@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include "connman-ipv6.h"
22
23#include <string.h>
24
25G_DEFINE_TYPE(ConnmanIPv6, connman_ipv6, G_TYPE_OBJECT)
26
27#define GET_PRIVATE(o) \
28 (G_TYPE_INSTANCE_GET_PRIVATE((o), CONNMAN_TYPE_IPV6, \
29 ConnmanIPv6Private))
30
31typedef struct _ConnmanIPv6Private ConnmanIPv6Private;
32
33struct _ConnmanIPv6Private {
34 ConnmanIPv6Method method;
35 gchar *address;
36 guchar prefix_length;
37 gchar *gateway;
38};
39
40enum
41{
42 /* reserved */
43 PROP_0,
44
45 PROP_METHOD,
46 PROP_ADDRESS,
47 PROP_PREFIX_LENGTH,
48 PROP_GATEWAY,
49};
50
51struct ipv6_method_entry
52{
53 const gchar *str;
54 ConnmanIPv6Method method;
55};
56
57static const struct ipv6_method_entry method_map[] = {
58 { "off", CONNMAN_IPV6_METHOD_OFF },
59 { "manual", CONNMAN_IPV6_METHOD_MANUAL },
60 { "fixed", CONNMAN_IPV6_METHOD_FIXED },
61 { "auto", CONNMAN_IPV6_METHOD_AUTO },
62};
63
64static ConnmanIPv6Method str2method(const gchar *state)
65{
66 const struct ipv6_method_entry *s;
67 guint i;
68
69 for (i = 0; i < G_N_ELEMENTS(method_map); i++) {
70 s = &method_map[i];
71 if (g_strcmp0(s->str, state) == 0)
72 return s->method;
73 }
74
75 g_warning("unknown ipv6 method: %s", state);
76
77 return CONNMAN_IPV6_METHOD_AUTO;
78}
79
80static const gchar *method2str(ConnmanIPv6Method method)
81{
82 const struct ipv6_method_entry *s;
83 guint i;
84
85 for (i = 0; i < G_N_ELEMENTS(method_map); i++) {
86 s = &method_map[i];
87 if (s->method == method)
88 return s->str;
89 }
90
91 g_warning("%s(): unknown ipv6 method %d", __func__, method);
92
93 return "auto";
94}
95
96ConnmanIPv6Method connman_ipv6_get_method(ConnmanIPv6 *self)
97{
98 ConnmanIPv6Private *priv = GET_PRIVATE(self);
99
100 g_return_val_if_fail(CONNMAN_IS_IPV6(self), CONNMAN_IPV6_METHOD_OFF);
101 g_return_val_if_fail(priv != NULL, CONNMAN_IPV6_METHOD_OFF);
102
103 return priv->method;
104}
105
106const gchar *connman_ipv6_get_method_as_string(ConnmanIPv6 *self)
107{
108 ConnmanIPv6Private *priv = GET_PRIVATE(self);
109
110 g_return_val_if_fail(CONNMAN_IS_IPV6(self), CONNMAN_IPV6_METHOD_OFF);
111 g_return_val_if_fail(priv != NULL, CONNMAN_IPV6_METHOD_OFF);
112
113 return method2str(priv->method);
114}
115
116
117const gchar *connman_ipv6_get_address(ConnmanIPv6 *self)
118{
119 ConnmanIPv6Private *priv = GET_PRIVATE(self);
120
121 g_return_val_if_fail(CONNMAN_IS_IPV6(self), NULL);
122 g_return_val_if_fail(priv != NULL, NULL);
123
124 return priv->address;
125}
126
127guchar connman_ipv6_get_prefix_length(ConnmanIPv6 *self)
128{
129 ConnmanIPv6Private *priv = GET_PRIVATE(self);
130
131 g_return_val_if_fail(CONNMAN_IS_IPV6(self), 0);
132 g_return_val_if_fail(priv != NULL, 0);
133
134 return priv->prefix_length;
135}
136
137const gchar *connman_ipv6_get_gateway(ConnmanIPv6 *self)
138{
139 ConnmanIPv6Private *priv = GET_PRIVATE(self);
140
141 g_return_val_if_fail(CONNMAN_IS_IPV6(self), NULL);
142 g_return_val_if_fail(priv != NULL, NULL);
143
144 return priv->gateway;
145}
146
147static void connman_ipv6_set_property(GObject *object, guint property_id,
148 const GValue *value, GParamSpec *pspec)
149{
150 ConnmanIPv6 *self = CONNMAN_IPV6(object);
151 ConnmanIPv6Private *priv = GET_PRIVATE(self);
152
153 g_return_if_fail(priv != NULL);
154
155 switch(property_id) {
156 case PROP_METHOD:
157 priv->method = g_value_get_uint(value);
158 break;
159 case PROP_ADDRESS:
160 g_free(priv->address);
161 priv->address = g_value_dup_string(value);
162 break;
163 case PROP_PREFIX_LENGTH:
164 priv->prefix_length = g_value_get_uchar(value);
165 break;
166 case PROP_GATEWAY:
167 g_free(priv->gateway);
168 priv->gateway = g_value_dup_string(value);
169 break;
170 default:
171 /* We don't have any other property... */
172 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
173 break;
174 }
175}
176
177static void connman_ipv6_get_property(GObject *object, guint property_id,
178 GValue *value, GParamSpec *pspec)
179{
180 ConnmanIPv6 *self = CONNMAN_IPV6(object);
181 ConnmanIPv6Private *priv = GET_PRIVATE(self);
182
183 g_return_if_fail(priv != NULL);
184
185 switch(property_id) {
186 case PROP_METHOD:
187 g_value_set_uint(value, priv->method);
188 break;
189 case PROP_ADDRESS:
190 g_value_set_string(value, priv->address);
191 break;
192 case PROP_PREFIX_LENGTH:
193 g_value_set_uchar(value, priv->prefix_length);
194 break;
195 case PROP_GATEWAY:
196 g_value_set_string(value, priv->gateway);
197 break;
198 default:
199 /* We don't have any other property... */
200 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
201 break;
202 }
203}
204
205static void connman_ipv6_dispose(GObject *object)
206{
207 G_OBJECT_CLASS(connman_ipv6_parent_class)->dispose(object);
208}
209
210static void connman_ipv6_finalize(GObject *object)
211{
212 ConnmanIPv6 *self = CONNMAN_IPV6(object);
213 ConnmanIPv6Private *priv = GET_PRIVATE(self);
214
215 g_free(priv->address);
216 g_free(priv->gateway);
217
218 G_OBJECT_CLASS(connman_ipv6_parent_class)->finalize(object);
219}
220
221static void connman_ipv6_class_init(ConnmanIPv6Class *klass)
222{
223 GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
224 GParamSpec *pspec;
225
226 g_type_class_add_private(klass, sizeof(ConnmanIPv6Private));
227
228 gobject_class->dispose = connman_ipv6_dispose;
229 gobject_class->finalize = connman_ipv6_finalize;
230 gobject_class->set_property = connman_ipv6_set_property;
231 gobject_class->get_property = connman_ipv6_get_property;
232
233 pspec = g_param_spec_uint("method",
234 "ConnmanIPv6's method property",
235 "The ipv6 method",
236 0, G_MAXUINT,
237 CONNMAN_IPV6_METHOD_OFF,
238 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
239 g_object_class_install_property(gobject_class, PROP_METHOD, pspec);
240
241 pspec = g_param_spec_string("address",
242 "ConnmanIPv6's address",
243 "IPv6 address",
244 NULL,
245 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
246 g_object_class_install_property(gobject_class, PROP_ADDRESS, pspec);
247
248 pspec = g_param_spec_uchar("prefix-length",
249 "ConnmanIPv6's prefix length",
250 "IPv6 prefix length",
251 0,
252 128,
253 0,
254 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
255 g_object_class_install_property(gobject_class, PROP_PREFIX_LENGTH, pspec);
256
257 pspec = g_param_spec_string("gateway",
258 "ConnmanIPv6's gateway",
259 "IPv6 gateway",
260 NULL,
261 G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
262 g_object_class_install_property(gobject_class, PROP_GATEWAY, pspec);
263}
264
265static void connman_ipv6_init(ConnmanIPv6 *self)
266{
267}
268
269ConnmanIPv6 *connman_ipv6_new(ConnmanIPv6Method method,
270 const gchar *address,
271 guchar prefix_length,
272 const gchar *gateway,
273 GError **error)
274{
275 g_return_val_if_fail(error == NULL || *error == NULL, NULL);
276
277 return g_object_new(CONNMAN_TYPE_IPV6,
278 "method", method,
279 "address", address,
280 "prefix-length", prefix_length,
281 "gateway", gateway,
282 NULL);
283}
284
285ConnmanIPv6 *connman_ipv6_new_with_strings(const gchar *method,
286 const gchar *address,
287 guchar prefix_length,
288 const gchar *gateway,
289 GError **error)
290{
291 const struct ipv6_method_entry *s;
292 gboolean valid = FALSE;
293 guint i;
294
295 g_return_val_if_fail(error == NULL || *error == NULL, NULL);
296
297 /* check that method is valid and if not, throw an error */
298 for (i = 0; i < G_N_ELEMENTS(method_map); i++) {
299 s = &method_map[i];
300 if (g_strcmp0(s->str, method) == 0) {
301 valid = TRUE;
302 break;
303 }
304 }
305
306 if (valid == FALSE) {
307 g_set_error(error, CONNMAN_IPV6_ERROR,
308 CONNMAN_IPV6_ERROR_INVALID_METHOD,
309 "Invalid ipv6 method: %s", method);
310 return NULL;
311 }
312
313 return connman_ipv6_new(str2method(method), address, prefix_length, gateway,
314 error);
315}
0316
=== added file 'src/libconnman/connman-ipv6.h'
--- src/libconnman/connman-ipv6.h 1970-01-01 00:00:00 +0000
+++ src/libconnman/connman-ipv6.h 2011-03-18 12:46:25 +0000
@@ -0,0 +1,93 @@
1/*
2 * indicator-network - user interface for connman
3 * Copyright 2011 Canonical Ltd.
4 *
5 * Authors:
6 * Kalle Valo <kalle.valo@canonical.com>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef _CONNMAN_IPV6_H_
22#define _CONNMAN_IPV6_H_
23
24#include <glib-object.h>
25
26G_BEGIN_DECLS
27
28#define CONNMAN_TYPE_IPV6 connman_ipv6_get_type()
29
30#define CONNMAN_IPV6(obj) \
31 (G_TYPE_CHECK_INSTANCE_CAST((obj), CONNMAN_TYPE_IPV6, \
32 ConnmanIPv6))
33
34#define CONNMAN_IPV6_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST((klass), CONNMAN_TYPE_IPV6, \
36 ConnmanIPv6Class))
37
38#define CONNMAN_IS_IPV6(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE((obj), CONNMAN_TYPE_IPV6))
40
41#define CONNMAN_IS_IPV6_CLASS(klass) \
42 (G_TYPE_CHECK_CLASS_TYPE((klass), CONNMAN_TYPE_IPV6))
43
44#define CONNMAN_IPV6_GET_CLASS(obj) \
45 (G_TYPE_INSTANCE_GET_CLASS((obj), CONNMAN_TYPE_IPV6, \
46 ConnmanIPv6Class))
47
48typedef struct {
49 GObject parent;
50} ConnmanIPv6;
51
52typedef struct {
53 GObjectClass parent_class;
54} ConnmanIPv6Class;
55
56#define CONNMAN_IPV6_ERROR connman_ipv6_error_quark()
57
58static inline GQuark connman_ipv6_error_quark(void)
59{
60 return g_quark_from_static_string ("connman-ipv6-error-quark");
61}
62
63typedef enum {
64 CONNMAN_IPV6_ERROR_INVALID_METHOD,
65 CONNMAN_IPV6_ERROR_INVALID_SETTINGS,
66} ConnmanIPv6Error;
67
68typedef enum {
69 CONNMAN_IPV6_METHOD_OFF,
70 CONNMAN_IPV6_METHOD_MANUAL,
71 CONNMAN_IPV6_METHOD_FIXED,
72 CONNMAN_IPV6_METHOD_AUTO,
73} ConnmanIPv6Method;
74
75GType connman_ipv6_get_type(void);
76
77ConnmanIPv6Method connman_ipv6_get_method(ConnmanIPv6 *self);
78const gchar *connman_ipv6_get_method_as_string(ConnmanIPv6 *self);
79const gchar *connman_ipv6_get_address(ConnmanIPv6 *self);
80guchar connman_ipv6_get_prefix_length(ConnmanIPv6 *self);
81const gchar *connman_ipv6_get_gateway(ConnmanIPv6 *self);
82ConnmanIPv6 *connman_ipv6_new(ConnmanIPv6Method method,
83 const gchar *address,
84 guchar prefix_length,
85 const gchar *gateway,
86 GError **error);
87ConnmanIPv6 *connman_ipv6_new_with_strings(const gchar *method,
88 const gchar *address,
89 guchar prefix_length,
90 const gchar *gateway,
91 GError **error);
92
93#endif
094
=== modified file 'src/libconnman/connman-service.c'
--- src/libconnman/connman-service.c 2011-02-21 16:24:29 +0000
+++ src/libconnman/connman-service.c 2011-03-18 12:46:25 +0000
@@ -65,6 +65,8 @@
65 gchar **domains_configuration;65 gchar **domains_configuration;
66 ConnmanIPv4 *ipv4;66 ConnmanIPv4 *ipv4;
67 ConnmanIPv4 *ipv4_configuration;67 ConnmanIPv4 *ipv4_configuration;
68 ConnmanIPv6 *ipv6;
69 ConnmanIPv6 *ipv6_configuration;
68};70};
6971
70enum72enum
@@ -99,8 +101,8 @@
99 PROP_DOMAINS_CONFIGURATION, /* rw */101 PROP_DOMAINS_CONFIGURATION, /* rw */
100 PROP_IPV4,102 PROP_IPV4,
101 PROP_IPV4_CONFIGURATION, /* rw */103 PROP_IPV4_CONFIGURATION, /* rw */
102 /* PROP_IPV6, */104 PROP_IPV6,
103 /* PROP_IPV6_CONFIGURATION, /\* rw *\/ */105 PROP_IPV6_CONFIGURATION, /* rw */
104 /* PROP_PROXY, */106 /* PROP_PROXY, */
105 /* PROP_PROXY_CONFIGURATION, /\* rw *\/ */107 /* PROP_PROXY_CONFIGURATION, /\* rw *\/ */
106 /* PROP_PROVIDER, */108 /* PROP_PROVIDER, */
@@ -647,6 +649,53 @@
647 g_object_set(self, "ipv4-configuration", ipv4, NULL);649 g_object_set(self, "ipv4-configuration", ipv4, NULL);
648}650}
649651
652/**
653 * connman_service_get_ipv6:
654 *
655 * @self: self
656 *
657 * Returns: (transfer none): Current ipv6 settings. The caller must
658 * take a reference.
659 */
660ConnmanIPv6 *connman_service_get_ipv6(ConnmanService *self)
661{
662 ConnmanServicePrivate *priv = GET_PRIVATE(self);
663
664 g_return_val_if_fail(CONNMAN_IS_SERVICE(self), NULL);
665 g_return_val_if_fail(priv != NULL, NULL);
666
667 return priv->ipv6;
668}
669
670/**
671 * connman_service_get_ipv6_configuration:
672 *
673 * @self: self
674 *
675 * Returns: (transfer none): Current configured ipv6 settings. The caller must
676 * take a reference.
677 */
678ConnmanIPv6 *connman_service_get_ipv6_configuration(ConnmanService *self)
679{
680 ConnmanServicePrivate *priv = GET_PRIVATE(self);
681
682 g_return_val_if_fail(CONNMAN_IS_SERVICE(self), NULL);
683 g_return_val_if_fail(priv != NULL, NULL);
684
685 return priv->ipv6_configuration;
686}
687
688void connman_service_set_ipv6_configuration(ConnmanService *self,
689 ConnmanIPv6 *ipv6)
690{
691 ConnmanServicePrivate *priv = GET_PRIVATE(self);
692
693 g_return_if_fail(CONNMAN_IS_SERVICE(self));
694 g_return_if_fail(priv != NULL);
695
696 g_object_set(self, "ipv6-configuration", ipv6, NULL);
697}
698
650const gchar *connman_service_get_path(ConnmanService *self)699const gchar *connman_service_get_path(ConnmanService *self)
651{700{
652 ConnmanServicePrivate *priv = GET_PRIVATE(self);701 ConnmanServicePrivate *priv = GET_PRIVATE(self);
@@ -1109,6 +1158,11 @@
11091158
1110 out:1159 out:
1111 g_object_notify(G_OBJECT(self), "ipv4");1160 g_object_notify(G_OBJECT(self), "ipv4");
1161
1162 g_free(method);
1163 g_free(address);
1164 g_free(netmask);
1165 g_free(gateway);
1112}1166}
11131167
1114static void ipv4_configuration_updated(ConnmanService *self, GVariant *variant)1168static void ipv4_configuration_updated(ConnmanService *self, GVariant *variant)
@@ -1120,9 +1174,9 @@
1120 GVariantIter iter;1174 GVariantIter iter;
1121 GVariant *value;1175 GVariant *value;
11221176
1123 if (priv->ipv4 != NULL) {1177 if (priv->ipv4_configuration != NULL) {
1124 g_object_unref(priv->ipv4);1178 g_object_unref(priv->ipv4_configuration);
1125 priv->ipv4 = NULL;1179 priv->ipv4_configuration = NULL;
1126 }1180 }
11271181
1128 g_variant_iter_init(&iter, variant);1182 g_variant_iter_init(&iter, variant);
@@ -1162,6 +1216,121 @@
11621216
1163 out:1217 out:
1164 g_object_notify(G_OBJECT(self), "ipv4-configuration");1218 g_object_notify(G_OBJECT(self), "ipv4-configuration");
1219
1220 g_free(method);
1221 g_free(address);
1222 g_free(netmask);
1223 g_free(gateway);
1224}
1225
1226static void ipv6_updated(ConnmanService *self, GVariant *variant)
1227{
1228 ConnmanServicePrivate *priv = GET_PRIVATE(self);
1229 gchar *method = NULL, *address = NULL, *gateway = NULL, *key;
1230 guchar prefix_len = 0;
1231 GError *error = NULL;
1232 GVariantIter iter;
1233 GVariant *value;
1234
1235 if (priv->ipv6 != NULL) {
1236 g_object_unref(priv->ipv6);
1237 priv->ipv6 = NULL;
1238 }
1239
1240 g_variant_iter_init(&iter, variant);
1241
1242 while (g_variant_iter_next(&iter, "{sv}", &key, &value)) {
1243 if (g_strcmp0(key, "Method") == 0)
1244 method = g_variant_dup_string(value, NULL);
1245 else if (g_strcmp0(key, "Address") == 0)
1246 address = g_variant_dup_string(value, NULL);
1247 else if (g_strcmp0(key, "PrefixLength") == 0)
1248 prefix_len = g_variant_get_byte(value);
1249 else if (g_strcmp0(key, "Gateway") == 0)
1250 gateway = g_variant_dup_string(value, NULL);
1251 else
1252 g_warning("Unknown ipv6 property: %s", key);
1253
1254 g_free(key);
1255 g_variant_unref(value);
1256 }
1257
1258 if (method == NULL && address == NULL &&
1259 prefix_len == 0 && gateway == NULL)
1260 /* some cases, like with bluetooth, ipv6 dict is just empty */
1261 goto out;
1262
1263 priv->ipv6 = connman_ipv6_new_with_strings(method, address, prefix_len,
1264 gateway, &error);
1265 if (error != NULL) {
1266 g_warning("Received invalid ipv6 settings: %s", error->message);
1267 g_error_free(error);
1268 return;
1269 }
1270
1271 out:
1272 g_object_notify(G_OBJECT(self), "ipv6");
1273
1274 g_free(method);
1275 g_free(address);
1276 g_free(gateway);
1277}
1278
1279static void ipv6_configuration_updated(ConnmanService *self, GVariant *variant)
1280{
1281 ConnmanServicePrivate *priv = GET_PRIVATE(self);
1282 gchar *method = NULL, *address = NULL, *gateway = NULL, *key;
1283 guchar prefix_len = 0;
1284 GError *error = NULL;
1285 GVariantIter iter;
1286 GVariant *value;
1287
1288 if (priv->ipv6_configuration != NULL) {
1289 g_object_unref(priv->ipv6_configuration);
1290 priv->ipv6_configuration = NULL;
1291 }
1292
1293 g_variant_iter_init(&iter, variant);
1294
1295 while (g_variant_iter_next(&iter, "{sv}", &key, &value)) {
1296 if (g_strcmp0(key, "Method") == 0)
1297 method = g_variant_dup_string(value, NULL);
1298 else if (g_strcmp0(key, "Address") == 0)
1299 address = g_variant_dup_string(value, NULL);
1300 else if (g_strcmp0(key, "PrefixLength") == 0)
1301 prefix_len = g_variant_get_byte(value);
1302 else if (g_strcmp0(key, "Gateway") == 0)
1303 gateway = g_variant_dup_string(value, NULL);
1304 else
1305 g_warning("Unknown ipv6 property: %s", key);
1306
1307 g_free(key);
1308 g_variant_unref(value);
1309 }
1310
1311 if (method == NULL && address == NULL &&
1312 prefix_len == 0 && gateway == NULL)
1313 /* some cases, like with bluetooth, ipv6 dict is just empty */
1314 goto out;
1315
1316 priv->ipv6_configuration = connman_ipv6_new_with_strings(method,
1317 address,
1318 prefix_len,
1319 gateway,
1320 &error);
1321 if (error != NULL) {
1322 g_warning("Received invalid ipv6 configuration settings: %s",
1323 error->message);
1324 g_error_free(error);
1325 return;
1326 }
1327
1328 out:
1329 g_object_notify(G_OBJECT(self), "ipv6-configuration");
1330
1331 g_free(method);
1332 g_free(address);
1333 g_free(gateway);
1165}1334}
11661335
1167struct property_map1336struct property_map
@@ -1195,6 +1364,8 @@
1195 { CONNMAN_PROPERTY_DOMAINS_CONFIGURATION, domains_configuration_updated },1364 { CONNMAN_PROPERTY_DOMAINS_CONFIGURATION, domains_configuration_updated },
1196 { CONNMAN_PROPERTY_IPV4, ipv4_updated },1365 { CONNMAN_PROPERTY_IPV4, ipv4_updated },
1197 { CONNMAN_PROPERTY_IPV4_CONFIGURATION, ipv4_configuration_updated },1366 { CONNMAN_PROPERTY_IPV4_CONFIGURATION, ipv4_configuration_updated },
1367 { CONNMAN_PROPERTY_IPV6, ipv6_updated },
1368 { CONNMAN_PROPERTY_IPV6_CONFIGURATION, ipv6_configuration_updated },
1198};1369};
11991370
1200static void property_updated(ConnmanService *self, const gchar *property,1371static void property_updated(ConnmanService *self, const gchar *property,
@@ -1505,6 +1676,37 @@
1505 set_service_property(self, "IPv4.Configuration", value);1676 set_service_property(self, "IPv4.Configuration", value);
1506}1677}
15071678
1679static void update_ipv6_configuration(ConnmanService *self)
1680{
1681 ConnmanServicePrivate *priv = GET_PRIVATE(self);
1682 GVariantBuilder builder;
1683 gchar prefix_length[10];
1684 ConnmanIPv6 *ipv6;
1685 GVariant *value;
1686
1687 if (priv->ipv6_configuration == NULL)
1688 return;
1689
1690 ipv6 = priv->ipv6_configuration;
1691
1692 g_variant_builder_init(&builder, G_VARIANT_TYPE("a{ss}"));
1693
1694 g_variant_builder_add(&builder, "{ss}", "Method",
1695 connman_ipv6_get_method_as_string(ipv6));
1696 g_variant_builder_add(&builder, "{ss}", "Address",
1697 connman_ipv6_get_address(ipv6));
1698
1699 g_snprintf(prefix_length, sizeof(prefix_length), "%d",
1700 connman_ipv6_get_prefix_length(ipv6));
1701 g_variant_builder_add(&builder, "{ss}", "PrefixLength", prefix_length);
1702 g_variant_builder_add(&builder, "{ss}", "Gateway",
1703 connman_ipv6_get_gateway(ipv6));
1704
1705 value = g_variant_new("a{ss}", &builder);
1706
1707 set_service_property(self, "IPv6.Configuration", value);
1708}
1709
1508static void connman_service_set_property(GObject *object,1710static void connman_service_set_property(GObject *object,
1509 guint property_id,1711 guint property_id,
1510 const GValue *value,1712 const GValue *value,
@@ -1611,6 +1813,17 @@
1611 priv->ipv4_configuration = g_value_dup_object(value);1813 priv->ipv4_configuration = g_value_dup_object(value);
1612 update_ipv4_configuration(self);1814 update_ipv4_configuration(self);
1613 break;1815 break;
1816 case PROP_IPV6:
1817 if (priv->ipv6 != NULL)
1818 g_object_unref(priv->ipv6);
1819 priv->ipv6 = g_value_dup_object(value);
1820 break;
1821 case PROP_IPV6_CONFIGURATION:
1822 if (priv->ipv6_configuration != NULL)
1823 g_object_unref(priv->ipv6_configuration);
1824 priv->ipv6_configuration = g_value_dup_object(value);
1825 update_ipv6_configuration(self);
1826 break;
1614 default:1827 default:
1615 /* We don't have any other property... */1828 /* We don't have any other property... */
1616 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);1829 G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
@@ -1727,6 +1940,16 @@
1727 g_object_unref(priv->ipv4_configuration);1940 g_object_unref(priv->ipv4_configuration);
1728 priv->ipv4_configuration = NULL;1941 priv->ipv4_configuration = NULL;
1729 }1942 }
1943
1944 if (priv->ipv6 != NULL) {
1945 g_object_unref(priv->ipv6);
1946 priv->ipv6 = NULL;
1947 }
1948
1949 if (priv->ipv6_configuration != NULL) {
1950 g_object_unref(priv->ipv6_configuration);
1951 priv->ipv6_configuration = NULL;
1952 }
1730}1953}
17311954
1732static void connman_service_finalize(GObject *object)1955static void connman_service_finalize(GObject *object)
@@ -1956,6 +2179,21 @@
1956 G_PARAM_READWRITE);2179 G_PARAM_READWRITE);
1957 g_object_class_install_property(gobject_class, PROP_IPV4_CONFIGURATION,2180 g_object_class_install_property(gobject_class, PROP_IPV4_CONFIGURATION,
1958 pspec);2181 pspec);
2182
2183 pspec = g_param_spec_object("ipv6",
2184 "ConnmanService's ipv6 property",
2185 "ConnmanIPv6 object",
2186 CONNMAN_TYPE_IPV6,
2187 G_PARAM_READABLE);
2188 g_object_class_install_property(gobject_class, PROP_IPV6, pspec);
2189
2190 pspec = g_param_spec_object("ipv6-configuration",
2191 "ConnmanService's ipv6-configuration property",
2192 "ConnmanIPv6 object",
2193 CONNMAN_TYPE_IPV6,
2194 G_PARAM_READWRITE);
2195 g_object_class_install_property(gobject_class, PROP_IPV6_CONFIGURATION,
2196 pspec);
1959}2197}
19602198
1961static void connman_service_init(ConnmanService *self)2199static void connman_service_init(ConnmanService *self)
19622200
=== modified file 'src/libconnman/connman-service.h'
--- src/libconnman/connman-service.h 2011-02-21 16:24:29 +0000
+++ src/libconnman/connman-service.h 2011-03-18 12:46:25 +0000
@@ -22,6 +22,7 @@
22#define _CONNMAN_SERVICE_H_22#define _CONNMAN_SERVICE_H_
2323
24#include "connman-ipv4.h"24#include "connman-ipv4.h"
25#include "connman-ipv6.h"
2526
26#include <glib-object.h>27#include <glib-object.h>
27#include <gio/gio.h>28#include <gio/gio.h>
@@ -129,6 +130,10 @@
129ConnmanIPv4 *connman_service_get_ipv4_configuration(ConnmanService *self);130ConnmanIPv4 *connman_service_get_ipv4_configuration(ConnmanService *self);
130void connman_service_set_ipv4_configuration(ConnmanService *self,131void connman_service_set_ipv4_configuration(ConnmanService *self,
131 ConnmanIPv4 *ipv4);132 ConnmanIPv4 *ipv4);
133ConnmanIPv6 *connman_service_get_ipv6(ConnmanService *self);
134ConnmanIPv6 *connman_service_get_ipv6_configuration(ConnmanService *self);
135void connman_service_set_ipv6_configuration(ConnmanService *self,
136 ConnmanIPv6 *ipv6);
132137
133/* methods */138/* methods */
134void connman_service_connect(ConnmanService *self,139void connman_service_connect(ConnmanService *self,
135140
=== modified file 'src/libconnman/connman.h'
--- src/libconnman/connman.h 2011-02-22 13:57:51 +0000
+++ src/libconnman/connman.h 2011-03-18 12:46:25 +0000
@@ -74,6 +74,8 @@
74#define CONNMAN_PROPERTY_DOMAINS_CONFIGURATION "Domains.Configuration"74#define CONNMAN_PROPERTY_DOMAINS_CONFIGURATION "Domains.Configuration"
75#define CONNMAN_PROPERTY_IPV4 "IPv4"75#define CONNMAN_PROPERTY_IPV4 "IPv4"
76#define CONNMAN_PROPERTY_IPV4_CONFIGURATION "IPv4.Configuration"76#define CONNMAN_PROPERTY_IPV4_CONFIGURATION "IPv4.Configuration"
77#define CONNMAN_PROPERTY_IPV6 "IPv6"
78#define CONNMAN_PROPERTY_IPV6_CONFIGURATION "IPv6.Configuration"
77#define CONNMAN_PROPERTY_TECHNOLOGIES "Technologies"79#define CONNMAN_PROPERTY_TECHNOLOGIES "Technologies"
78#define CONNMAN_PROPERTY_OFFLINE_MODE "OfflineMode"80#define CONNMAN_PROPERTY_OFFLINE_MODE "OfflineMode"
7981
8082
=== modified file 'src/libconnman/generate_vapi'
--- src/libconnman/generate_vapi 2011-02-02 13:50:19 +0000
+++ src/libconnman/generate_vapi 2011-03-18 12:46:25 +0000
@@ -18,6 +18,7 @@
18 connman.h connman-manager.c connman-manager.h \18 connman.h connman-manager.c connman-manager.h \
19 connman-service.c connman-service.h \19 connman-service.c connman-service.h \
20 connman-ipv4.c connman-ipv4.h \20 connman-ipv4.c connman-ipv4.h \
21 connman-ipv6.c connman-ipv6.h \
21 libconnman.la22 libconnman.la
2223
23vapigen \24vapigen \
2425
=== modified file 'src/settings/frontend/widgets/dialogs/edit-connection.vala'
--- src/settings/frontend/widgets/dialogs/edit-connection.vala 2011-03-17 13:28:03 +0000
+++ src/settings/frontend/widgets/dialogs/edit-connection.vala 2011-03-18 12:46:25 +0000
@@ -55,6 +55,15 @@
55 private Gtk.TreeIter ipv4_manual_iter;55 private Gtk.TreeIter ipv4_manual_iter;
56 private Gtk.TreeIter ipv4_dhcp_iter;56 private Gtk.TreeIter ipv4_dhcp_iter;
5757
58 /* ipv6 */
59 private Gtk.ComboBox combobox_ipv6_method;
60 private Gtk.Entry entry_ipv6_address;
61 private Gtk.Entry entry_ipv6_prefix_length;
62 private Gtk.Entry entry_ipv6_gateway;
63 private Gtk.TreeIter ipv6_off_iter;
64 private Gtk.TreeIter ipv6_manual_iter;
65 private Gtk.TreeIter ipv6_auto_iter;
66
58 private Gtk.Entry entry_nameservers;67 private Gtk.Entry entry_nameservers;
59 private Gtk.Entry entry_domains;68 private Gtk.Entry entry_domains;
6069
@@ -153,6 +162,7 @@
153 });162 });
154 }163 }
155164
165 /* ipv4 combobox */
156 var store = new Gtk.ListStore(2, typeof(int), typeof(string));166 var store = new Gtk.ListStore(2, typeof(int), typeof(string));
157 Gtk.TreeIter iter;167 Gtk.TreeIter iter;
158168
@@ -173,6 +183,27 @@
173 store.append(out iter);183 store.append(out iter);
174 store.set(iter, 0, Connman.IPv4Method.DHCP, 1, "DHCP");184 store.set(iter, 0, Connman.IPv4Method.DHCP, 1, "DHCP");
175 this.ipv4_dhcp_iter = iter;185 this.ipv4_dhcp_iter = iter;
186
187 /* ipv6 combobox */
188 store = new Gtk.ListStore(2, typeof(int), typeof(string));
189
190 this.combobox_ipv6_method.model = store;
191
192 cell = new Gtk.CellRendererText();
193 this.combobox_ipv6_method.pack_start(cell, false);
194 this.combobox_ipv6_method.set_attributes(cell, "text", 1);
195
196 store.append(out iter);
197 store.set(iter, 0, Connman.IPv6Method.OFF, 1, "Off");
198 this.ipv6_off_iter = iter;
199
200 store.append(out iter);
201 store.set(iter, 0, Connman.IPv6Method.MANUAL, 1, "Manual");
202 this.ipv6_manual_iter = iter;
203
204 store.append(out iter);
205 store.set(iter, 0, Connman.IPv6Method.AUTO, 1, "Auto");
206 this.ipv6_auto_iter = iter;
176 }207 }
177208
178 private void get_widgets() {209 private void get_widgets() {
@@ -203,6 +234,16 @@
203 this.entry_ipv4_gateway = b.get_object("entry_ipv4_gateway")234 this.entry_ipv4_gateway = b.get_object("entry_ipv4_gateway")
204 as Gtk.Entry;235 as Gtk.Entry;
205236
237 /* ipv6 */
238 this.combobox_ipv6_method = b.get_object("combobox_ipv6_method")
239 as Gtk.ComboBox;
240 this.entry_ipv6_address = b.get_object("entry_ipv6_address")
241 as Gtk.Entry;
242 this.entry_ipv6_prefix_length = b.get_object("entry_ipv6_prefix_length")
243 as Gtk.Entry;
244 this.entry_ipv6_gateway = b.get_object("entry_ipv6_gateway")
245 as Gtk.Entry;
246
206 /* dns */247 /* dns */
207 this.entry_nameservers = b.get_object("entry_nameservers") as Gtk.Entry;248 this.entry_nameservers = b.get_object("entry_nameservers") as Gtk.Entry;
208 this.entry_domains = b.get_object("entry_domains") as Gtk.Entry;249 this.entry_domains = b.get_object("entry_domains") as Gtk.Entry;
@@ -214,6 +255,7 @@
214 this.button_save.clicked.connect(this.on_button_save_clicked);255 this.button_save.clicked.connect(this.on_button_save_clicked);
215 this.button_cancel.clicked.connect(this.on_button_cancel_clicked);256 this.button_cancel.clicked.connect(this.on_button_cancel_clicked);
216 this.combobox_ipv4_method.changed.connect(ipv4_method_changed);257 this.combobox_ipv4_method.changed.connect(ipv4_method_changed);
258 this.combobox_ipv6_method.changed.connect(ipv6_method_changed);
217 }259 }
218260
219 private void ipv4_method_changed(Gtk.ComboBox box) {261 private void ipv4_method_changed(Gtk.ComboBox box) {
@@ -243,6 +285,33 @@
243 }285 }
244 }286 }
245287
288 private void ipv6_method_changed(Gtk.ComboBox box) {
289 Gtk.TreeIter iter;
290 Gtk.ListStore store;
291 Connman.IPv6Method method;
292
293 if (this.combobox_ipv6_method.get_active_iter(out iter) == false)
294 return;
295
296 store = this.combobox_ipv6_method.model as Gtk.ListStore;
297 store.get(iter, 0, out method);
298
299 switch (method) {
300 case Connman.IPv6Method.MANUAL:
301 this.entry_ipv6_address.sensitive = true;
302 this.entry_ipv6_prefix_length.sensitive = true;
303 this.entry_ipv6_gateway.sensitive = true;
304 break;
305 case Connman.IPv6Method.OFF:
306 case Connman.IPv6Method.AUTO:
307 default:
308 this.entry_ipv6_address.sensitive = false;
309 this.entry_ipv6_prefix_length.sensitive = false;
310 this.entry_ipv6_gateway.sensitive = false;
311 break;
312 }
313 }
314
246 private void update_mode() {315 private void update_mode() {
247 string mode = "";316 string mode = "";
248317
@@ -345,6 +414,51 @@
345 }414 }
346 }415 }
347416
417 private void update_ipv6() {
418 var ipv6 = this.connection.get_ipv6_configuration();
419 Gtk.TreeIter iter;
420
421 switch (ipv6.method) {
422 case Connman.IPv6Method.OFF:
423 iter = this.ipv6_off_iter;
424 break;
425 case Connman.IPv6Method.MANUAL:
426 iter = this.ipv6_manual_iter;
427 this.entry_ipv6_address.text = ipv6.address;
428 this.entry_ipv6_prefix_length.text = ipv6.prefix_length.to_string();
429 this.entry_ipv6_gateway.text = ipv6.gateway;
430 break;
431 case Connman.IPv6Method.AUTO:
432 default:
433 iter = this.ipv6_auto_iter;
434 break;
435 }
436
437 this.combobox_ipv6_method.set_active_iter(iter);
438 }
439
440 private void save_ipv6() {
441 Gtk.TreeIter iter;
442 Connman.IPv6Method method;
443 Connman.IPv6 ipv6;
444
445 var store = this.combobox_ipv6_method.model as Gtk.ListStore;
446
447 this.combobox_ipv6_method.get_active_iter(out iter);
448 store.get(iter, 0, out method);
449
450 var address = this.entry_ipv6_address.text;
451 uint8 prefix_length = (uint8) uint64.parse(this.entry_ipv6_prefix_length.text);
452 var gateway = this.entry_ipv6_gateway.text;
453
454 try {
455 ipv6 = new Connman.IPv6(method, address, prefix_length, gateway);
456 this.connection.set_ipv6_configuration(ipv6);
457 } catch (GLib.Error e) {
458 stderr.printf("Failed to create ipv6 object: %s", e.message);
459 }
460 }
461
348 private void update_nameservers() {462 private void update_nameservers() {
349 string s = string.joinv(" ", this.connection.get_nameservers_configuration());463 string s = string.joinv(" ", this.connection.get_nameservers_configuration());
350 this.entry_nameservers.set_text(s);464 this.entry_nameservers.set_text(s);
@@ -386,6 +500,7 @@
386 update_security();500 update_security();
387 update_passphrase();501 update_passphrase();
388 update_ipv4();502 update_ipv4();
503 update_ipv6();
389 update_nameservers();504 update_nameservers();
390 update_domains();505 update_domains();
391 break;506 break;
@@ -393,6 +508,7 @@
393 update_name();508 update_name();
394 update_autoconnect();509 update_autoconnect();
395 update_ipv4();510 update_ipv4();
511 update_ipv6();
396 update_nameservers();512 update_nameservers();
397 update_domains();513 update_domains();
398 break;514 break;
@@ -400,6 +516,7 @@
400 update_name();516 update_name();
401 update_autoconnect();517 update_autoconnect();
402 update_ipv4();518 update_ipv4();
519 update_ipv6();
403 update_nameservers();520 update_nameservers();
404 update_domains();521 update_domains();
405 break;522 break;
@@ -412,18 +529,21 @@
412 save_autoconnect();529 save_autoconnect();
413 save_passphrase();530 save_passphrase();
414 save_ipv4();531 save_ipv4();
532 save_ipv6();
415 save_nameservers();533 save_nameservers();
416 save_domains();534 save_domains();
417 break;535 break;
418 case Connman.ServiceType.ETHERNET:536 case Connman.ServiceType.ETHERNET:
419 save_autoconnect();537 save_autoconnect();
420 save_ipv4();538 save_ipv4();
539 save_ipv6();
421 save_nameservers();540 save_nameservers();
422 save_domains();541 save_domains();
423 break;542 break;
424 case Connman.ServiceType.BLUETOOTH:543 case Connman.ServiceType.BLUETOOTH:
425 save_autoconnect();544 save_autoconnect();
426 save_ipv4();545 save_ipv4();
546 save_ipv6();
427 save_nameservers();547 save_nameservers();
428 save_domains();548 save_domains();
429 break;549 break;

Subscribers

People subscribed via source and target branches