[gtk/wip/chergert/profiler-gtk4-dbus-api] gtkapplication: track changes to profiler D-Bus API



commit 4a954a9a1cee246d9dd6266a5553332a3533f7cf
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jun 6 17:24:33 2019 -0700

    gtkapplication: track changes to profiler D-Bus API
    
    Recently, to make things more forward-portable, Sysprof and Mutter altered
    the API for org.gnome.Sysprof3.Profiler. This tracks those changes.

 gtk/gtkapplication.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c
index 25ac949081..cf3070e088 100644
--- a/gtk/gtkapplication.c
+++ b/gtk/gtkapplication.c
@@ -614,7 +614,9 @@ gtk_application_finalize (GObject *object)
 static const gchar org_gnome_Sysprof3_Profiler_xml[] =
   "<node>"
     "<interface name='org.gnome.Sysprof3.Profiler'>"
+      "<property name='Capabilities' type='a{sv}' access='read'/>"
       "<method name='Start'>"
+        "<arg type='a{sv}' name='options' direction='in'/>"
         "<arg type='h' name='fd' direction='in'/>"
       "</method>"
       "<method name='Stop'>"
@@ -638,6 +640,7 @@ sysprof_profiler_method_call (GDBusConnection       *connection,
     {
       GDBusMessage *message;
       GUnixFDList *fd_list;
+      GVariant *options;
       int fd = -1;
       int idx;
 
@@ -650,7 +653,7 @@ sysprof_profiler_method_call (GDBusConnection       *connection,
           return;
         }
 
-      g_variant_get (parameters, "(h)", &idx);
+      g_variant_get (parameters, "(@a{sv}h)", &options, &idx);
 
       message = g_dbus_method_invocation_get_message (invocation);
       fd_list = g_dbus_message_get_unix_fd_list (message);
@@ -658,6 +661,8 @@ sysprof_profiler_method_call (GDBusConnection       *connection,
         fd = g_unix_fd_list_get (fd_list, idx, NULL);
 
       gdk_profiler_start (fd);
+
+      g_variant_unref (options);
     }
   else if (strcmp (method_name, "Stop") == 0)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]