~kvalo/connman/bug-734339

« back to all changes in this revision

Viewing changes to src/notifier.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel, Alexander Sack, Mathieu Trudel
  • Date: 2009-10-14 23:59:04 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20091014235904-xbulmde9bfcx0wuk
Tags: 0.42+dfsg-0ubuntu1
* new upstream release 0.42 with FFe (LP: #444172)

[ Alexander Sack <asac@ubuntu.com> ]
* LP: #402998 - homepage used in package is outdated; updated to
  http://www.connman.net
  - update debian/control
* LP: #402999 - add Vcs-Browser to debian/control and change Vcs-Bzr
  to read/write location
  - update debian/control
* LP: #400576 - Please use compatible mode to provide NetworkManager
  dbus interface; ship a /etc/default/connman which enables NM
  compatibility mode; also include example how to enable debugging
  - add debian/connman.default
* explicitly install init script
  - debian/connnman.install
* set --only-scripts parameter for dh_installinit (cdbs)
  - update debian/rules

[ Mathieu Trudel <mathieu.tl@gmail.com> ]
* bump Standards-Version to 3.8.3
  - update debian/control 
* add GIT_BRANCH, GIT_BRANCH_NAME, DEB_MAJOR_VERSION to support daily builds
  - update debian/rules
* Add update-local-branch code to work with local git copies
  - update debian/rules 
* Revise get-orig-source code, add get-current-source and GET_SOURCE snippets
  - update debian/rules
* Handle dfsg special case, add MAKE_DFSG_COMPLIANT snippet
  - update debian/rules
* Add pre-build, clean targets
  - update debian/rules 
* Patch init script to add LSB headers (Closes: #543869)
  - add debian/patches/01-init-script-lsb-headers.patch
  - update debian/patches/series

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
        g_dbus_send_message(connection, signal);
177
177
}
178
178
 
179
 
static void technology_enabled(enum connman_device_type type,
 
179
static void technology_enabled(enum connman_service_type type,
180
180
                                                connman_bool_t enabled)
181
181
{
182
182
        GSList *list;
212
212
        for (list = notifier_list; list; list = list->next) {
213
213
                struct connman_notifier *notifier = list->data;
214
214
 
215
 
                if (notifier->device_enabled)
216
 
                        notifier->device_enabled(type, enabled);
 
215
                if (notifier->service_enabled)
 
216
                        notifier->service_enabled(type, enabled);
217
217
        }
218
218
}
219
219
 
363
363
                technology_connected(type, FALSE);
364
364
}
365
365
 
366
 
static void offline_mode_changed(dbus_bool_t enabled)
 
366
static void offlinemode_changed(dbus_bool_t enabled)
367
367
{
368
368
        DBusMessage *signal;
369
369
        DBusMessageIter entry, value;
388
388
        g_dbus_send_message(connection, signal);
389
389
}
390
390
 
391
 
void __connman_notifier_offline_mode(connman_bool_t enabled)
 
391
void __connman_notifier_offlinemode(connman_bool_t enabled)
392
392
{
393
393
        GSList *list;
394
394
 
396
396
 
397
397
        __connman_profile_changed(FALSE);
398
398
 
399
 
        offline_mode_changed(enabled);
 
399
        offlinemode_changed(enabled);
400
400
 
401
401
        for (list = notifier_list; list; list = list->next) {
402
402
                struct connman_notifier *notifier = list->data;
406
406
        }
407
407
}
408
408
 
 
409
connman_bool_t __connman_notifier_is_enabled(enum connman_service_type type)
 
410
{
 
411
        DBG("type %d", type);
 
412
 
 
413
        switch (type) {
 
414
        case CONNMAN_SERVICE_TYPE_UNKNOWN:
 
415
                return FALSE;
 
416
        case CONNMAN_SERVICE_TYPE_ETHERNET:
 
417
        case CONNMAN_SERVICE_TYPE_WIFI:
 
418
        case CONNMAN_SERVICE_TYPE_WIMAX:
 
419
        case CONNMAN_SERVICE_TYPE_BLUETOOTH:
 
420
        case CONNMAN_SERVICE_TYPE_CELLULAR:
 
421
                break;
 
422
        }
 
423
 
 
424
        if (g_atomic_int_get(&enabled[type]) > 0)
 
425
                return TRUE;
 
426
 
 
427
        return FALSE;
 
428
}
 
429
 
409
430
int __connman_notifier_init(void)
410
431
{
411
432
        DBG("");