Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: src/notifier.c

Issue 6731067: flimflam: revise multi-profile support to pin objects to a profile (Closed) Base URL: ssh://gitrw.chromium.org:9222/flimflam.git@master
Patch Set: fix diff Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/manager.c ('k') | src/profile.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/manager.c ('k') | src/profile.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698