~webapps/libunity-webapps/13.04

« back to all changes in this revision

Viewing changes to src/unity-webapps-service-proxy.c

  • Committer: Robert Carr
  • Date: 2011-12-05 23:24:29 UTC
  • Revision ID: racarr@canonical.com-20111205232429-0xdggjeijnpvy14p
Add a test

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
GDBusNodeInfo *service_introspection_data = NULL;
28
28
GDBusNodeInfo *context_introspection_data = NULL;
29
29
 
 
30
UnityWebappsContextProxy *
 
31
unity_webapps_service_get_context (UnityWebappsServiceProxy *service,
 
32
                                   const gchar *name,
 
33
                                   const gchar *domain)
 
34
{
 
35
  UnityWebappsContextProxy *context;
 
36
  GVariant *method_ret;
 
37
  const gchar *dbus_name;
 
38
  
 
39
  method_ret = g_dbus_proxy_call_sync (service->gproxy,
 
40
                                       "GetContext",
 
41
                                       g_variant_new("(ss)",
 
42
                                                     name,
 
43
                                                     domain),
 
44
                                       G_DBUS_CALL_FLAGS_NONE,
 
45
                                       -1,
 
46
                                       NULL /* Cancellable */,
 
47
                                       NULL /* Error */);
 
48
  
 
49
  dbus_name = g_variant_get_string (g_variant_get_child_value (method_ret, 0), NULL);
 
50
  
 
51
  context = unity_webapps_context_proxy_new (service->session_bus, dbus_name);
 
52
  
 
53
 
 
54
  g_variant_unref (method_ret);
 
55
 
 
56
  return context;
 
57
}
 
58
 
30
59
UnityWebappsServiceProxy *
31
60
unity_webapps_service_proxy_new ()
32
61
{
71
100
  g_free (proxy);
72
101
}
73
102
 
 
103