OLD | NEW |
1 /* | 1 /* |
2 * | 2 * |
3 * Connection Manager | 3 * Connection Manager |
4 * | 4 * |
5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. |
6 * | 6 * |
7 * This program is free software; you can redistribute it and/or modify | 7 * This program is free software; you can redistribute it and/or modify |
8 * it under the terms of the GNU General Public License version 2 as | 8 * it under the terms of the GNU General Public License version 2 as |
9 * published by the Free Software Foundation. | 9 * published by the Free Software Foundation. |
10 * | 10 * |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 technology_connected(type); | 216 technology_connected(type); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 void __connman_notifier_offlinemode(connman_bool_t enabled) | 220 void __connman_notifier_offlinemode(connman_bool_t enabled) |
221 { | 221 { |
222 GSList *list; | 222 GSList *list; |
223 | 223 |
224 _DBG_NOTIFIER("enabled %d", enabled); | 224 _DBG_NOTIFIER("enabled %d", enabled); |
225 | 225 |
226 __connman_profile_changed(FALSE); | |
227 | |
228 connman_dbus_send_property_changed_variant(CONNMAN_MANAGER_PATH, | 226 connman_dbus_send_property_changed_variant(CONNMAN_MANAGER_PATH, |
229 CONNMAN_MANAGER_INTERFACE, "OfflineMode", | 227 CONNMAN_MANAGER_INTERFACE, "OfflineMode", |
230 DBUS_TYPE_BOOLEAN, &enabled); | 228 DBUS_TYPE_BOOLEAN, &enabled); |
231 | 229 |
232 for (list = notifier_list; list; list = list->next) { | 230 for (list = notifier_list; list; list = list->next) { |
233 struct connman_notifier *notifier = list->data; | 231 struct connman_notifier *notifier = list->data; |
234 | 232 |
235 if (notifier->offline_mode) | 233 if (notifier->offline_mode) |
236 notifier->offline_mode(enabled); | 234 notifier->offline_mode(enabled); |
237 } | 235 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 _DBG_NOTIFIER(""); | 296 _DBG_NOTIFIER(""); |
299 | 297 |
300 for (list = notifier_list; list; list = list->next) { | 298 for (list = notifier_list; list; list = list->next) { |
301 struct connman_notifier *notifier = list->data; | 299 struct connman_notifier *notifier = list->data; |
302 | 300 |
303 if (notifier->system_resume != NULL) | 301 if (notifier->system_resume != NULL) |
304 notifier->system_resume(); | 302 notifier->system_resume(); |
305 } | 303 } |
306 } | 304 } |
307 | 305 |
| 306 void __connman_notifier_profile_push(struct connman_profile *profile) |
| 307 { |
| 308 GSList *list; |
| 309 |
| 310 _DBG_NOTIFIER("profile %p", profile); |
| 311 |
| 312 for (list = notifier_list; list; list = list->next) { |
| 313 struct connman_notifier *notifier = list->data; |
| 314 |
| 315 if (notifier->profile_push != NULL) |
| 316 notifier->profile_push(profile); |
| 317 } |
| 318 } |
| 319 |
| 320 void __connman_notifier_profile_pop(struct connman_profile *profile) |
| 321 { |
| 322 GSList *list; |
| 323 |
| 324 _DBG_NOTIFIER("profile %p", profile); |
| 325 |
| 326 for (list = notifier_list; list; list = list->next) { |
| 327 struct connman_notifier *notifier = list->data; |
| 328 |
| 329 if (notifier->profile_pop != NULL) |
| 330 notifier->profile_pop(profile); |
| 331 } |
| 332 } |
| 333 |
308 int __connman_notifier_init(void) | 334 int __connman_notifier_init(void) |
309 { | 335 { |
310 connection = connman_dbus_get_connection(); | 336 connection = connman_dbus_get_connection(); |
311 return 0; | 337 return 0; |
312 } | 338 } |
313 | 339 |
314 void __connman_notifier_cleanup(void) | 340 void __connman_notifier_cleanup(void) |
315 { | 341 { |
316 dbus_connection_unref(connection); | 342 dbus_connection_unref(connection); |
317 } | 343 } |
OLD | NEW |