~unity8-desktop-session-team/indicator-session/indicator-session-using-upstart

« back to all changes in this revision

Viewing changes to src/backend-dbus/utils.c

  • Committer: Stephen M. Webb
  • Date: 2014-03-23 21:32:27 UTC
  • Revision ID: stephen.webb@canonical.com-20140323213227-l4ibsge0sd7xfhav
removed tests that assume gnome-session

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
  Login1Seat * login1_seat;
30
30
  DisplayManagerSeat * dm_seat;
31
31
  Accounts * account_manager;
 
32
  Upstart0_6 * upstart;
32
33
 
33
34
  GCancellable * cancellable;
34
35
  int pending;
62
63
                      data->login1_seat,
63
64
                      data->dm_seat,
64
65
                      data->account_manager,
 
66
                      data->upstart,
65
67
                      data->cancellable,
66
68
                      data->user_data);
67
69
 
69
71
      g_clear_object (&data->login1_seat);
70
72
      g_clear_object (&data->dm_seat);
71
73
      g_clear_object (&data->account_manager);
 
74
      g_clear_object (&data->upstart);
72
75
      g_clear_object (&data->cancellable);
73
76
      g_free (data);
74
77
    }
118
121
  on_proxy_ready_impl (gdata, offset, err, proxy);
119
122
}
120
123
 
 
124
static void
 
125
on_upstart_proxy_ready (GObject      * o G_GNUC_UNUSED,
 
126
                        GAsyncResult * res,
 
127
                        gpointer       gdata)
 
128
{
 
129
  gsize offset = G_STRUCT_OFFSET (struct session_proxy_data, upstart);
 
130
  GError * err = NULL;
 
131
  gpointer proxy = upstart0_6_proxy_new_for_bus_finish (res, &err);
 
132
  on_proxy_ready_impl (gdata, offset, err, proxy);
 
133
}
 
134
 
121
135
/* helper utility to get the dbus proxies used by the backend-dbus classes */
122
136
void
123
137
indicator_session_util_get_session_proxies (
179
193
                               data->cancellable,
180
194
                               on_display_manager_seat_proxy_ready, data);
181
195
    }
 
196
 
 
197
  /* Session Manager */
 
198
  data->pending++;
 
199
  upstart0_6_proxy_new_for_bus (G_BUS_TYPE_SESSION,
 
200
                                G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES,
 
201
                                "com.ubuntu.Upstart",
 
202
                                "/com/ubuntu/Upstart",
 
203
                                data->cancellable,
 
204
                                on_upstart_proxy_ready, data);
182
205
}