~ubuntu-branches/ubuntu/utopic/urfkill/utopic

« back to all changes in this revision

Viewing changes to src/urf-device-ofono.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2014-07-09 14:53:13 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140709145313-zuv5yok9yvu1zd1w
Tags: 0.6.0~20140708.110711.a0581f3-0ubuntu1
* New release snapshot:
  + always write out persistence state changes to disk.
  + arbitrator: save wanted state to persistence, and not the current device
    state on shutdown.
  + Fixes to signals from devices on state changes.
  + Saved desired state when adaptor is not present
  + Allow logging to stdout for debug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        PROP_LAST
51
51
};
52
52
 
53
 
enum {
54
 
        SIGNAL_CHANGED,
55
 
        LAST_SIGNAL
56
 
};
57
 
 
58
 
static int signals[LAST_SIGNAL] = { 0 };
59
 
 
60
53
#define URF_DEVICE_OFONO_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), \
61
54
                                           URF_TYPE_DEVICE_OFONO, UrfDeviceOfonoPrivate))
62
55
 
269
262
                                              g_strdup (prop_name),
270
263
                                              g_variant_ref (prop_value));
271
264
 
 
265
                if (g_strcmp0 ("Online", prop_name) == 0) {
 
266
                        g_signal_emit_by_name(G_OBJECT (modem), "state-changed", 0);
 
267
                }
 
268
 
272
269
                if (g_strcmp0 ("Powered", prop_name) == 0) {
273
270
                        gboolean powered = FALSE;
274
271
 
317
314
 
318
315
                g_variant_unref (properties);
319
316
                g_variant_unref (result);
 
317
 
 
318
                g_signal_emit_by_name(G_OBJECT (modem), "state-changed", 0);
320
319
        } else {
321
320
                g_warning ("Error getting properties: %s",
322
321
                           error ? error->message : "(unknown error)");
449
448
        parent_class->is_software_blocked = get_soft;
450
449
        parent_class->set_software_blocked = set_soft;
451
450
 
452
 
        signals[SIGNAL_CHANGED] =
453
 
                g_signal_new ("changed",
454
 
                              G_OBJECT_CLASS_TYPE (class),
455
 
                              G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
456
 
                              0, NULL, NULL,
457
 
                              g_cclosure_marshal_VOID__VOID,
458
 
                              G_TYPE_NONE, 0, G_TYPE_NONE);
459
 
 
460
451
        pspec = g_param_spec_boolean ("soft",
461
452
                                      "Soft Block",
462
453
                                      "The soft block of the device",