Back to index

bamf  0.2.120
bamf-gdbus-generated.c
Go to the documentation of this file.
00001 /*
00002  * Generated by gdbus-codegen 2.32.3. DO NOT EDIT.
00003  *
00004  * The license of this code is the same as for the source it was derived from.
00005  */
00006 
00007 #ifdef HAVE_CONFIG_H
00008 #  include "config.h"
00009 #endif
00010 
00011 #include "bamf-gdbus-generated.h"
00012 
00013 #ifdef G_OS_UNIX
00014 #  include <gio/gunixfdlist.h>
00015 #endif
00016 
00017 typedef struct
00018 {
00019   GDBusArgInfo parent_struct;
00020   gboolean use_gvariant;
00021 } _ExtendedGDBusArgInfo;
00022 
00023 typedef struct
00024 {
00025   GDBusMethodInfo parent_struct;
00026   const gchar *signal_name;
00027   gboolean pass_fdlist;
00028 } _ExtendedGDBusMethodInfo;
00029 
00030 typedef struct
00031 {
00032   GDBusSignalInfo parent_struct;
00033   const gchar *signal_name;
00034 } _ExtendedGDBusSignalInfo;
00035 
00036 typedef struct
00037 {
00038   GDBusPropertyInfo parent_struct;
00039   const gchar *hyphen_name;
00040   gboolean use_gvariant;
00041 } _ExtendedGDBusPropertyInfo;
00042 
00043 typedef struct
00044 {
00045   GDBusInterfaceInfo parent_struct;
00046   const gchar *hyphen_name;
00047 } _ExtendedGDBusInterfaceInfo;
00048 
00049 typedef struct
00050 {
00051   const _ExtendedGDBusPropertyInfo *info;
00052   guint prop_id;
00053   GValue orig_value; /* the value before the change */
00054 } ChangedProperty;
00055 
00056 static void
00057 _changed_property_free (ChangedProperty *data)
00058 {
00059   g_value_unset (&data->orig_value);
00060   g_free (data);
00061 }
00062 
00063 static gboolean
00064 _g_strv_equal0 (gchar **a, gchar **b)
00065 {
00066   gboolean ret = FALSE;
00067   guint n;
00068   if (a == NULL && b == NULL)
00069     {
00070       ret = TRUE;
00071       goto out;
00072     }
00073   if (a == NULL || b == NULL)
00074     goto out;
00075   if (g_strv_length (a) != g_strv_length (b))
00076     goto out;
00077   for (n = 0; a[n] != NULL; n++)
00078     if (g_strcmp0 (a[n], b[n]) != 0)
00079       goto out;
00080   ret = TRUE;
00081 out:
00082   return ret;
00083 }
00084 
00085 static gboolean
00086 _g_variant_equal0 (GVariant *a, GVariant *b)
00087 {
00088   gboolean ret = FALSE;
00089   if (a == NULL && b == NULL)
00090     {
00091       ret = TRUE;
00092       goto out;
00093     }
00094   if (a == NULL || b == NULL)
00095     goto out;
00096   ret = g_variant_equal (a, b);
00097 out:
00098   return ret;
00099 }
00100 
00101 G_GNUC_UNUSED static gboolean
00102 _g_value_equal (const GValue *a, const GValue *b)
00103 {
00104   gboolean ret = FALSE;
00105   g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
00106   switch (G_VALUE_TYPE (a))
00107     {
00108       case G_TYPE_BOOLEAN:
00109         ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
00110         break;
00111       case G_TYPE_UCHAR:
00112         ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
00113         break;
00114       case G_TYPE_INT:
00115         ret = (g_value_get_int (a) == g_value_get_int (b));
00116         break;
00117       case G_TYPE_UINT:
00118         ret = (g_value_get_uint (a) == g_value_get_uint (b));
00119         break;
00120       case G_TYPE_INT64:
00121         ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
00122         break;
00123       case G_TYPE_UINT64:
00124         ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
00125         break;
00126       case G_TYPE_DOUBLE:
00127         ret = (g_value_get_double (a) == g_value_get_double (b));
00128         break;
00129       case G_TYPE_STRING:
00130         ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
00131         break;
00132       case G_TYPE_VARIANT:
00133         ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
00134         break;
00135       default:
00136         if (G_VALUE_TYPE (a) == G_TYPE_STRV)
00137           ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
00138         else
00139           g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
00140         break;
00141     }
00142   return ret;
00143 }
00144 
00145 /* ------------------------------------------------------------------------
00146  * Code for interface org.ayatana.bamf.control
00147  * ------------------------------------------------------------------------
00148  */
00149 
00158 /* ---- Introspection data for org.ayatana.bamf.control ---- */
00159 
00160 static const _ExtendedGDBusMethodInfo _bamf_dbus_control_method_info_quit =
00161 {
00162   {
00163     -1,
00164     "Quit",
00165     NULL,
00166     NULL,
00167     NULL
00168   },
00169   "handle-quit",
00170   FALSE
00171 };
00172 
00173 static const _ExtendedGDBusArgInfo _bamf_dbus_control_method_info_set_approver_behavior_IN_ARG_behavior =
00174 {
00175   {
00176     -1,
00177     "behavior",
00178     "i",
00179     NULL
00180   },
00181   FALSE
00182 };
00183 
00184 static const _ExtendedGDBusArgInfo * const _bamf_dbus_control_method_info_set_approver_behavior_IN_ARG_pointers[] =
00185 {
00186   &_bamf_dbus_control_method_info_set_approver_behavior_IN_ARG_behavior,
00187   NULL
00188 };
00189 
00190 static const _ExtendedGDBusMethodInfo _bamf_dbus_control_method_info_set_approver_behavior =
00191 {
00192   {
00193     -1,
00194     "SetApproverBehavior",
00195     (GDBusArgInfo **) &_bamf_dbus_control_method_info_set_approver_behavior_IN_ARG_pointers,
00196     NULL,
00197     NULL
00198   },
00199   "handle-set-approver-behavior",
00200   FALSE
00201 };
00202 
00203 static const _ExtendedGDBusArgInfo _bamf_dbus_control_method_info_om_nom_nom_desktop_file_IN_ARG_tab_path =
00204 {
00205   {
00206     -1,
00207     "tab_path",
00208     "s",
00209     NULL
00210   },
00211   FALSE
00212 };
00213 
00214 static const _ExtendedGDBusArgInfo * const _bamf_dbus_control_method_info_om_nom_nom_desktop_file_IN_ARG_pointers[] =
00215 {
00216   &_bamf_dbus_control_method_info_om_nom_nom_desktop_file_IN_ARG_tab_path,
00217   NULL
00218 };
00219 
00220 static const _ExtendedGDBusMethodInfo _bamf_dbus_control_method_info_om_nom_nom_desktop_file =
00221 {
00222   {
00223     -1,
00224     "OmNomNomDesktopFile",
00225     (GDBusArgInfo **) &_bamf_dbus_control_method_info_om_nom_nom_desktop_file_IN_ARG_pointers,
00226     NULL,
00227     NULL
00228   },
00229   "handle-om-nom-nom-desktop-file",
00230   FALSE
00231 };
00232 
00233 static const _ExtendedGDBusArgInfo _bamf_dbus_control_method_info_register_tab_provider_IN_ARG_tab_path =
00234 {
00235   {
00236     -1,
00237     "tab_path",
00238     "s",
00239     NULL
00240   },
00241   FALSE
00242 };
00243 
00244 static const _ExtendedGDBusArgInfo * const _bamf_dbus_control_method_info_register_tab_provider_IN_ARG_pointers[] =
00245 {
00246   &_bamf_dbus_control_method_info_register_tab_provider_IN_ARG_tab_path,
00247   NULL
00248 };
00249 
00250 static const _ExtendedGDBusMethodInfo _bamf_dbus_control_method_info_register_tab_provider =
00251 {
00252   {
00253     -1,
00254     "RegisterTabProvider",
00255     (GDBusArgInfo **) &_bamf_dbus_control_method_info_register_tab_provider_IN_ARG_pointers,
00256     NULL,
00257     NULL
00258   },
00259   "handle-register-tab-provider",
00260   FALSE
00261 };
00262 
00263 static const _ExtendedGDBusArgInfo _bamf_dbus_control_method_info_register_application_for_pid_IN_ARG_application =
00264 {
00265   {
00266     -1,
00267     "application",
00268     "s",
00269     NULL
00270   },
00271   FALSE
00272 };
00273 
00274 static const _ExtendedGDBusArgInfo _bamf_dbus_control_method_info_register_application_for_pid_IN_ARG_pid =
00275 {
00276   {
00277     -1,
00278     "pid",
00279     "i",
00280     NULL
00281   },
00282   FALSE
00283 };
00284 
00285 static const _ExtendedGDBusArgInfo * const _bamf_dbus_control_method_info_register_application_for_pid_IN_ARG_pointers[] =
00286 {
00287   &_bamf_dbus_control_method_info_register_application_for_pid_IN_ARG_application,
00288   &_bamf_dbus_control_method_info_register_application_for_pid_IN_ARG_pid,
00289   NULL
00290 };
00291 
00292 static const _ExtendedGDBusMethodInfo _bamf_dbus_control_method_info_register_application_for_pid =
00293 {
00294   {
00295     -1,
00296     "RegisterApplicationForPid",
00297     (GDBusArgInfo **) &_bamf_dbus_control_method_info_register_application_for_pid_IN_ARG_pointers,
00298     NULL,
00299     NULL
00300   },
00301   "handle-register-application-for-pid",
00302   FALSE
00303 };
00304 
00305 static const _ExtendedGDBusMethodInfo * const _bamf_dbus_control_method_info_pointers[] =
00306 {
00307   &_bamf_dbus_control_method_info_quit,
00308   &_bamf_dbus_control_method_info_set_approver_behavior,
00309   &_bamf_dbus_control_method_info_om_nom_nom_desktop_file,
00310   &_bamf_dbus_control_method_info_register_tab_provider,
00311   &_bamf_dbus_control_method_info_register_application_for_pid,
00312   NULL
00313 };
00314 
00315 static const _ExtendedGDBusInterfaceInfo _bamf_dbus_control_interface_info =
00316 {
00317   {
00318     -1,
00319     "org.ayatana.bamf.control",
00320     (GDBusMethodInfo **) &_bamf_dbus_control_method_info_pointers,
00321     NULL,
00322     NULL,
00323     NULL
00324   },
00325   "control",
00326 };
00327 
00328 
00336 GDBusInterfaceInfo *
00337 bamf_dbus_control_interface_info (void)
00338 {
00339   return (GDBusInterfaceInfo *) &_bamf_dbus_control_interface_info;
00340 }
00341 
00352 guint
00353 bamf_dbus_control_override_properties (GObjectClass *klass, guint property_id_begin)
00354 {
00355   return property_id_begin - 1;
00356 }
00357 
00358 
00359 
00378 static void
00379 bamf_dbus_control_default_init (BamfDBusControlIface *iface)
00380 {
00381   /* GObject signals for incoming D-Bus method calls: */
00393   g_signal_new ("handle-quit",
00394     G_TYPE_FROM_INTERFACE (iface),
00395     G_SIGNAL_RUN_LAST,
00396     G_STRUCT_OFFSET (BamfDBusControlIface, handle_quit),
00397     g_signal_accumulator_true_handled,
00398     NULL,
00399     g_cclosure_marshal_generic,
00400     G_TYPE_BOOLEAN,
00401     1,
00402     G_TYPE_DBUS_METHOD_INVOCATION);
00403 
00416   g_signal_new ("handle-set-approver-behavior",
00417     G_TYPE_FROM_INTERFACE (iface),
00418     G_SIGNAL_RUN_LAST,
00419     G_STRUCT_OFFSET (BamfDBusControlIface, handle_set_approver_behavior),
00420     g_signal_accumulator_true_handled,
00421     NULL,
00422     g_cclosure_marshal_generic,
00423     G_TYPE_BOOLEAN,
00424     2,
00425     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
00426 
00439   g_signal_new ("handle-om-nom-nom-desktop-file",
00440     G_TYPE_FROM_INTERFACE (iface),
00441     G_SIGNAL_RUN_LAST,
00442     G_STRUCT_OFFSET (BamfDBusControlIface, handle_om_nom_nom_desktop_file),
00443     g_signal_accumulator_true_handled,
00444     NULL,
00445     g_cclosure_marshal_generic,
00446     G_TYPE_BOOLEAN,
00447     2,
00448     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
00449 
00462   g_signal_new ("handle-register-tab-provider",
00463     G_TYPE_FROM_INTERFACE (iface),
00464     G_SIGNAL_RUN_LAST,
00465     G_STRUCT_OFFSET (BamfDBusControlIface, handle_register_tab_provider),
00466     g_signal_accumulator_true_handled,
00467     NULL,
00468     g_cclosure_marshal_generic,
00469     G_TYPE_BOOLEAN,
00470     2,
00471     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
00472 
00486   g_signal_new ("handle-register-application-for-pid",
00487     G_TYPE_FROM_INTERFACE (iface),
00488     G_SIGNAL_RUN_LAST,
00489     G_STRUCT_OFFSET (BamfDBusControlIface, handle_register_application_for_pid),
00490     g_signal_accumulator_true_handled,
00491     NULL,
00492     g_cclosure_marshal_generic,
00493     G_TYPE_BOOLEAN,
00494     3,
00495     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_INT);
00496 
00497 }
00498 
00499 typedef BamfDBusControlIface BamfDBusControlInterface;
00500 G_DEFINE_INTERFACE (BamfDBusControl, bamf_dbus_control, G_TYPE_OBJECT);
00501 
00515 void
00516 bamf_dbus_control_call_quit (
00517     BamfDBusControl *proxy,
00518     GCancellable *cancellable,
00519     GAsyncReadyCallback callback,
00520     gpointer user_data)
00521 {
00522   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
00523     "Quit",
00524     g_variant_new ("()"),
00525     G_DBUS_CALL_FLAGS_NONE,
00526     -1,
00527     cancellable,
00528     callback,
00529     user_data);
00530 }
00531 
00542 gboolean
00543 bamf_dbus_control_call_quit_finish (
00544     BamfDBusControl *proxy,
00545     GAsyncResult *res,
00546     GError **error)
00547 {
00548   GVariant *_ret;
00549   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
00550   if (_ret == NULL)
00551     goto _out;
00552   g_variant_get (_ret,
00553                  "()");
00554   g_variant_unref (_ret);
00555 _out:
00556   return _ret != NULL;
00557 }
00558 
00571 gboolean
00572 bamf_dbus_control_call_quit_sync (
00573     BamfDBusControl *proxy,
00574     GCancellable *cancellable,
00575     GError **error)
00576 {
00577   GVariant *_ret;
00578   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
00579     "Quit",
00580     g_variant_new ("()"),
00581     G_DBUS_CALL_FLAGS_NONE,
00582     -1,
00583     cancellable,
00584     error);
00585   if (_ret == NULL)
00586     goto _out;
00587   g_variant_get (_ret,
00588                  "()");
00589   g_variant_unref (_ret);
00590 _out:
00591   return _ret != NULL;
00592 }
00593 
00608 void
00609 bamf_dbus_control_call_set_approver_behavior (
00610     BamfDBusControl *proxy,
00611     gint arg_behavior,
00612     GCancellable *cancellable,
00613     GAsyncReadyCallback callback,
00614     gpointer user_data)
00615 {
00616   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
00617     "SetApproverBehavior",
00618     g_variant_new ("(i)",
00619                    arg_behavior),
00620     G_DBUS_CALL_FLAGS_NONE,
00621     -1,
00622     cancellable,
00623     callback,
00624     user_data);
00625 }
00626 
00637 gboolean
00638 bamf_dbus_control_call_set_approver_behavior_finish (
00639     BamfDBusControl *proxy,
00640     GAsyncResult *res,
00641     GError **error)
00642 {
00643   GVariant *_ret;
00644   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
00645   if (_ret == NULL)
00646     goto _out;
00647   g_variant_get (_ret,
00648                  "()");
00649   g_variant_unref (_ret);
00650 _out:
00651   return _ret != NULL;
00652 }
00653 
00667 gboolean
00668 bamf_dbus_control_call_set_approver_behavior_sync (
00669     BamfDBusControl *proxy,
00670     gint arg_behavior,
00671     GCancellable *cancellable,
00672     GError **error)
00673 {
00674   GVariant *_ret;
00675   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
00676     "SetApproverBehavior",
00677     g_variant_new ("(i)",
00678                    arg_behavior),
00679     G_DBUS_CALL_FLAGS_NONE,
00680     -1,
00681     cancellable,
00682     error);
00683   if (_ret == NULL)
00684     goto _out;
00685   g_variant_get (_ret,
00686                  "()");
00687   g_variant_unref (_ret);
00688 _out:
00689   return _ret != NULL;
00690 }
00691 
00706 void
00707 bamf_dbus_control_call_om_nom_nom_desktop_file (
00708     BamfDBusControl *proxy,
00709     const gchar *arg_tab_path,
00710     GCancellable *cancellable,
00711     GAsyncReadyCallback callback,
00712     gpointer user_data)
00713 {
00714   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
00715     "OmNomNomDesktopFile",
00716     g_variant_new ("(s)",
00717                    arg_tab_path),
00718     G_DBUS_CALL_FLAGS_NONE,
00719     -1,
00720     cancellable,
00721     callback,
00722     user_data);
00723 }
00724 
00735 gboolean
00736 bamf_dbus_control_call_om_nom_nom_desktop_file_finish (
00737     BamfDBusControl *proxy,
00738     GAsyncResult *res,
00739     GError **error)
00740 {
00741   GVariant *_ret;
00742   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
00743   if (_ret == NULL)
00744     goto _out;
00745   g_variant_get (_ret,
00746                  "()");
00747   g_variant_unref (_ret);
00748 _out:
00749   return _ret != NULL;
00750 }
00751 
00765 gboolean
00766 bamf_dbus_control_call_om_nom_nom_desktop_file_sync (
00767     BamfDBusControl *proxy,
00768     const gchar *arg_tab_path,
00769     GCancellable *cancellable,
00770     GError **error)
00771 {
00772   GVariant *_ret;
00773   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
00774     "OmNomNomDesktopFile",
00775     g_variant_new ("(s)",
00776                    arg_tab_path),
00777     G_DBUS_CALL_FLAGS_NONE,
00778     -1,
00779     cancellable,
00780     error);
00781   if (_ret == NULL)
00782     goto _out;
00783   g_variant_get (_ret,
00784                  "()");
00785   g_variant_unref (_ret);
00786 _out:
00787   return _ret != NULL;
00788 }
00789 
00804 void
00805 bamf_dbus_control_call_register_tab_provider (
00806     BamfDBusControl *proxy,
00807     const gchar *arg_tab_path,
00808     GCancellable *cancellable,
00809     GAsyncReadyCallback callback,
00810     gpointer user_data)
00811 {
00812   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
00813     "RegisterTabProvider",
00814     g_variant_new ("(s)",
00815                    arg_tab_path),
00816     G_DBUS_CALL_FLAGS_NONE,
00817     -1,
00818     cancellable,
00819     callback,
00820     user_data);
00821 }
00822 
00833 gboolean
00834 bamf_dbus_control_call_register_tab_provider_finish (
00835     BamfDBusControl *proxy,
00836     GAsyncResult *res,
00837     GError **error)
00838 {
00839   GVariant *_ret;
00840   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
00841   if (_ret == NULL)
00842     goto _out;
00843   g_variant_get (_ret,
00844                  "()");
00845   g_variant_unref (_ret);
00846 _out:
00847   return _ret != NULL;
00848 }
00849 
00863 gboolean
00864 bamf_dbus_control_call_register_tab_provider_sync (
00865     BamfDBusControl *proxy,
00866     const gchar *arg_tab_path,
00867     GCancellable *cancellable,
00868     GError **error)
00869 {
00870   GVariant *_ret;
00871   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
00872     "RegisterTabProvider",
00873     g_variant_new ("(s)",
00874                    arg_tab_path),
00875     G_DBUS_CALL_FLAGS_NONE,
00876     -1,
00877     cancellable,
00878     error);
00879   if (_ret == NULL)
00880     goto _out;
00881   g_variant_get (_ret,
00882                  "()");
00883   g_variant_unref (_ret);
00884 _out:
00885   return _ret != NULL;
00886 }
00887 
00903 void
00904 bamf_dbus_control_call_register_application_for_pid (
00905     BamfDBusControl *proxy,
00906     const gchar *arg_application,
00907     gint arg_pid,
00908     GCancellable *cancellable,
00909     GAsyncReadyCallback callback,
00910     gpointer user_data)
00911 {
00912   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
00913     "RegisterApplicationForPid",
00914     g_variant_new ("(si)",
00915                    arg_application,
00916                    arg_pid),
00917     G_DBUS_CALL_FLAGS_NONE,
00918     -1,
00919     cancellable,
00920     callback,
00921     user_data);
00922 }
00923 
00934 gboolean
00935 bamf_dbus_control_call_register_application_for_pid_finish (
00936     BamfDBusControl *proxy,
00937     GAsyncResult *res,
00938     GError **error)
00939 {
00940   GVariant *_ret;
00941   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
00942   if (_ret == NULL)
00943     goto _out;
00944   g_variant_get (_ret,
00945                  "()");
00946   g_variant_unref (_ret);
00947 _out:
00948   return _ret != NULL;
00949 }
00950 
00965 gboolean
00966 bamf_dbus_control_call_register_application_for_pid_sync (
00967     BamfDBusControl *proxy,
00968     const gchar *arg_application,
00969     gint arg_pid,
00970     GCancellable *cancellable,
00971     GError **error)
00972 {
00973   GVariant *_ret;
00974   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
00975     "RegisterApplicationForPid",
00976     g_variant_new ("(si)",
00977                    arg_application,
00978                    arg_pid),
00979     G_DBUS_CALL_FLAGS_NONE,
00980     -1,
00981     cancellable,
00982     error);
00983   if (_ret == NULL)
00984     goto _out;
00985   g_variant_get (_ret,
00986                  "()");
00987   g_variant_unref (_ret);
00988 _out:
00989   return _ret != NULL;
00990 }
00991 
01001 void
01002 bamf_dbus_control_complete_quit (
01003     BamfDBusControl *object,
01004     GDBusMethodInvocation *invocation)
01005 {
01006   g_dbus_method_invocation_return_value (invocation,
01007     g_variant_new ("()"));
01008 }
01009 
01019 void
01020 bamf_dbus_control_complete_set_approver_behavior (
01021     BamfDBusControl *object,
01022     GDBusMethodInvocation *invocation)
01023 {
01024   g_dbus_method_invocation_return_value (invocation,
01025     g_variant_new ("()"));
01026 }
01027 
01037 void
01038 bamf_dbus_control_complete_om_nom_nom_desktop_file (
01039     BamfDBusControl *object,
01040     GDBusMethodInvocation *invocation)
01041 {
01042   g_dbus_method_invocation_return_value (invocation,
01043     g_variant_new ("()"));
01044 }
01045 
01055 void
01056 bamf_dbus_control_complete_register_tab_provider (
01057     BamfDBusControl *object,
01058     GDBusMethodInvocation *invocation)
01059 {
01060   g_dbus_method_invocation_return_value (invocation,
01061     g_variant_new ("()"));
01062 }
01063 
01073 void
01074 bamf_dbus_control_complete_register_application_for_pid (
01075     BamfDBusControl *object,
01076     GDBusMethodInvocation *invocation)
01077 {
01078   g_dbus_method_invocation_return_value (invocation,
01079     g_variant_new ("()"));
01080 }
01081 
01082 /* ------------------------------------------------------------------------ */
01083 
01097 struct _BamfDBusControlProxyPrivate
01098 {
01099   GData *qdata;
01100 };
01101 
01102 static void bamf_dbus_control_proxy_iface_init (BamfDBusControlIface *iface);
01103 
01104 G_DEFINE_TYPE_WITH_CODE (BamfDBusControlProxy, bamf_dbus_control_proxy, G_TYPE_DBUS_PROXY,
01105                          G_IMPLEMENT_INTERFACE (BAMF_DBUS_TYPE_CONTROL, bamf_dbus_control_proxy_iface_init));
01106 
01107 static void
01108 bamf_dbus_control_proxy_finalize (GObject *object)
01109 {
01110   BamfDBusControlProxy *proxy = BAMF_DBUS_CONTROL_PROXY (object);
01111   g_datalist_clear (&proxy->priv->qdata);
01112   G_OBJECT_CLASS (bamf_dbus_control_proxy_parent_class)->finalize (object);
01113 }
01114 
01115 static void
01116 bamf_dbus_control_proxy_get_property (GObject      *object,
01117   guint         prop_id,
01118   GValue       *value,
01119   GParamSpec   *pspec)
01120 {
01121 }
01122 
01123 static void
01124 bamf_dbus_control_proxy_set_property (GObject      *object,
01125   guint         prop_id,
01126   const GValue *value,
01127   GParamSpec   *pspec)
01128 {
01129 }
01130 
01131 static void
01132 bamf_dbus_control_proxy_g_signal (GDBusProxy *proxy,
01133   const gchar *sender_name,
01134   const gchar *signal_name,
01135   GVariant *parameters)
01136 {
01137   _ExtendedGDBusSignalInfo *info;
01138   GVariantIter iter;
01139   GVariant *child;
01140   GValue *paramv;
01141   guint num_params;
01142   guint n;
01143   guint signal_id;
01144   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_bamf_dbus_control_interface_info, signal_name);
01145   if (info == NULL)
01146     return;
01147   num_params = g_variant_n_children (parameters);
01148   paramv = g_new0 (GValue, num_params + 1);
01149   g_value_init (&paramv[0], BAMF_DBUS_TYPE_CONTROL);
01150   g_value_set_object (&paramv[0], proxy);
01151   g_variant_iter_init (&iter, parameters);
01152   n = 1;
01153   while ((child = g_variant_iter_next_value (&iter)) != NULL)
01154     {
01155       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
01156       if (arg_info->use_gvariant)
01157         {
01158           g_value_init (&paramv[n], G_TYPE_VARIANT);
01159           g_value_set_variant (&paramv[n], child);
01160           n++;
01161         }
01162       else
01163         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
01164       g_variant_unref (child);
01165     }
01166   signal_id = g_signal_lookup (info->signal_name, BAMF_DBUS_TYPE_CONTROL);
01167   g_signal_emitv (paramv, signal_id, 0, NULL);
01168   for (n = 0; n < num_params + 1; n++)
01169     g_value_unset (&paramv[n]);
01170   g_free (paramv);
01171 }
01172 
01173 static void
01174 bamf_dbus_control_proxy_g_properties_changed (GDBusProxy *_proxy,
01175   GVariant *changed_properties,
01176   const gchar *const *invalidated_properties)
01177 {
01178   BamfDBusControlProxy *proxy = BAMF_DBUS_CONTROL_PROXY (_proxy);
01179   guint n;
01180   const gchar *key;
01181   GVariantIter *iter;
01182   _ExtendedGDBusPropertyInfo *info;
01183   g_variant_get (changed_properties, "a{sv}", &iter);
01184   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
01185     {
01186       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_control_interface_info, key);
01187       g_datalist_remove_data (&proxy->priv->qdata, key);
01188       if (info != NULL)
01189         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
01190     }
01191   g_variant_iter_free (iter);
01192   for (n = 0; invalidated_properties[n] != NULL; n++)
01193     {
01194       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_control_interface_info, invalidated_properties[n]);
01195       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
01196       if (info != NULL)
01197         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
01198     }
01199 }
01200 
01201 static void
01202 bamf_dbus_control_proxy_init (BamfDBusControlProxy *proxy)
01203 {
01204   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, BAMF_DBUS_TYPE_CONTROL_PROXY, BamfDBusControlProxyPrivate);
01205   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), bamf_dbus_control_interface_info ());
01206 }
01207 
01208 static void
01209 bamf_dbus_control_proxy_class_init (BamfDBusControlProxyClass *klass)
01210 {
01211   GObjectClass *gobject_class;
01212   GDBusProxyClass *proxy_class;
01213 
01214   g_type_class_add_private (klass, sizeof (BamfDBusControlProxyPrivate));
01215 
01216   gobject_class = G_OBJECT_CLASS (klass);
01217   gobject_class->finalize     = bamf_dbus_control_proxy_finalize;
01218   gobject_class->get_property = bamf_dbus_control_proxy_get_property;
01219   gobject_class->set_property = bamf_dbus_control_proxy_set_property;
01220 
01221   proxy_class = G_DBUS_PROXY_CLASS (klass);
01222   proxy_class->g_signal = bamf_dbus_control_proxy_g_signal;
01223   proxy_class->g_properties_changed = bamf_dbus_control_proxy_g_properties_changed;
01224 
01225 }
01226 
01227 static void
01228 bamf_dbus_control_proxy_iface_init (BamfDBusControlIface *iface)
01229 {
01230 }
01231 
01249 void
01250 bamf_dbus_control_proxy_new (
01251     GDBusConnection     *connection,
01252     GDBusProxyFlags      flags,
01253     const gchar         *name,
01254     const gchar         *object_path,
01255     GCancellable        *cancellable,
01256     GAsyncReadyCallback  callback,
01257     gpointer             user_data)
01258 {
01259   g_async_initable_new_async (BAMF_DBUS_TYPE_CONTROL_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.control", NULL);
01260 }
01261 
01271 BamfDBusControl *
01272 bamf_dbus_control_proxy_new_finish (
01273     GAsyncResult        *res,
01274     GError             **error)
01275 {
01276   GObject *ret;
01277   GObject *source_object;
01278   source_object = g_async_result_get_source_object (res);
01279   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
01280   g_object_unref (source_object);
01281   if (ret != NULL)
01282     return BAMF_DBUS_CONTROL (ret);
01283   else
01284     return NULL;
01285 }
01286 
01304 BamfDBusControl *
01305 bamf_dbus_control_proxy_new_sync (
01306     GDBusConnection     *connection,
01307     GDBusProxyFlags      flags,
01308     const gchar         *name,
01309     const gchar         *object_path,
01310     GCancellable        *cancellable,
01311     GError             **error)
01312 {
01313   GInitable *ret;
01314   ret = g_initable_new (BAMF_DBUS_TYPE_CONTROL_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.control", NULL);
01315   if (ret != NULL)
01316     return BAMF_DBUS_CONTROL (ret);
01317   else
01318     return NULL;
01319 }
01320 
01321 
01339 void
01340 bamf_dbus_control_proxy_new_for_bus (
01341     GBusType             bus_type,
01342     GDBusProxyFlags      flags,
01343     const gchar         *name,
01344     const gchar         *object_path,
01345     GCancellable        *cancellable,
01346     GAsyncReadyCallback  callback,
01347     gpointer             user_data)
01348 {
01349   g_async_initable_new_async (BAMF_DBUS_TYPE_CONTROL_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.control", NULL);
01350 }
01351 
01361 BamfDBusControl *
01362 bamf_dbus_control_proxy_new_for_bus_finish (
01363     GAsyncResult        *res,
01364     GError             **error)
01365 {
01366   GObject *ret;
01367   GObject *source_object;
01368   source_object = g_async_result_get_source_object (res);
01369   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
01370   g_object_unref (source_object);
01371   if (ret != NULL)
01372     return BAMF_DBUS_CONTROL (ret);
01373   else
01374     return NULL;
01375 }
01376 
01394 BamfDBusControl *
01395 bamf_dbus_control_proxy_new_for_bus_sync (
01396     GBusType             bus_type,
01397     GDBusProxyFlags      flags,
01398     const gchar         *name,
01399     const gchar         *object_path,
01400     GCancellable        *cancellable,
01401     GError             **error)
01402 {
01403   GInitable *ret;
01404   ret = g_initable_new (BAMF_DBUS_TYPE_CONTROL_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.control", NULL);
01405   if (ret != NULL)
01406     return BAMF_DBUS_CONTROL (ret);
01407   else
01408     return NULL;
01409 }
01410 
01411 
01412 /* ------------------------------------------------------------------------ */
01413 
01427 struct _BamfDBusControlSkeletonPrivate
01428 {
01429   GValue *properties;
01430   GList *changed_properties;
01431   GSource *changed_properties_idle_source;
01432   GMainContext *context;
01433   GMutex lock;
01434 };
01435 
01436 static void
01437 _bamf_dbus_control_skeleton_handle_method_call (
01438   GDBusConnection *connection,
01439   const gchar *sender,
01440   const gchar *object_path,
01441   const gchar *interface_name,
01442   const gchar *method_name,
01443   GVariant *parameters,
01444   GDBusMethodInvocation *invocation,
01445   gpointer user_data)
01446 {
01447   BamfDBusControlSkeleton *skeleton = BAMF_DBUS_CONTROL_SKELETON (user_data);
01448   _ExtendedGDBusMethodInfo *info;
01449   GVariantIter iter;
01450   GVariant *child;
01451   GValue *paramv;
01452   guint num_params;
01453   guint num_extra;
01454   guint n;
01455   guint signal_id;
01456   GValue return_value = G_VALUE_INIT;
01457   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
01458   g_assert (info != NULL);
01459   num_params = g_variant_n_children (parameters);
01460   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
01461   n = 0;
01462   g_value_init (&paramv[n], BAMF_DBUS_TYPE_CONTROL);
01463   g_value_set_object (&paramv[n++], skeleton);
01464   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
01465   g_value_set_object (&paramv[n++], invocation);
01466   if (info->pass_fdlist)
01467     {
01468 #ifdef G_OS_UNIX
01469       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
01470       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
01471 #else
01472       g_assert_not_reached ();
01473 #endif
01474     }
01475   g_variant_iter_init (&iter, parameters);
01476   while ((child = g_variant_iter_next_value (&iter)) != NULL)
01477     {
01478       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
01479       if (arg_info->use_gvariant)
01480         {
01481           g_value_init (&paramv[n], G_TYPE_VARIANT);
01482           g_value_set_variant (&paramv[n], child);
01483           n++;
01484         }
01485       else
01486         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
01487       g_variant_unref (child);
01488     }
01489   signal_id = g_signal_lookup (info->signal_name, BAMF_DBUS_TYPE_CONTROL);
01490   g_value_init (&return_value, G_TYPE_BOOLEAN);
01491   g_signal_emitv (paramv, signal_id, 0, &return_value);
01492   if (!g_value_get_boolean (&return_value))
01493     g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
01494   g_value_unset (&return_value);
01495   for (n = 0; n < num_params + num_extra; n++)
01496     g_value_unset (&paramv[n]);
01497   g_free (paramv);
01498 }
01499 
01500 static GVariant *
01501 _bamf_dbus_control_skeleton_handle_get_property (
01502   GDBusConnection *connection,
01503   const gchar *sender,
01504   const gchar *object_path,
01505   const gchar *interface_name,
01506   const gchar *property_name,
01507   GError **error,
01508   gpointer user_data)
01509 {
01510   BamfDBusControlSkeleton *skeleton = BAMF_DBUS_CONTROL_SKELETON (user_data);
01511   GValue value = G_VALUE_INIT;
01512   GParamSpec *pspec;
01513   _ExtendedGDBusPropertyInfo *info;
01514   GVariant *ret;
01515   ret = NULL;
01516   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_control_interface_info, property_name);
01517   g_assert (info != NULL);
01518   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
01519   if (pspec == NULL)
01520     {
01521       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
01522     }
01523   else
01524     {
01525       g_value_init (&value, pspec->value_type);
01526       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
01527       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
01528       g_value_unset (&value);
01529     }
01530   return ret;
01531 }
01532 
01533 static gboolean
01534 _bamf_dbus_control_skeleton_handle_set_property (
01535   GDBusConnection *connection,
01536   const gchar *sender,
01537   const gchar *object_path,
01538   const gchar *interface_name,
01539   const gchar *property_name,
01540   GVariant *variant,
01541   GError **error,
01542   gpointer user_data)
01543 {
01544   BamfDBusControlSkeleton *skeleton = BAMF_DBUS_CONTROL_SKELETON (user_data);
01545   GValue value = G_VALUE_INIT;
01546   GParamSpec *pspec;
01547   _ExtendedGDBusPropertyInfo *info;
01548   gboolean ret;
01549   ret = FALSE;
01550   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_control_interface_info, property_name);
01551   g_assert (info != NULL);
01552   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
01553   if (pspec == NULL)
01554     {
01555       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
01556     }
01557   else
01558     {
01559       if (info->use_gvariant)
01560         g_value_set_variant (&value, variant);
01561       else
01562         g_dbus_gvariant_to_gvalue (variant, &value);
01563       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
01564       g_value_unset (&value);
01565       ret = TRUE;
01566     }
01567   return ret;
01568 }
01569 
01570 static const GDBusInterfaceVTable _bamf_dbus_control_skeleton_vtable =
01571 {
01572   _bamf_dbus_control_skeleton_handle_method_call,
01573   _bamf_dbus_control_skeleton_handle_get_property,
01574   _bamf_dbus_control_skeleton_handle_set_property
01575 };
01576 
01577 static GDBusInterfaceInfo *
01578 bamf_dbus_control_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
01579 {
01580   return bamf_dbus_control_interface_info ();
01581 }
01582 
01583 static GDBusInterfaceVTable *
01584 bamf_dbus_control_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
01585 {
01586   return (GDBusInterfaceVTable *) &_bamf_dbus_control_skeleton_vtable;
01587 }
01588 
01589 static GVariant *
01590 bamf_dbus_control_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
01591 {
01592   BamfDBusControlSkeleton *skeleton = BAMF_DBUS_CONTROL_SKELETON (_skeleton);
01593 
01594   GVariantBuilder builder;
01595   guint n;
01596   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
01597   if (_bamf_dbus_control_interface_info.parent_struct.properties == NULL)
01598     goto out;
01599   for (n = 0; _bamf_dbus_control_interface_info.parent_struct.properties[n] != NULL; n++)
01600     {
01601       GDBusPropertyInfo *info = _bamf_dbus_control_interface_info.parent_struct.properties[n];
01602       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
01603         {
01604           GVariant *value;
01605           value = _bamf_dbus_control_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.control", info->name, NULL, skeleton);
01606           if (value != NULL)
01607             {
01608               g_variant_take_ref (value);
01609               g_variant_builder_add (&builder, "{sv}", info->name, value);
01610               g_variant_unref (value);
01611             }
01612         }
01613     }
01614 out:
01615   return g_variant_builder_end (&builder);
01616 }
01617 
01618 static void
01619 bamf_dbus_control_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
01620 {
01621 }
01622 
01623 static void bamf_dbus_control_skeleton_iface_init (BamfDBusControlIface *iface);
01624 G_DEFINE_TYPE_WITH_CODE (BamfDBusControlSkeleton, bamf_dbus_control_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
01625                          G_IMPLEMENT_INTERFACE (BAMF_DBUS_TYPE_CONTROL, bamf_dbus_control_skeleton_iface_init));
01626 
01627 static void
01628 bamf_dbus_control_skeleton_finalize (GObject *object)
01629 {
01630   BamfDBusControlSkeleton *skeleton = BAMF_DBUS_CONTROL_SKELETON (object);
01631   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
01632   if (skeleton->priv->changed_properties_idle_source != NULL)
01633     g_source_destroy (skeleton->priv->changed_properties_idle_source);
01634   g_main_context_unref (skeleton->priv->context);
01635   g_mutex_clear (&skeleton->priv->lock);
01636   G_OBJECT_CLASS (bamf_dbus_control_skeleton_parent_class)->finalize (object);
01637 }
01638 
01639 static void
01640 bamf_dbus_control_skeleton_init (BamfDBusControlSkeleton *skeleton)
01641 {
01642   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, BAMF_DBUS_TYPE_CONTROL_SKELETON, BamfDBusControlSkeletonPrivate);
01643   g_mutex_init (&skeleton->priv->lock);
01644   skeleton->priv->context = g_main_context_ref_thread_default ();
01645 }
01646 
01647 static void
01648 bamf_dbus_control_skeleton_class_init (BamfDBusControlSkeletonClass *klass)
01649 {
01650   GObjectClass *gobject_class;
01651   GDBusInterfaceSkeletonClass *skeleton_class;
01652 
01653   g_type_class_add_private (klass, sizeof (BamfDBusControlSkeletonPrivate));
01654 
01655   gobject_class = G_OBJECT_CLASS (klass);
01656   gobject_class->finalize = bamf_dbus_control_skeleton_finalize;
01657 
01658   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
01659   skeleton_class->get_info = bamf_dbus_control_skeleton_dbus_interface_get_info;
01660   skeleton_class->get_properties = bamf_dbus_control_skeleton_dbus_interface_get_properties;
01661   skeleton_class->flush = bamf_dbus_control_skeleton_dbus_interface_flush;
01662   skeleton_class->get_vtable = bamf_dbus_control_skeleton_dbus_interface_get_vtable;
01663 }
01664 
01665 static void
01666 bamf_dbus_control_skeleton_iface_init (BamfDBusControlIface *iface)
01667 {
01668 }
01669 
01677 BamfDBusControl *
01678 bamf_dbus_control_skeleton_new (void)
01679 {
01680   return BAMF_DBUS_CONTROL (g_object_new (BAMF_DBUS_TYPE_CONTROL_SKELETON, NULL));
01681 }
01682 
01683 /* ------------------------------------------------------------------------
01684  * Code for interface org.ayatana.bamf.matcher
01685  * ------------------------------------------------------------------------
01686  */
01687 
01696 /* ---- Introspection data for org.ayatana.bamf.matcher ---- */
01697 
01698 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_xids_for_application_IN_ARG_desktop_file =
01699 {
01700   {
01701     -1,
01702     "desktop_file",
01703     "s",
01704     NULL
01705   },
01706   FALSE
01707 };
01708 
01709 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_xids_for_application_IN_ARG_pointers[] =
01710 {
01711   &_bamf_dbus_matcher_method_info_xids_for_application_IN_ARG_desktop_file,
01712   NULL
01713 };
01714 
01715 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_xids_for_application_OUT_ARG_xids =
01716 {
01717   {
01718     -1,
01719     "xids",
01720     "au",
01721     NULL
01722   },
01723   FALSE
01724 };
01725 
01726 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_xids_for_application_OUT_ARG_pointers[] =
01727 {
01728   &_bamf_dbus_matcher_method_info_xids_for_application_OUT_ARG_xids,
01729   NULL
01730 };
01731 
01732 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_xids_for_application =
01733 {
01734   {
01735     -1,
01736     "XidsForApplication",
01737     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_xids_for_application_IN_ARG_pointers,
01738     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_xids_for_application_OUT_ARG_pointers,
01739     NULL
01740   },
01741   "handle-xids-for-application",
01742   FALSE
01743 };
01744 
01745 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_tab_paths_OUT_ARG_paths =
01746 {
01747   {
01748     -1,
01749     "paths",
01750     "as",
01751     NULL
01752   },
01753   FALSE
01754 };
01755 
01756 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_tab_paths_OUT_ARG_pointers[] =
01757 {
01758   &_bamf_dbus_matcher_method_info_tab_paths_OUT_ARG_paths,
01759   NULL
01760 };
01761 
01762 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_tab_paths =
01763 {
01764   {
01765     -1,
01766     "TabPaths",
01767     NULL,
01768     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_tab_paths_OUT_ARG_pointers,
01769     NULL
01770   },
01771   "handle-tab-paths",
01772   FALSE
01773 };
01774 
01775 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_running_applications_OUT_ARG_paths =
01776 {
01777   {
01778     -1,
01779     "paths",
01780     "as",
01781     NULL
01782   },
01783   FALSE
01784 };
01785 
01786 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_running_applications_OUT_ARG_pointers[] =
01787 {
01788   &_bamf_dbus_matcher_method_info_running_applications_OUT_ARG_paths,
01789   NULL
01790 };
01791 
01792 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_running_applications =
01793 {
01794   {
01795     -1,
01796     "RunningApplications",
01797     NULL,
01798     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_running_applications_OUT_ARG_pointers,
01799     NULL
01800   },
01801   "handle-running-applications",
01802   FALSE
01803 };
01804 
01805 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_running_applications_desktop_files_OUT_ARG_paths =
01806 {
01807   {
01808     -1,
01809     "paths",
01810     "as",
01811     NULL
01812   },
01813   FALSE
01814 };
01815 
01816 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_running_applications_desktop_files_OUT_ARG_pointers[] =
01817 {
01818   &_bamf_dbus_matcher_method_info_running_applications_desktop_files_OUT_ARG_paths,
01819   NULL
01820 };
01821 
01822 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_running_applications_desktop_files =
01823 {
01824   {
01825     -1,
01826     "RunningApplicationsDesktopFiles",
01827     NULL,
01828     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_running_applications_desktop_files_OUT_ARG_pointers,
01829     NULL
01830   },
01831   "handle-running-applications-desktop-files",
01832   FALSE
01833 };
01834 
01835 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_register_favorites_IN_ARG_favorites =
01836 {
01837   {
01838     -1,
01839     "favorites",
01840     "as",
01841     NULL
01842   },
01843   FALSE
01844 };
01845 
01846 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_register_favorites_IN_ARG_pointers[] =
01847 {
01848   &_bamf_dbus_matcher_method_info_register_favorites_IN_ARG_favorites,
01849   NULL
01850 };
01851 
01852 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_register_favorites =
01853 {
01854   {
01855     -1,
01856     "RegisterFavorites",
01857     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_register_favorites_IN_ARG_pointers,
01858     NULL,
01859     NULL
01860   },
01861   "handle-register-favorites",
01862   FALSE
01863 };
01864 
01865 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_path_for_application_IN_ARG_desktop_file =
01866 {
01867   {
01868     -1,
01869     "desktop_file",
01870     "s",
01871     NULL
01872   },
01873   FALSE
01874 };
01875 
01876 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_path_for_application_IN_ARG_pointers[] =
01877 {
01878   &_bamf_dbus_matcher_method_info_path_for_application_IN_ARG_desktop_file,
01879   NULL
01880 };
01881 
01882 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_path_for_application_OUT_ARG_path =
01883 {
01884   {
01885     -1,
01886     "path",
01887     "s",
01888     NULL
01889   },
01890   FALSE
01891 };
01892 
01893 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_path_for_application_OUT_ARG_pointers[] =
01894 {
01895   &_bamf_dbus_matcher_method_info_path_for_application_OUT_ARG_path,
01896   NULL
01897 };
01898 
01899 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_path_for_application =
01900 {
01901   {
01902     -1,
01903     "PathForApplication",
01904     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_path_for_application_IN_ARG_pointers,
01905     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_path_for_application_OUT_ARG_pointers,
01906     NULL
01907   },
01908   "handle-path-for-application",
01909   FALSE
01910 };
01911 
01912 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_window_paths_OUT_ARG_paths =
01913 {
01914   {
01915     -1,
01916     "paths",
01917     "as",
01918     NULL
01919   },
01920   FALSE
01921 };
01922 
01923 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_window_paths_OUT_ARG_pointers[] =
01924 {
01925   &_bamf_dbus_matcher_method_info_window_paths_OUT_ARG_paths,
01926   NULL
01927 };
01928 
01929 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_window_paths =
01930 {
01931   {
01932     -1,
01933     "WindowPaths",
01934     NULL,
01935     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_window_paths_OUT_ARG_pointers,
01936     NULL
01937   },
01938   "handle-window-paths",
01939   FALSE
01940 };
01941 
01942 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_application_paths_OUT_ARG_paths =
01943 {
01944   {
01945     -1,
01946     "paths",
01947     "as",
01948     NULL
01949   },
01950   FALSE
01951 };
01952 
01953 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_application_paths_OUT_ARG_pointers[] =
01954 {
01955   &_bamf_dbus_matcher_method_info_application_paths_OUT_ARG_paths,
01956   NULL
01957 };
01958 
01959 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_application_paths =
01960 {
01961   {
01962     -1,
01963     "ApplicationPaths",
01964     NULL,
01965     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_application_paths_OUT_ARG_pointers,
01966     NULL
01967   },
01968   "handle-application-paths",
01969   FALSE
01970 };
01971 
01972 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_application_is_running_IN_ARG_desktop_file =
01973 {
01974   {
01975     -1,
01976     "desktop_file",
01977     "s",
01978     NULL
01979   },
01980   FALSE
01981 };
01982 
01983 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_application_is_running_IN_ARG_pointers[] =
01984 {
01985   &_bamf_dbus_matcher_method_info_application_is_running_IN_ARG_desktop_file,
01986   NULL
01987 };
01988 
01989 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_application_is_running_OUT_ARG_running =
01990 {
01991   {
01992     -1,
01993     "running",
01994     "b",
01995     NULL
01996   },
01997   FALSE
01998 };
01999 
02000 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_application_is_running_OUT_ARG_pointers[] =
02001 {
02002   &_bamf_dbus_matcher_method_info_application_is_running_OUT_ARG_running,
02003   NULL
02004 };
02005 
02006 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_application_is_running =
02007 {
02008   {
02009     -1,
02010     "ApplicationIsRunning",
02011     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_application_is_running_IN_ARG_pointers,
02012     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_application_is_running_OUT_ARG_pointers,
02013     NULL
02014   },
02015   "handle-application-is-running",
02016   FALSE
02017 };
02018 
02019 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_application_for_xid_IN_ARG_xid =
02020 {
02021   {
02022     -1,
02023     "xid",
02024     "u",
02025     NULL
02026   },
02027   FALSE
02028 };
02029 
02030 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_application_for_xid_IN_ARG_pointers[] =
02031 {
02032   &_bamf_dbus_matcher_method_info_application_for_xid_IN_ARG_xid,
02033   NULL
02034 };
02035 
02036 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_application_for_xid_OUT_ARG_application =
02037 {
02038   {
02039     -1,
02040     "application",
02041     "s",
02042     NULL
02043   },
02044   FALSE
02045 };
02046 
02047 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_application_for_xid_OUT_ARG_pointers[] =
02048 {
02049   &_bamf_dbus_matcher_method_info_application_for_xid_OUT_ARG_application,
02050   NULL
02051 };
02052 
02053 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_application_for_xid =
02054 {
02055   {
02056     -1,
02057     "ApplicationForXid",
02058     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_application_for_xid_IN_ARG_pointers,
02059     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_application_for_xid_OUT_ARG_pointers,
02060     NULL
02061   },
02062   "handle-application-for-xid",
02063   FALSE
02064 };
02065 
02066 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_active_window_OUT_ARG_window =
02067 {
02068   {
02069     -1,
02070     "window",
02071     "s",
02072     NULL
02073   },
02074   FALSE
02075 };
02076 
02077 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_active_window_OUT_ARG_pointers[] =
02078 {
02079   &_bamf_dbus_matcher_method_info_active_window_OUT_ARG_window,
02080   NULL
02081 };
02082 
02083 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_active_window =
02084 {
02085   {
02086     -1,
02087     "ActiveWindow",
02088     NULL,
02089     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_active_window_OUT_ARG_pointers,
02090     NULL
02091   },
02092   "handle-active-window",
02093   FALSE
02094 };
02095 
02096 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_active_application_OUT_ARG_application =
02097 {
02098   {
02099     -1,
02100     "application",
02101     "s",
02102     NULL
02103   },
02104   FALSE
02105 };
02106 
02107 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_active_application_OUT_ARG_pointers[] =
02108 {
02109   &_bamf_dbus_matcher_method_info_active_application_OUT_ARG_application,
02110   NULL
02111 };
02112 
02113 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_active_application =
02114 {
02115   {
02116     -1,
02117     "ActiveApplication",
02118     NULL,
02119     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_active_application_OUT_ARG_pointers,
02120     NULL
02121   },
02122   "handle-active-application",
02123   FALSE
02124 };
02125 
02126 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_window_stack_for_monitor_IN_ARG_monitor_id =
02127 {
02128   {
02129     -1,
02130     "monitor_id",
02131     "i",
02132     NULL
02133   },
02134   FALSE
02135 };
02136 
02137 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_window_stack_for_monitor_IN_ARG_pointers[] =
02138 {
02139   &_bamf_dbus_matcher_method_info_window_stack_for_monitor_IN_ARG_monitor_id,
02140   NULL
02141 };
02142 
02143 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_method_info_window_stack_for_monitor_OUT_ARG_window_list =
02144 {
02145   {
02146     -1,
02147     "window_list",
02148     "as",
02149     NULL
02150   },
02151   FALSE
02152 };
02153 
02154 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_method_info_window_stack_for_monitor_OUT_ARG_pointers[] =
02155 {
02156   &_bamf_dbus_matcher_method_info_window_stack_for_monitor_OUT_ARG_window_list,
02157   NULL
02158 };
02159 
02160 static const _ExtendedGDBusMethodInfo _bamf_dbus_matcher_method_info_window_stack_for_monitor =
02161 {
02162   {
02163     -1,
02164     "WindowStackForMonitor",
02165     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_window_stack_for_monitor_IN_ARG_pointers,
02166     (GDBusArgInfo **) &_bamf_dbus_matcher_method_info_window_stack_for_monitor_OUT_ARG_pointers,
02167     NULL
02168   },
02169   "handle-window-stack-for-monitor",
02170   FALSE
02171 };
02172 
02173 static const _ExtendedGDBusMethodInfo * const _bamf_dbus_matcher_method_info_pointers[] =
02174 {
02175   &_bamf_dbus_matcher_method_info_xids_for_application,
02176   &_bamf_dbus_matcher_method_info_tab_paths,
02177   &_bamf_dbus_matcher_method_info_running_applications,
02178   &_bamf_dbus_matcher_method_info_running_applications_desktop_files,
02179   &_bamf_dbus_matcher_method_info_register_favorites,
02180   &_bamf_dbus_matcher_method_info_path_for_application,
02181   &_bamf_dbus_matcher_method_info_window_paths,
02182   &_bamf_dbus_matcher_method_info_application_paths,
02183   &_bamf_dbus_matcher_method_info_application_is_running,
02184   &_bamf_dbus_matcher_method_info_application_for_xid,
02185   &_bamf_dbus_matcher_method_info_active_window,
02186   &_bamf_dbus_matcher_method_info_active_application,
02187   &_bamf_dbus_matcher_method_info_window_stack_for_monitor,
02188   NULL
02189 };
02190 
02191 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_active_application_changed_ARG_old_app =
02192 {
02193   {
02194     -1,
02195     "old_app",
02196     "s",
02197     NULL
02198   },
02199   FALSE
02200 };
02201 
02202 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_active_application_changed_ARG_new_app =
02203 {
02204   {
02205     -1,
02206     "new_app",
02207     "s",
02208     NULL
02209   },
02210   FALSE
02211 };
02212 
02213 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_signal_info_active_application_changed_ARG_pointers[] =
02214 {
02215   &_bamf_dbus_matcher_signal_info_active_application_changed_ARG_old_app,
02216   &_bamf_dbus_matcher_signal_info_active_application_changed_ARG_new_app,
02217   NULL
02218 };
02219 
02220 static const _ExtendedGDBusSignalInfo _bamf_dbus_matcher_signal_info_active_application_changed =
02221 {
02222   {
02223     -1,
02224     "ActiveApplicationChanged",
02225     (GDBusArgInfo **) &_bamf_dbus_matcher_signal_info_active_application_changed_ARG_pointers,
02226     NULL
02227   },
02228   "active-application-changed"
02229 };
02230 
02231 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_active_window_changed_ARG_old_win =
02232 {
02233   {
02234     -1,
02235     "old_win",
02236     "s",
02237     NULL
02238   },
02239   FALSE
02240 };
02241 
02242 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_active_window_changed_ARG_new_win =
02243 {
02244   {
02245     -1,
02246     "new_win",
02247     "s",
02248     NULL
02249   },
02250   FALSE
02251 };
02252 
02253 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_signal_info_active_window_changed_ARG_pointers[] =
02254 {
02255   &_bamf_dbus_matcher_signal_info_active_window_changed_ARG_old_win,
02256   &_bamf_dbus_matcher_signal_info_active_window_changed_ARG_new_win,
02257   NULL
02258 };
02259 
02260 static const _ExtendedGDBusSignalInfo _bamf_dbus_matcher_signal_info_active_window_changed =
02261 {
02262   {
02263     -1,
02264     "ActiveWindowChanged",
02265     (GDBusArgInfo **) &_bamf_dbus_matcher_signal_info_active_window_changed_ARG_pointers,
02266     NULL
02267   },
02268   "active-window-changed"
02269 };
02270 
02271 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_view_closed_ARG_path =
02272 {
02273   {
02274     -1,
02275     "path",
02276     "s",
02277     NULL
02278   },
02279   FALSE
02280 };
02281 
02282 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_view_closed_ARG_type =
02283 {
02284   {
02285     -1,
02286     "type",
02287     "s",
02288     NULL
02289   },
02290   FALSE
02291 };
02292 
02293 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_signal_info_view_closed_ARG_pointers[] =
02294 {
02295   &_bamf_dbus_matcher_signal_info_view_closed_ARG_path,
02296   &_bamf_dbus_matcher_signal_info_view_closed_ARG_type,
02297   NULL
02298 };
02299 
02300 static const _ExtendedGDBusSignalInfo _bamf_dbus_matcher_signal_info_view_closed =
02301 {
02302   {
02303     -1,
02304     "ViewClosed",
02305     (GDBusArgInfo **) &_bamf_dbus_matcher_signal_info_view_closed_ARG_pointers,
02306     NULL
02307   },
02308   "view-closed"
02309 };
02310 
02311 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_view_opened_ARG_path =
02312 {
02313   {
02314     -1,
02315     "path",
02316     "s",
02317     NULL
02318   },
02319   FALSE
02320 };
02321 
02322 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_view_opened_ARG_type =
02323 {
02324   {
02325     -1,
02326     "type",
02327     "s",
02328     NULL
02329   },
02330   FALSE
02331 };
02332 
02333 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_signal_info_view_opened_ARG_pointers[] =
02334 {
02335   &_bamf_dbus_matcher_signal_info_view_opened_ARG_path,
02336   &_bamf_dbus_matcher_signal_info_view_opened_ARG_type,
02337   NULL
02338 };
02339 
02340 static const _ExtendedGDBusSignalInfo _bamf_dbus_matcher_signal_info_view_opened =
02341 {
02342   {
02343     -1,
02344     "ViewOpened",
02345     (GDBusArgInfo **) &_bamf_dbus_matcher_signal_info_view_opened_ARG_pointers,
02346     NULL
02347   },
02348   "view-opened"
02349 };
02350 
02351 static const _ExtendedGDBusSignalInfo _bamf_dbus_matcher_signal_info_stacking_order_changed =
02352 {
02353   {
02354     -1,
02355     "StackingOrderChanged",
02356     NULL,
02357     NULL
02358   },
02359   "stacking-order-changed"
02360 };
02361 
02362 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_running_applications_changed_ARG_opened_desktop_files =
02363 {
02364   {
02365     -1,
02366     "opened_desktop_files",
02367     "as",
02368     NULL
02369   },
02370   FALSE
02371 };
02372 
02373 static const _ExtendedGDBusArgInfo _bamf_dbus_matcher_signal_info_running_applications_changed_ARG_closed_desktop_files =
02374 {
02375   {
02376     -1,
02377     "closed_desktop_files",
02378     "as",
02379     NULL
02380   },
02381   FALSE
02382 };
02383 
02384 static const _ExtendedGDBusArgInfo * const _bamf_dbus_matcher_signal_info_running_applications_changed_ARG_pointers[] =
02385 {
02386   &_bamf_dbus_matcher_signal_info_running_applications_changed_ARG_opened_desktop_files,
02387   &_bamf_dbus_matcher_signal_info_running_applications_changed_ARG_closed_desktop_files,
02388   NULL
02389 };
02390 
02391 static const _ExtendedGDBusSignalInfo _bamf_dbus_matcher_signal_info_running_applications_changed =
02392 {
02393   {
02394     -1,
02395     "RunningApplicationsChanged",
02396     (GDBusArgInfo **) &_bamf_dbus_matcher_signal_info_running_applications_changed_ARG_pointers,
02397     NULL
02398   },
02399   "running-applications-changed"
02400 };
02401 
02402 static const _ExtendedGDBusSignalInfo * const _bamf_dbus_matcher_signal_info_pointers[] =
02403 {
02404   &_bamf_dbus_matcher_signal_info_active_application_changed,
02405   &_bamf_dbus_matcher_signal_info_active_window_changed,
02406   &_bamf_dbus_matcher_signal_info_view_closed,
02407   &_bamf_dbus_matcher_signal_info_view_opened,
02408   &_bamf_dbus_matcher_signal_info_stacking_order_changed,
02409   &_bamf_dbus_matcher_signal_info_running_applications_changed,
02410   NULL
02411 };
02412 
02413 static const _ExtendedGDBusInterfaceInfo _bamf_dbus_matcher_interface_info =
02414 {
02415   {
02416     -1,
02417     "org.ayatana.bamf.matcher",
02418     (GDBusMethodInfo **) &_bamf_dbus_matcher_method_info_pointers,
02419     (GDBusSignalInfo **) &_bamf_dbus_matcher_signal_info_pointers,
02420     NULL,
02421     NULL
02422   },
02423   "matcher",
02424 };
02425 
02426 
02434 GDBusInterfaceInfo *
02435 bamf_dbus_matcher_interface_info (void)
02436 {
02437   return (GDBusInterfaceInfo *) &_bamf_dbus_matcher_interface_info;
02438 }
02439 
02450 guint
02451 bamf_dbus_matcher_override_properties (GObjectClass *klass, guint property_id_begin)
02452 {
02453   return property_id_begin - 1;
02454 }
02455 
02456 
02457 
02490 static void
02491 bamf_dbus_matcher_default_init (BamfDBusMatcherIface *iface)
02492 {
02493   /* GObject signals for incoming D-Bus method calls: */
02506   g_signal_new ("handle-xids-for-application",
02507     G_TYPE_FROM_INTERFACE (iface),
02508     G_SIGNAL_RUN_LAST,
02509     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_xids_for_application),
02510     g_signal_accumulator_true_handled,
02511     NULL,
02512     g_cclosure_marshal_generic,
02513     G_TYPE_BOOLEAN,
02514     2,
02515     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
02516 
02528   g_signal_new ("handle-tab-paths",
02529     G_TYPE_FROM_INTERFACE (iface),
02530     G_SIGNAL_RUN_LAST,
02531     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_tab_paths),
02532     g_signal_accumulator_true_handled,
02533     NULL,
02534     g_cclosure_marshal_generic,
02535     G_TYPE_BOOLEAN,
02536     1,
02537     G_TYPE_DBUS_METHOD_INVOCATION);
02538 
02550   g_signal_new ("handle-running-applications",
02551     G_TYPE_FROM_INTERFACE (iface),
02552     G_SIGNAL_RUN_LAST,
02553     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_running_applications),
02554     g_signal_accumulator_true_handled,
02555     NULL,
02556     g_cclosure_marshal_generic,
02557     G_TYPE_BOOLEAN,
02558     1,
02559     G_TYPE_DBUS_METHOD_INVOCATION);
02560 
02572   g_signal_new ("handle-running-applications-desktop-files",
02573     G_TYPE_FROM_INTERFACE (iface),
02574     G_SIGNAL_RUN_LAST,
02575     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_running_applications_desktop_files),
02576     g_signal_accumulator_true_handled,
02577     NULL,
02578     g_cclosure_marshal_generic,
02579     G_TYPE_BOOLEAN,
02580     1,
02581     G_TYPE_DBUS_METHOD_INVOCATION);
02582 
02595   g_signal_new ("handle-register-favorites",
02596     G_TYPE_FROM_INTERFACE (iface),
02597     G_SIGNAL_RUN_LAST,
02598     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_register_favorites),
02599     g_signal_accumulator_true_handled,
02600     NULL,
02601     g_cclosure_marshal_generic,
02602     G_TYPE_BOOLEAN,
02603     2,
02604     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV);
02605 
02618   g_signal_new ("handle-path-for-application",
02619     G_TYPE_FROM_INTERFACE (iface),
02620     G_SIGNAL_RUN_LAST,
02621     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_path_for_application),
02622     g_signal_accumulator_true_handled,
02623     NULL,
02624     g_cclosure_marshal_generic,
02625     G_TYPE_BOOLEAN,
02626     2,
02627     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
02628 
02640   g_signal_new ("handle-window-paths",
02641     G_TYPE_FROM_INTERFACE (iface),
02642     G_SIGNAL_RUN_LAST,
02643     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_window_paths),
02644     g_signal_accumulator_true_handled,
02645     NULL,
02646     g_cclosure_marshal_generic,
02647     G_TYPE_BOOLEAN,
02648     1,
02649     G_TYPE_DBUS_METHOD_INVOCATION);
02650 
02662   g_signal_new ("handle-application-paths",
02663     G_TYPE_FROM_INTERFACE (iface),
02664     G_SIGNAL_RUN_LAST,
02665     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_application_paths),
02666     g_signal_accumulator_true_handled,
02667     NULL,
02668     g_cclosure_marshal_generic,
02669     G_TYPE_BOOLEAN,
02670     1,
02671     G_TYPE_DBUS_METHOD_INVOCATION);
02672 
02685   g_signal_new ("handle-application-is-running",
02686     G_TYPE_FROM_INTERFACE (iface),
02687     G_SIGNAL_RUN_LAST,
02688     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_application_is_running),
02689     g_signal_accumulator_true_handled,
02690     NULL,
02691     g_cclosure_marshal_generic,
02692     G_TYPE_BOOLEAN,
02693     2,
02694     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
02695 
02708   g_signal_new ("handle-application-for-xid",
02709     G_TYPE_FROM_INTERFACE (iface),
02710     G_SIGNAL_RUN_LAST,
02711     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_application_for_xid),
02712     g_signal_accumulator_true_handled,
02713     NULL,
02714     g_cclosure_marshal_generic,
02715     G_TYPE_BOOLEAN,
02716     2,
02717     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_UINT);
02718 
02730   g_signal_new ("handle-active-window",
02731     G_TYPE_FROM_INTERFACE (iface),
02732     G_SIGNAL_RUN_LAST,
02733     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_active_window),
02734     g_signal_accumulator_true_handled,
02735     NULL,
02736     g_cclosure_marshal_generic,
02737     G_TYPE_BOOLEAN,
02738     1,
02739     G_TYPE_DBUS_METHOD_INVOCATION);
02740 
02752   g_signal_new ("handle-active-application",
02753     G_TYPE_FROM_INTERFACE (iface),
02754     G_SIGNAL_RUN_LAST,
02755     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_active_application),
02756     g_signal_accumulator_true_handled,
02757     NULL,
02758     g_cclosure_marshal_generic,
02759     G_TYPE_BOOLEAN,
02760     1,
02761     G_TYPE_DBUS_METHOD_INVOCATION);
02762 
02775   g_signal_new ("handle-window-stack-for-monitor",
02776     G_TYPE_FROM_INTERFACE (iface),
02777     G_SIGNAL_RUN_LAST,
02778     G_STRUCT_OFFSET (BamfDBusMatcherIface, handle_window_stack_for_monitor),
02779     g_signal_accumulator_true_handled,
02780     NULL,
02781     g_cclosure_marshal_generic,
02782     G_TYPE_BOOLEAN,
02783     2,
02784     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_INT);
02785 
02786   /* GObject signals for received D-Bus signals: */
02797   g_signal_new ("active-application-changed",
02798     G_TYPE_FROM_INTERFACE (iface),
02799     G_SIGNAL_RUN_LAST,
02800     G_STRUCT_OFFSET (BamfDBusMatcherIface, active_application_changed),
02801     NULL,
02802     NULL,
02803     g_cclosure_marshal_generic,
02804     G_TYPE_NONE,
02805     2, G_TYPE_STRING, G_TYPE_STRING);
02806 
02817   g_signal_new ("active-window-changed",
02818     G_TYPE_FROM_INTERFACE (iface),
02819     G_SIGNAL_RUN_LAST,
02820     G_STRUCT_OFFSET (BamfDBusMatcherIface, active_window_changed),
02821     NULL,
02822     NULL,
02823     g_cclosure_marshal_generic,
02824     G_TYPE_NONE,
02825     2, G_TYPE_STRING, G_TYPE_STRING);
02826 
02837   g_signal_new ("view-closed",
02838     G_TYPE_FROM_INTERFACE (iface),
02839     G_SIGNAL_RUN_LAST,
02840     G_STRUCT_OFFSET (BamfDBusMatcherIface, view_closed),
02841     NULL,
02842     NULL,
02843     g_cclosure_marshal_generic,
02844     G_TYPE_NONE,
02845     2, G_TYPE_STRING, G_TYPE_STRING);
02846 
02857   g_signal_new ("view-opened",
02858     G_TYPE_FROM_INTERFACE (iface),
02859     G_SIGNAL_RUN_LAST,
02860     G_STRUCT_OFFSET (BamfDBusMatcherIface, view_opened),
02861     NULL,
02862     NULL,
02863     g_cclosure_marshal_generic,
02864     G_TYPE_NONE,
02865     2, G_TYPE_STRING, G_TYPE_STRING);
02866 
02875   g_signal_new ("stacking-order-changed",
02876     G_TYPE_FROM_INTERFACE (iface),
02877     G_SIGNAL_RUN_LAST,
02878     G_STRUCT_OFFSET (BamfDBusMatcherIface, stacking_order_changed),
02879     NULL,
02880     NULL,
02881     g_cclosure_marshal_generic,
02882     G_TYPE_NONE,
02883     0);
02884 
02895   g_signal_new ("running-applications-changed",
02896     G_TYPE_FROM_INTERFACE (iface),
02897     G_SIGNAL_RUN_LAST,
02898     G_STRUCT_OFFSET (BamfDBusMatcherIface, running_applications_changed),
02899     NULL,
02900     NULL,
02901     g_cclosure_marshal_generic,
02902     G_TYPE_NONE,
02903     2, G_TYPE_STRV, G_TYPE_STRV);
02904 
02905 }
02906 
02907 typedef BamfDBusMatcherIface BamfDBusMatcherInterface;
02908 G_DEFINE_INTERFACE (BamfDBusMatcher, bamf_dbus_matcher, G_TYPE_OBJECT);
02909 
02918 void
02919 bamf_dbus_matcher_emit_active_application_changed (
02920     BamfDBusMatcher *object,
02921     const gchar *arg_old_app,
02922     const gchar *arg_new_app)
02923 {
02924   g_signal_emit_by_name (object, "active-application-changed", arg_old_app, arg_new_app);
02925 }
02926 
02935 void
02936 bamf_dbus_matcher_emit_active_window_changed (
02937     BamfDBusMatcher *object,
02938     const gchar *arg_old_win,
02939     const gchar *arg_new_win)
02940 {
02941   g_signal_emit_by_name (object, "active-window-changed", arg_old_win, arg_new_win);
02942 }
02943 
02952 void
02953 bamf_dbus_matcher_emit_view_closed (
02954     BamfDBusMatcher *object,
02955     const gchar *arg_path,
02956     const gchar *arg_type)
02957 {
02958   g_signal_emit_by_name (object, "view-closed", arg_path, arg_type);
02959 }
02960 
02969 void
02970 bamf_dbus_matcher_emit_view_opened (
02971     BamfDBusMatcher *object,
02972     const gchar *arg_path,
02973     const gchar *arg_type)
02974 {
02975   g_signal_emit_by_name (object, "view-opened", arg_path, arg_type);
02976 }
02977 
02984 void
02985 bamf_dbus_matcher_emit_stacking_order_changed (
02986     BamfDBusMatcher *object)
02987 {
02988   g_signal_emit_by_name (object, "stacking-order-changed");
02989 }
02990 
02999 void
03000 bamf_dbus_matcher_emit_running_applications_changed (
03001     BamfDBusMatcher *object,
03002     const gchar *const *arg_opened_desktop_files,
03003     const gchar *const *arg_closed_desktop_files)
03004 {
03005   g_signal_emit_by_name (object, "running-applications-changed", arg_opened_desktop_files, arg_closed_desktop_files);
03006 }
03007 
03022 void
03023 bamf_dbus_matcher_call_xids_for_application (
03024     BamfDBusMatcher *proxy,
03025     const gchar *arg_desktop_file,
03026     GCancellable *cancellable,
03027     GAsyncReadyCallback callback,
03028     gpointer user_data)
03029 {
03030   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03031     "XidsForApplication",
03032     g_variant_new ("(s)",
03033                    arg_desktop_file),
03034     G_DBUS_CALL_FLAGS_NONE,
03035     -1,
03036     cancellable,
03037     callback,
03038     user_data);
03039 }
03040 
03052 gboolean
03053 bamf_dbus_matcher_call_xids_for_application_finish (
03054     BamfDBusMatcher *proxy,
03055     GVariant **out_xids,
03056     GAsyncResult *res,
03057     GError **error)
03058 {
03059   GVariant *_ret;
03060   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03061   if (_ret == NULL)
03062     goto _out;
03063   g_variant_get (_ret,
03064                  "(@au)",
03065                  out_xids);
03066   g_variant_unref (_ret);
03067 _out:
03068   return _ret != NULL;
03069 }
03070 
03085 gboolean
03086 bamf_dbus_matcher_call_xids_for_application_sync (
03087     BamfDBusMatcher *proxy,
03088     const gchar *arg_desktop_file,
03089     GVariant **out_xids,
03090     GCancellable *cancellable,
03091     GError **error)
03092 {
03093   GVariant *_ret;
03094   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03095     "XidsForApplication",
03096     g_variant_new ("(s)",
03097                    arg_desktop_file),
03098     G_DBUS_CALL_FLAGS_NONE,
03099     -1,
03100     cancellable,
03101     error);
03102   if (_ret == NULL)
03103     goto _out;
03104   g_variant_get (_ret,
03105                  "(@au)",
03106                  out_xids);
03107   g_variant_unref (_ret);
03108 _out:
03109   return _ret != NULL;
03110 }
03111 
03125 void
03126 bamf_dbus_matcher_call_tab_paths (
03127     BamfDBusMatcher *proxy,
03128     GCancellable *cancellable,
03129     GAsyncReadyCallback callback,
03130     gpointer user_data)
03131 {
03132   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03133     "TabPaths",
03134     g_variant_new ("()"),
03135     G_DBUS_CALL_FLAGS_NONE,
03136     -1,
03137     cancellable,
03138     callback,
03139     user_data);
03140 }
03141 
03153 gboolean
03154 bamf_dbus_matcher_call_tab_paths_finish (
03155     BamfDBusMatcher *proxy,
03156     gchar ***out_paths,
03157     GAsyncResult *res,
03158     GError **error)
03159 {
03160   GVariant *_ret;
03161   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03162   if (_ret == NULL)
03163     goto _out;
03164   g_variant_get (_ret,
03165                  "(^as)",
03166                  out_paths);
03167   g_variant_unref (_ret);
03168 _out:
03169   return _ret != NULL;
03170 }
03171 
03185 gboolean
03186 bamf_dbus_matcher_call_tab_paths_sync (
03187     BamfDBusMatcher *proxy,
03188     gchar ***out_paths,
03189     GCancellable *cancellable,
03190     GError **error)
03191 {
03192   GVariant *_ret;
03193   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03194     "TabPaths",
03195     g_variant_new ("()"),
03196     G_DBUS_CALL_FLAGS_NONE,
03197     -1,
03198     cancellable,
03199     error);
03200   if (_ret == NULL)
03201     goto _out;
03202   g_variant_get (_ret,
03203                  "(^as)",
03204                  out_paths);
03205   g_variant_unref (_ret);
03206 _out:
03207   return _ret != NULL;
03208 }
03209 
03223 void
03224 bamf_dbus_matcher_call_running_applications (
03225     BamfDBusMatcher *proxy,
03226     GCancellable *cancellable,
03227     GAsyncReadyCallback callback,
03228     gpointer user_data)
03229 {
03230   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03231     "RunningApplications",
03232     g_variant_new ("()"),
03233     G_DBUS_CALL_FLAGS_NONE,
03234     -1,
03235     cancellable,
03236     callback,
03237     user_data);
03238 }
03239 
03251 gboolean
03252 bamf_dbus_matcher_call_running_applications_finish (
03253     BamfDBusMatcher *proxy,
03254     gchar ***out_paths,
03255     GAsyncResult *res,
03256     GError **error)
03257 {
03258   GVariant *_ret;
03259   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03260   if (_ret == NULL)
03261     goto _out;
03262   g_variant_get (_ret,
03263                  "(^as)",
03264                  out_paths);
03265   g_variant_unref (_ret);
03266 _out:
03267   return _ret != NULL;
03268 }
03269 
03283 gboolean
03284 bamf_dbus_matcher_call_running_applications_sync (
03285     BamfDBusMatcher *proxy,
03286     gchar ***out_paths,
03287     GCancellable *cancellable,
03288     GError **error)
03289 {
03290   GVariant *_ret;
03291   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03292     "RunningApplications",
03293     g_variant_new ("()"),
03294     G_DBUS_CALL_FLAGS_NONE,
03295     -1,
03296     cancellable,
03297     error);
03298   if (_ret == NULL)
03299     goto _out;
03300   g_variant_get (_ret,
03301                  "(^as)",
03302                  out_paths);
03303   g_variant_unref (_ret);
03304 _out:
03305   return _ret != NULL;
03306 }
03307 
03321 void
03322 bamf_dbus_matcher_call_running_applications_desktop_files (
03323     BamfDBusMatcher *proxy,
03324     GCancellable *cancellable,
03325     GAsyncReadyCallback callback,
03326     gpointer user_data)
03327 {
03328   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03329     "RunningApplicationsDesktopFiles",
03330     g_variant_new ("()"),
03331     G_DBUS_CALL_FLAGS_NONE,
03332     -1,
03333     cancellable,
03334     callback,
03335     user_data);
03336 }
03337 
03349 gboolean
03350 bamf_dbus_matcher_call_running_applications_desktop_files_finish (
03351     BamfDBusMatcher *proxy,
03352     gchar ***out_paths,
03353     GAsyncResult *res,
03354     GError **error)
03355 {
03356   GVariant *_ret;
03357   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03358   if (_ret == NULL)
03359     goto _out;
03360   g_variant_get (_ret,
03361                  "(^as)",
03362                  out_paths);
03363   g_variant_unref (_ret);
03364 _out:
03365   return _ret != NULL;
03366 }
03367 
03381 gboolean
03382 bamf_dbus_matcher_call_running_applications_desktop_files_sync (
03383     BamfDBusMatcher *proxy,
03384     gchar ***out_paths,
03385     GCancellable *cancellable,
03386     GError **error)
03387 {
03388   GVariant *_ret;
03389   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03390     "RunningApplicationsDesktopFiles",
03391     g_variant_new ("()"),
03392     G_DBUS_CALL_FLAGS_NONE,
03393     -1,
03394     cancellable,
03395     error);
03396   if (_ret == NULL)
03397     goto _out;
03398   g_variant_get (_ret,
03399                  "(^as)",
03400                  out_paths);
03401   g_variant_unref (_ret);
03402 _out:
03403   return _ret != NULL;
03404 }
03405 
03420 void
03421 bamf_dbus_matcher_call_register_favorites (
03422     BamfDBusMatcher *proxy,
03423     const gchar *const *arg_favorites,
03424     GCancellable *cancellable,
03425     GAsyncReadyCallback callback,
03426     gpointer user_data)
03427 {
03428   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03429     "RegisterFavorites",
03430     g_variant_new ("(^as)",
03431                    arg_favorites),
03432     G_DBUS_CALL_FLAGS_NONE,
03433     -1,
03434     cancellable,
03435     callback,
03436     user_data);
03437 }
03438 
03449 gboolean
03450 bamf_dbus_matcher_call_register_favorites_finish (
03451     BamfDBusMatcher *proxy,
03452     GAsyncResult *res,
03453     GError **error)
03454 {
03455   GVariant *_ret;
03456   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03457   if (_ret == NULL)
03458     goto _out;
03459   g_variant_get (_ret,
03460                  "()");
03461   g_variant_unref (_ret);
03462 _out:
03463   return _ret != NULL;
03464 }
03465 
03479 gboolean
03480 bamf_dbus_matcher_call_register_favorites_sync (
03481     BamfDBusMatcher *proxy,
03482     const gchar *const *arg_favorites,
03483     GCancellable *cancellable,
03484     GError **error)
03485 {
03486   GVariant *_ret;
03487   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03488     "RegisterFavorites",
03489     g_variant_new ("(^as)",
03490                    arg_favorites),
03491     G_DBUS_CALL_FLAGS_NONE,
03492     -1,
03493     cancellable,
03494     error);
03495   if (_ret == NULL)
03496     goto _out;
03497   g_variant_get (_ret,
03498                  "()");
03499   g_variant_unref (_ret);
03500 _out:
03501   return _ret != NULL;
03502 }
03503 
03518 void
03519 bamf_dbus_matcher_call_path_for_application (
03520     BamfDBusMatcher *proxy,
03521     const gchar *arg_desktop_file,
03522     GCancellable *cancellable,
03523     GAsyncReadyCallback callback,
03524     gpointer user_data)
03525 {
03526   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03527     "PathForApplication",
03528     g_variant_new ("(s)",
03529                    arg_desktop_file),
03530     G_DBUS_CALL_FLAGS_NONE,
03531     -1,
03532     cancellable,
03533     callback,
03534     user_data);
03535 }
03536 
03548 gboolean
03549 bamf_dbus_matcher_call_path_for_application_finish (
03550     BamfDBusMatcher *proxy,
03551     gchar **out_path,
03552     GAsyncResult *res,
03553     GError **error)
03554 {
03555   GVariant *_ret;
03556   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03557   if (_ret == NULL)
03558     goto _out;
03559   g_variant_get (_ret,
03560                  "(s)",
03561                  out_path);
03562   g_variant_unref (_ret);
03563 _out:
03564   return _ret != NULL;
03565 }
03566 
03581 gboolean
03582 bamf_dbus_matcher_call_path_for_application_sync (
03583     BamfDBusMatcher *proxy,
03584     const gchar *arg_desktop_file,
03585     gchar **out_path,
03586     GCancellable *cancellable,
03587     GError **error)
03588 {
03589   GVariant *_ret;
03590   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03591     "PathForApplication",
03592     g_variant_new ("(s)",
03593                    arg_desktop_file),
03594     G_DBUS_CALL_FLAGS_NONE,
03595     -1,
03596     cancellable,
03597     error);
03598   if (_ret == NULL)
03599     goto _out;
03600   g_variant_get (_ret,
03601                  "(s)",
03602                  out_path);
03603   g_variant_unref (_ret);
03604 _out:
03605   return _ret != NULL;
03606 }
03607 
03621 void
03622 bamf_dbus_matcher_call_window_paths (
03623     BamfDBusMatcher *proxy,
03624     GCancellable *cancellable,
03625     GAsyncReadyCallback callback,
03626     gpointer user_data)
03627 {
03628   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03629     "WindowPaths",
03630     g_variant_new ("()"),
03631     G_DBUS_CALL_FLAGS_NONE,
03632     -1,
03633     cancellable,
03634     callback,
03635     user_data);
03636 }
03637 
03649 gboolean
03650 bamf_dbus_matcher_call_window_paths_finish (
03651     BamfDBusMatcher *proxy,
03652     gchar ***out_paths,
03653     GAsyncResult *res,
03654     GError **error)
03655 {
03656   GVariant *_ret;
03657   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03658   if (_ret == NULL)
03659     goto _out;
03660   g_variant_get (_ret,
03661                  "(^as)",
03662                  out_paths);
03663   g_variant_unref (_ret);
03664 _out:
03665   return _ret != NULL;
03666 }
03667 
03681 gboolean
03682 bamf_dbus_matcher_call_window_paths_sync (
03683     BamfDBusMatcher *proxy,
03684     gchar ***out_paths,
03685     GCancellable *cancellable,
03686     GError **error)
03687 {
03688   GVariant *_ret;
03689   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03690     "WindowPaths",
03691     g_variant_new ("()"),
03692     G_DBUS_CALL_FLAGS_NONE,
03693     -1,
03694     cancellable,
03695     error);
03696   if (_ret == NULL)
03697     goto _out;
03698   g_variant_get (_ret,
03699                  "(^as)",
03700                  out_paths);
03701   g_variant_unref (_ret);
03702 _out:
03703   return _ret != NULL;
03704 }
03705 
03719 void
03720 bamf_dbus_matcher_call_application_paths (
03721     BamfDBusMatcher *proxy,
03722     GCancellable *cancellable,
03723     GAsyncReadyCallback callback,
03724     gpointer user_data)
03725 {
03726   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03727     "ApplicationPaths",
03728     g_variant_new ("()"),
03729     G_DBUS_CALL_FLAGS_NONE,
03730     -1,
03731     cancellable,
03732     callback,
03733     user_data);
03734 }
03735 
03747 gboolean
03748 bamf_dbus_matcher_call_application_paths_finish (
03749     BamfDBusMatcher *proxy,
03750     gchar ***out_paths,
03751     GAsyncResult *res,
03752     GError **error)
03753 {
03754   GVariant *_ret;
03755   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03756   if (_ret == NULL)
03757     goto _out;
03758   g_variant_get (_ret,
03759                  "(^as)",
03760                  out_paths);
03761   g_variant_unref (_ret);
03762 _out:
03763   return _ret != NULL;
03764 }
03765 
03779 gboolean
03780 bamf_dbus_matcher_call_application_paths_sync (
03781     BamfDBusMatcher *proxy,
03782     gchar ***out_paths,
03783     GCancellable *cancellable,
03784     GError **error)
03785 {
03786   GVariant *_ret;
03787   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03788     "ApplicationPaths",
03789     g_variant_new ("()"),
03790     G_DBUS_CALL_FLAGS_NONE,
03791     -1,
03792     cancellable,
03793     error);
03794   if (_ret == NULL)
03795     goto _out;
03796   g_variant_get (_ret,
03797                  "(^as)",
03798                  out_paths);
03799   g_variant_unref (_ret);
03800 _out:
03801   return _ret != NULL;
03802 }
03803 
03818 void
03819 bamf_dbus_matcher_call_application_is_running (
03820     BamfDBusMatcher *proxy,
03821     const gchar *arg_desktop_file,
03822     GCancellable *cancellable,
03823     GAsyncReadyCallback callback,
03824     gpointer user_data)
03825 {
03826   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03827     "ApplicationIsRunning",
03828     g_variant_new ("(s)",
03829                    arg_desktop_file),
03830     G_DBUS_CALL_FLAGS_NONE,
03831     -1,
03832     cancellable,
03833     callback,
03834     user_data);
03835 }
03836 
03848 gboolean
03849 bamf_dbus_matcher_call_application_is_running_finish (
03850     BamfDBusMatcher *proxy,
03851     gboolean *out_running,
03852     GAsyncResult *res,
03853     GError **error)
03854 {
03855   GVariant *_ret;
03856   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03857   if (_ret == NULL)
03858     goto _out;
03859   g_variant_get (_ret,
03860                  "(b)",
03861                  out_running);
03862   g_variant_unref (_ret);
03863 _out:
03864   return _ret != NULL;
03865 }
03866 
03881 gboolean
03882 bamf_dbus_matcher_call_application_is_running_sync (
03883     BamfDBusMatcher *proxy,
03884     const gchar *arg_desktop_file,
03885     gboolean *out_running,
03886     GCancellable *cancellable,
03887     GError **error)
03888 {
03889   GVariant *_ret;
03890   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03891     "ApplicationIsRunning",
03892     g_variant_new ("(s)",
03893                    arg_desktop_file),
03894     G_DBUS_CALL_FLAGS_NONE,
03895     -1,
03896     cancellable,
03897     error);
03898   if (_ret == NULL)
03899     goto _out;
03900   g_variant_get (_ret,
03901                  "(b)",
03902                  out_running);
03903   g_variant_unref (_ret);
03904 _out:
03905   return _ret != NULL;
03906 }
03907 
03922 void
03923 bamf_dbus_matcher_call_application_for_xid (
03924     BamfDBusMatcher *proxy,
03925     guint arg_xid,
03926     GCancellable *cancellable,
03927     GAsyncReadyCallback callback,
03928     gpointer user_data)
03929 {
03930   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
03931     "ApplicationForXid",
03932     g_variant_new ("(u)",
03933                    arg_xid),
03934     G_DBUS_CALL_FLAGS_NONE,
03935     -1,
03936     cancellable,
03937     callback,
03938     user_data);
03939 }
03940 
03952 gboolean
03953 bamf_dbus_matcher_call_application_for_xid_finish (
03954     BamfDBusMatcher *proxy,
03955     gchar **out_application,
03956     GAsyncResult *res,
03957     GError **error)
03958 {
03959   GVariant *_ret;
03960   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
03961   if (_ret == NULL)
03962     goto _out;
03963   g_variant_get (_ret,
03964                  "(s)",
03965                  out_application);
03966   g_variant_unref (_ret);
03967 _out:
03968   return _ret != NULL;
03969 }
03970 
03985 gboolean
03986 bamf_dbus_matcher_call_application_for_xid_sync (
03987     BamfDBusMatcher *proxy,
03988     guint arg_xid,
03989     gchar **out_application,
03990     GCancellable *cancellable,
03991     GError **error)
03992 {
03993   GVariant *_ret;
03994   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
03995     "ApplicationForXid",
03996     g_variant_new ("(u)",
03997                    arg_xid),
03998     G_DBUS_CALL_FLAGS_NONE,
03999     -1,
04000     cancellable,
04001     error);
04002   if (_ret == NULL)
04003     goto _out;
04004   g_variant_get (_ret,
04005                  "(s)",
04006                  out_application);
04007   g_variant_unref (_ret);
04008 _out:
04009   return _ret != NULL;
04010 }
04011 
04025 void
04026 bamf_dbus_matcher_call_active_window (
04027     BamfDBusMatcher *proxy,
04028     GCancellable *cancellable,
04029     GAsyncReadyCallback callback,
04030     gpointer user_data)
04031 {
04032   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
04033     "ActiveWindow",
04034     g_variant_new ("()"),
04035     G_DBUS_CALL_FLAGS_NONE,
04036     -1,
04037     cancellable,
04038     callback,
04039     user_data);
04040 }
04041 
04053 gboolean
04054 bamf_dbus_matcher_call_active_window_finish (
04055     BamfDBusMatcher *proxy,
04056     gchar **out_window,
04057     GAsyncResult *res,
04058     GError **error)
04059 {
04060   GVariant *_ret;
04061   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
04062   if (_ret == NULL)
04063     goto _out;
04064   g_variant_get (_ret,
04065                  "(s)",
04066                  out_window);
04067   g_variant_unref (_ret);
04068 _out:
04069   return _ret != NULL;
04070 }
04071 
04085 gboolean
04086 bamf_dbus_matcher_call_active_window_sync (
04087     BamfDBusMatcher *proxy,
04088     gchar **out_window,
04089     GCancellable *cancellable,
04090     GError **error)
04091 {
04092   GVariant *_ret;
04093   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
04094     "ActiveWindow",
04095     g_variant_new ("()"),
04096     G_DBUS_CALL_FLAGS_NONE,
04097     -1,
04098     cancellable,
04099     error);
04100   if (_ret == NULL)
04101     goto _out;
04102   g_variant_get (_ret,
04103                  "(s)",
04104                  out_window);
04105   g_variant_unref (_ret);
04106 _out:
04107   return _ret != NULL;
04108 }
04109 
04123 void
04124 bamf_dbus_matcher_call_active_application (
04125     BamfDBusMatcher *proxy,
04126     GCancellable *cancellable,
04127     GAsyncReadyCallback callback,
04128     gpointer user_data)
04129 {
04130   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
04131     "ActiveApplication",
04132     g_variant_new ("()"),
04133     G_DBUS_CALL_FLAGS_NONE,
04134     -1,
04135     cancellable,
04136     callback,
04137     user_data);
04138 }
04139 
04151 gboolean
04152 bamf_dbus_matcher_call_active_application_finish (
04153     BamfDBusMatcher *proxy,
04154     gchar **out_application,
04155     GAsyncResult *res,
04156     GError **error)
04157 {
04158   GVariant *_ret;
04159   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
04160   if (_ret == NULL)
04161     goto _out;
04162   g_variant_get (_ret,
04163                  "(s)",
04164                  out_application);
04165   g_variant_unref (_ret);
04166 _out:
04167   return _ret != NULL;
04168 }
04169 
04183 gboolean
04184 bamf_dbus_matcher_call_active_application_sync (
04185     BamfDBusMatcher *proxy,
04186     gchar **out_application,
04187     GCancellable *cancellable,
04188     GError **error)
04189 {
04190   GVariant *_ret;
04191   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
04192     "ActiveApplication",
04193     g_variant_new ("()"),
04194     G_DBUS_CALL_FLAGS_NONE,
04195     -1,
04196     cancellable,
04197     error);
04198   if (_ret == NULL)
04199     goto _out;
04200   g_variant_get (_ret,
04201                  "(s)",
04202                  out_application);
04203   g_variant_unref (_ret);
04204 _out:
04205   return _ret != NULL;
04206 }
04207 
04222 void
04223 bamf_dbus_matcher_call_window_stack_for_monitor (
04224     BamfDBusMatcher *proxy,
04225     gint arg_monitor_id,
04226     GCancellable *cancellable,
04227     GAsyncReadyCallback callback,
04228     gpointer user_data)
04229 {
04230   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
04231     "WindowStackForMonitor",
04232     g_variant_new ("(i)",
04233                    arg_monitor_id),
04234     G_DBUS_CALL_FLAGS_NONE,
04235     -1,
04236     cancellable,
04237     callback,
04238     user_data);
04239 }
04240 
04252 gboolean
04253 bamf_dbus_matcher_call_window_stack_for_monitor_finish (
04254     BamfDBusMatcher *proxy,
04255     gchar ***out_window_list,
04256     GAsyncResult *res,
04257     GError **error)
04258 {
04259   GVariant *_ret;
04260   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
04261   if (_ret == NULL)
04262     goto _out;
04263   g_variant_get (_ret,
04264                  "(^as)",
04265                  out_window_list);
04266   g_variant_unref (_ret);
04267 _out:
04268   return _ret != NULL;
04269 }
04270 
04285 gboolean
04286 bamf_dbus_matcher_call_window_stack_for_monitor_sync (
04287     BamfDBusMatcher *proxy,
04288     gint arg_monitor_id,
04289     gchar ***out_window_list,
04290     GCancellable *cancellable,
04291     GError **error)
04292 {
04293   GVariant *_ret;
04294   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
04295     "WindowStackForMonitor",
04296     g_variant_new ("(i)",
04297                    arg_monitor_id),
04298     G_DBUS_CALL_FLAGS_NONE,
04299     -1,
04300     cancellable,
04301     error);
04302   if (_ret == NULL)
04303     goto _out;
04304   g_variant_get (_ret,
04305                  "(^as)",
04306                  out_window_list);
04307   g_variant_unref (_ret);
04308 _out:
04309   return _ret != NULL;
04310 }
04311 
04322 void
04323 bamf_dbus_matcher_complete_xids_for_application (
04324     BamfDBusMatcher *object,
04325     GDBusMethodInvocation *invocation,
04326     GVariant *xids)
04327 {
04328   g_dbus_method_invocation_return_value (invocation,
04329     g_variant_new ("(@au)",
04330                    xids));
04331 }
04332 
04343 void
04344 bamf_dbus_matcher_complete_tab_paths (
04345     BamfDBusMatcher *object,
04346     GDBusMethodInvocation *invocation,
04347     const gchar *const *paths)
04348 {
04349   g_dbus_method_invocation_return_value (invocation,
04350     g_variant_new ("(^as)",
04351                    paths));
04352 }
04353 
04364 void
04365 bamf_dbus_matcher_complete_running_applications (
04366     BamfDBusMatcher *object,
04367     GDBusMethodInvocation *invocation,
04368     const gchar *const *paths)
04369 {
04370   g_dbus_method_invocation_return_value (invocation,
04371     g_variant_new ("(^as)",
04372                    paths));
04373 }
04374 
04385 void
04386 bamf_dbus_matcher_complete_running_applications_desktop_files (
04387     BamfDBusMatcher *object,
04388     GDBusMethodInvocation *invocation,
04389     const gchar *const *paths)
04390 {
04391   g_dbus_method_invocation_return_value (invocation,
04392     g_variant_new ("(^as)",
04393                    paths));
04394 }
04395 
04405 void
04406 bamf_dbus_matcher_complete_register_favorites (
04407     BamfDBusMatcher *object,
04408     GDBusMethodInvocation *invocation)
04409 {
04410   g_dbus_method_invocation_return_value (invocation,
04411     g_variant_new ("()"));
04412 }
04413 
04424 void
04425 bamf_dbus_matcher_complete_path_for_application (
04426     BamfDBusMatcher *object,
04427     GDBusMethodInvocation *invocation,
04428     const gchar *path)
04429 {
04430   g_dbus_method_invocation_return_value (invocation,
04431     g_variant_new ("(s)",
04432                    path));
04433 }
04434 
04445 void
04446 bamf_dbus_matcher_complete_window_paths (
04447     BamfDBusMatcher *object,
04448     GDBusMethodInvocation *invocation,
04449     const gchar *const *paths)
04450 {
04451   g_dbus_method_invocation_return_value (invocation,
04452     g_variant_new ("(^as)",
04453                    paths));
04454 }
04455 
04466 void
04467 bamf_dbus_matcher_complete_application_paths (
04468     BamfDBusMatcher *object,
04469     GDBusMethodInvocation *invocation,
04470     const gchar *const *paths)
04471 {
04472   g_dbus_method_invocation_return_value (invocation,
04473     g_variant_new ("(^as)",
04474                    paths));
04475 }
04476 
04487 void
04488 bamf_dbus_matcher_complete_application_is_running (
04489     BamfDBusMatcher *object,
04490     GDBusMethodInvocation *invocation,
04491     gboolean running)
04492 {
04493   g_dbus_method_invocation_return_value (invocation,
04494     g_variant_new ("(b)",
04495                    running));
04496 }
04497 
04508 void
04509 bamf_dbus_matcher_complete_application_for_xid (
04510     BamfDBusMatcher *object,
04511     GDBusMethodInvocation *invocation,
04512     const gchar *application)
04513 {
04514   g_dbus_method_invocation_return_value (invocation,
04515     g_variant_new ("(s)",
04516                    application));
04517 }
04518 
04529 void
04530 bamf_dbus_matcher_complete_active_window (
04531     BamfDBusMatcher *object,
04532     GDBusMethodInvocation *invocation,
04533     const gchar *window)
04534 {
04535   g_dbus_method_invocation_return_value (invocation,
04536     g_variant_new ("(s)",
04537                    window));
04538 }
04539 
04550 void
04551 bamf_dbus_matcher_complete_active_application (
04552     BamfDBusMatcher *object,
04553     GDBusMethodInvocation *invocation,
04554     const gchar *application)
04555 {
04556   g_dbus_method_invocation_return_value (invocation,
04557     g_variant_new ("(s)",
04558                    application));
04559 }
04560 
04571 void
04572 bamf_dbus_matcher_complete_window_stack_for_monitor (
04573     BamfDBusMatcher *object,
04574     GDBusMethodInvocation *invocation,
04575     const gchar *const *window_list)
04576 {
04577   g_dbus_method_invocation_return_value (invocation,
04578     g_variant_new ("(^as)",
04579                    window_list));
04580 }
04581 
04582 /* ------------------------------------------------------------------------ */
04583 
04597 struct _BamfDBusMatcherProxyPrivate
04598 {
04599   GData *qdata;
04600 };
04601 
04602 static void bamf_dbus_matcher_proxy_iface_init (BamfDBusMatcherIface *iface);
04603 
04604 G_DEFINE_TYPE_WITH_CODE (BamfDBusMatcherProxy, bamf_dbus_matcher_proxy, G_TYPE_DBUS_PROXY,
04605                          G_IMPLEMENT_INTERFACE (BAMF_DBUS_TYPE_MATCHER, bamf_dbus_matcher_proxy_iface_init));
04606 
04607 static void
04608 bamf_dbus_matcher_proxy_finalize (GObject *object)
04609 {
04610   BamfDBusMatcherProxy *proxy = BAMF_DBUS_MATCHER_PROXY (object);
04611   g_datalist_clear (&proxy->priv->qdata);
04612   G_OBJECT_CLASS (bamf_dbus_matcher_proxy_parent_class)->finalize (object);
04613 }
04614 
04615 static void
04616 bamf_dbus_matcher_proxy_get_property (GObject      *object,
04617   guint         prop_id,
04618   GValue       *value,
04619   GParamSpec   *pspec)
04620 {
04621 }
04622 
04623 static void
04624 bamf_dbus_matcher_proxy_set_property (GObject      *object,
04625   guint         prop_id,
04626   const GValue *value,
04627   GParamSpec   *pspec)
04628 {
04629 }
04630 
04631 static void
04632 bamf_dbus_matcher_proxy_g_signal (GDBusProxy *proxy,
04633   const gchar *sender_name,
04634   const gchar *signal_name,
04635   GVariant *parameters)
04636 {
04637   _ExtendedGDBusSignalInfo *info;
04638   GVariantIter iter;
04639   GVariant *child;
04640   GValue *paramv;
04641   guint num_params;
04642   guint n;
04643   guint signal_id;
04644   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_bamf_dbus_matcher_interface_info, signal_name);
04645   if (info == NULL)
04646     return;
04647   num_params = g_variant_n_children (parameters);
04648   paramv = g_new0 (GValue, num_params + 1);
04649   g_value_init (&paramv[0], BAMF_DBUS_TYPE_MATCHER);
04650   g_value_set_object (&paramv[0], proxy);
04651   g_variant_iter_init (&iter, parameters);
04652   n = 1;
04653   while ((child = g_variant_iter_next_value (&iter)) != NULL)
04654     {
04655       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
04656       if (arg_info->use_gvariant)
04657         {
04658           g_value_init (&paramv[n], G_TYPE_VARIANT);
04659           g_value_set_variant (&paramv[n], child);
04660           n++;
04661         }
04662       else
04663         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
04664       g_variant_unref (child);
04665     }
04666   signal_id = g_signal_lookup (info->signal_name, BAMF_DBUS_TYPE_MATCHER);
04667   g_signal_emitv (paramv, signal_id, 0, NULL);
04668   for (n = 0; n < num_params + 1; n++)
04669     g_value_unset (&paramv[n]);
04670   g_free (paramv);
04671 }
04672 
04673 static void
04674 bamf_dbus_matcher_proxy_g_properties_changed (GDBusProxy *_proxy,
04675   GVariant *changed_properties,
04676   const gchar *const *invalidated_properties)
04677 {
04678   BamfDBusMatcherProxy *proxy = BAMF_DBUS_MATCHER_PROXY (_proxy);
04679   guint n;
04680   const gchar *key;
04681   GVariantIter *iter;
04682   _ExtendedGDBusPropertyInfo *info;
04683   g_variant_get (changed_properties, "a{sv}", &iter);
04684   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
04685     {
04686       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_matcher_interface_info, key);
04687       g_datalist_remove_data (&proxy->priv->qdata, key);
04688       if (info != NULL)
04689         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
04690     }
04691   g_variant_iter_free (iter);
04692   for (n = 0; invalidated_properties[n] != NULL; n++)
04693     {
04694       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_matcher_interface_info, invalidated_properties[n]);
04695       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
04696       if (info != NULL)
04697         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
04698     }
04699 }
04700 
04701 static void
04702 bamf_dbus_matcher_proxy_init (BamfDBusMatcherProxy *proxy)
04703 {
04704   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, BAMF_DBUS_TYPE_MATCHER_PROXY, BamfDBusMatcherProxyPrivate);
04705   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), bamf_dbus_matcher_interface_info ());
04706 }
04707 
04708 static void
04709 bamf_dbus_matcher_proxy_class_init (BamfDBusMatcherProxyClass *klass)
04710 {
04711   GObjectClass *gobject_class;
04712   GDBusProxyClass *proxy_class;
04713 
04714   g_type_class_add_private (klass, sizeof (BamfDBusMatcherProxyPrivate));
04715 
04716   gobject_class = G_OBJECT_CLASS (klass);
04717   gobject_class->finalize     = bamf_dbus_matcher_proxy_finalize;
04718   gobject_class->get_property = bamf_dbus_matcher_proxy_get_property;
04719   gobject_class->set_property = bamf_dbus_matcher_proxy_set_property;
04720 
04721   proxy_class = G_DBUS_PROXY_CLASS (klass);
04722   proxy_class->g_signal = bamf_dbus_matcher_proxy_g_signal;
04723   proxy_class->g_properties_changed = bamf_dbus_matcher_proxy_g_properties_changed;
04724 
04725 }
04726 
04727 static void
04728 bamf_dbus_matcher_proxy_iface_init (BamfDBusMatcherIface *iface)
04729 {
04730 }
04731 
04749 void
04750 bamf_dbus_matcher_proxy_new (
04751     GDBusConnection     *connection,
04752     GDBusProxyFlags      flags,
04753     const gchar         *name,
04754     const gchar         *object_path,
04755     GCancellable        *cancellable,
04756     GAsyncReadyCallback  callback,
04757     gpointer             user_data)
04758 {
04759   g_async_initable_new_async (BAMF_DBUS_TYPE_MATCHER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.matcher", NULL);
04760 }
04761 
04771 BamfDBusMatcher *
04772 bamf_dbus_matcher_proxy_new_finish (
04773     GAsyncResult        *res,
04774     GError             **error)
04775 {
04776   GObject *ret;
04777   GObject *source_object;
04778   source_object = g_async_result_get_source_object (res);
04779   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
04780   g_object_unref (source_object);
04781   if (ret != NULL)
04782     return BAMF_DBUS_MATCHER (ret);
04783   else
04784     return NULL;
04785 }
04786 
04804 BamfDBusMatcher *
04805 bamf_dbus_matcher_proxy_new_sync (
04806     GDBusConnection     *connection,
04807     GDBusProxyFlags      flags,
04808     const gchar         *name,
04809     const gchar         *object_path,
04810     GCancellable        *cancellable,
04811     GError             **error)
04812 {
04813   GInitable *ret;
04814   ret = g_initable_new (BAMF_DBUS_TYPE_MATCHER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.matcher", NULL);
04815   if (ret != NULL)
04816     return BAMF_DBUS_MATCHER (ret);
04817   else
04818     return NULL;
04819 }
04820 
04821 
04839 void
04840 bamf_dbus_matcher_proxy_new_for_bus (
04841     GBusType             bus_type,
04842     GDBusProxyFlags      flags,
04843     const gchar         *name,
04844     const gchar         *object_path,
04845     GCancellable        *cancellable,
04846     GAsyncReadyCallback  callback,
04847     gpointer             user_data)
04848 {
04849   g_async_initable_new_async (BAMF_DBUS_TYPE_MATCHER_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.matcher", NULL);
04850 }
04851 
04861 BamfDBusMatcher *
04862 bamf_dbus_matcher_proxy_new_for_bus_finish (
04863     GAsyncResult        *res,
04864     GError             **error)
04865 {
04866   GObject *ret;
04867   GObject *source_object;
04868   source_object = g_async_result_get_source_object (res);
04869   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
04870   g_object_unref (source_object);
04871   if (ret != NULL)
04872     return BAMF_DBUS_MATCHER (ret);
04873   else
04874     return NULL;
04875 }
04876 
04894 BamfDBusMatcher *
04895 bamf_dbus_matcher_proxy_new_for_bus_sync (
04896     GBusType             bus_type,
04897     GDBusProxyFlags      flags,
04898     const gchar         *name,
04899     const gchar         *object_path,
04900     GCancellable        *cancellable,
04901     GError             **error)
04902 {
04903   GInitable *ret;
04904   ret = g_initable_new (BAMF_DBUS_TYPE_MATCHER_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.ayatana.bamf.matcher", NULL);
04905   if (ret != NULL)
04906     return BAMF_DBUS_MATCHER (ret);
04907   else
04908     return NULL;
04909 }
04910 
04911 
04912 /* ------------------------------------------------------------------------ */
04913 
04927 struct _BamfDBusMatcherSkeletonPrivate
04928 {
04929   GValue *properties;
04930   GList *changed_properties;
04931   GSource *changed_properties_idle_source;
04932   GMainContext *context;
04933   GMutex lock;
04934 };
04935 
04936 static void
04937 _bamf_dbus_matcher_skeleton_handle_method_call (
04938   GDBusConnection *connection,
04939   const gchar *sender,
04940   const gchar *object_path,
04941   const gchar *interface_name,
04942   const gchar *method_name,
04943   GVariant *parameters,
04944   GDBusMethodInvocation *invocation,
04945   gpointer user_data)
04946 {
04947   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (user_data);
04948   _ExtendedGDBusMethodInfo *info;
04949   GVariantIter iter;
04950   GVariant *child;
04951   GValue *paramv;
04952   guint num_params;
04953   guint num_extra;
04954   guint n;
04955   guint signal_id;
04956   GValue return_value = G_VALUE_INIT;
04957   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
04958   g_assert (info != NULL);
04959   num_params = g_variant_n_children (parameters);
04960   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
04961   n = 0;
04962   g_value_init (&paramv[n], BAMF_DBUS_TYPE_MATCHER);
04963   g_value_set_object (&paramv[n++], skeleton);
04964   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
04965   g_value_set_object (&paramv[n++], invocation);
04966   if (info->pass_fdlist)
04967     {
04968 #ifdef G_OS_UNIX
04969       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
04970       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
04971 #else
04972       g_assert_not_reached ();
04973 #endif
04974     }
04975   g_variant_iter_init (&iter, parameters);
04976   while ((child = g_variant_iter_next_value (&iter)) != NULL)
04977     {
04978       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
04979       if (arg_info->use_gvariant)
04980         {
04981           g_value_init (&paramv[n], G_TYPE_VARIANT);
04982           g_value_set_variant (&paramv[n], child);
04983           n++;
04984         }
04985       else
04986         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
04987       g_variant_unref (child);
04988     }
04989   signal_id = g_signal_lookup (info->signal_name, BAMF_DBUS_TYPE_MATCHER);
04990   g_value_init (&return_value, G_TYPE_BOOLEAN);
04991   g_signal_emitv (paramv, signal_id, 0, &return_value);
04992   if (!g_value_get_boolean (&return_value))
04993     g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
04994   g_value_unset (&return_value);
04995   for (n = 0; n < num_params + num_extra; n++)
04996     g_value_unset (&paramv[n]);
04997   g_free (paramv);
04998 }
04999 
05000 static GVariant *
05001 _bamf_dbus_matcher_skeleton_handle_get_property (
05002   GDBusConnection *connection,
05003   const gchar *sender,
05004   const gchar *object_path,
05005   const gchar *interface_name,
05006   const gchar *property_name,
05007   GError **error,
05008   gpointer user_data)
05009 {
05010   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (user_data);
05011   GValue value = G_VALUE_INIT;
05012   GParamSpec *pspec;
05013   _ExtendedGDBusPropertyInfo *info;
05014   GVariant *ret;
05015   ret = NULL;
05016   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_matcher_interface_info, property_name);
05017   g_assert (info != NULL);
05018   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
05019   if (pspec == NULL)
05020     {
05021       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
05022     }
05023   else
05024     {
05025       g_value_init (&value, pspec->value_type);
05026       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
05027       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
05028       g_value_unset (&value);
05029     }
05030   return ret;
05031 }
05032 
05033 static gboolean
05034 _bamf_dbus_matcher_skeleton_handle_set_property (
05035   GDBusConnection *connection,
05036   const gchar *sender,
05037   const gchar *object_path,
05038   const gchar *interface_name,
05039   const gchar *property_name,
05040   GVariant *variant,
05041   GError **error,
05042   gpointer user_data)
05043 {
05044   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (user_data);
05045   GValue value = G_VALUE_INIT;
05046   GParamSpec *pspec;
05047   _ExtendedGDBusPropertyInfo *info;
05048   gboolean ret;
05049   ret = FALSE;
05050   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_bamf_dbus_matcher_interface_info, property_name);
05051   g_assert (info != NULL);
05052   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
05053   if (pspec == NULL)
05054     {
05055       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
05056     }
05057   else
05058     {
05059       if (info->use_gvariant)
05060         g_value_set_variant (&value, variant);
05061       else
05062         g_dbus_gvariant_to_gvalue (variant, &value);
05063       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
05064       g_value_unset (&value);
05065       ret = TRUE;
05066     }
05067   return ret;
05068 }
05069 
05070 static const GDBusInterfaceVTable _bamf_dbus_matcher_skeleton_vtable =
05071 {
05072   _bamf_dbus_matcher_skeleton_handle_method_call,
05073   _bamf_dbus_matcher_skeleton_handle_get_property,
05074   _bamf_dbus_matcher_skeleton_handle_set_property
05075 };
05076 
05077 static GDBusInterfaceInfo *
05078 bamf_dbus_matcher_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
05079 {
05080   return bamf_dbus_matcher_interface_info ();
05081 }
05082 
05083 static GDBusInterfaceVTable *
05084 bamf_dbus_matcher_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
05085 {
05086   return (GDBusInterfaceVTable *) &_bamf_dbus_matcher_skeleton_vtable;
05087 }
05088 
05089 static GVariant *
05090 bamf_dbus_matcher_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
05091 {
05092   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (_skeleton);
05093 
05094   GVariantBuilder builder;
05095   guint n;
05096   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
05097   if (_bamf_dbus_matcher_interface_info.parent_struct.properties == NULL)
05098     goto out;
05099   for (n = 0; _bamf_dbus_matcher_interface_info.parent_struct.properties[n] != NULL; n++)
05100     {
05101       GDBusPropertyInfo *info = _bamf_dbus_matcher_interface_info.parent_struct.properties[n];
05102       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
05103         {
05104           GVariant *value;
05105           value = _bamf_dbus_matcher_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", info->name, NULL, skeleton);
05106           if (value != NULL)
05107             {
05108               g_variant_take_ref (value);
05109               g_variant_builder_add (&builder, "{sv}", info->name, value);
05110               g_variant_unref (value);
05111             }
05112         }
05113     }
05114 out:
05115   return g_variant_builder_end (&builder);
05116 }
05117 
05118 static void
05119 bamf_dbus_matcher_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
05120 {
05121 }
05122 
05123 static void
05124 _bamf_dbus_matcher_on_signal_active_application_changed (
05125     BamfDBusMatcher *object,
05126     const gchar *arg_old_app,
05127     const gchar *arg_new_app)
05128 {
05129   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05130 
05131   GList      *connections, *l;
05132   GVariant   *signal_variant;
05133   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
05134 
05135   signal_variant = g_variant_ref_sink (g_variant_new ("(ss)",
05136                    arg_old_app,
05137                    arg_new_app));
05138   for (l = connections; l != NULL; l = l->next)
05139     {
05140       GDBusConnection *connection = l->data;
05141       g_dbus_connection_emit_signal (connection,
05142         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", "ActiveApplicationChanged",
05143         signal_variant, NULL);
05144     }
05145   g_variant_unref (signal_variant);
05146   g_list_free_full (connections, g_object_unref);
05147 }
05148 
05149 static void
05150 _bamf_dbus_matcher_on_signal_active_window_changed (
05151     BamfDBusMatcher *object,
05152     const gchar *arg_old_win,
05153     const gchar *arg_new_win)
05154 {
05155   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05156 
05157   GList      *connections, *l;
05158   GVariant   *signal_variant;
05159   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
05160 
05161   signal_variant = g_variant_ref_sink (g_variant_new ("(ss)",
05162                    arg_old_win,
05163                    arg_new_win));
05164   for (l = connections; l != NULL; l = l->next)
05165     {
05166       GDBusConnection *connection = l->data;
05167       g_dbus_connection_emit_signal (connection,
05168         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", "ActiveWindowChanged",
05169         signal_variant, NULL);
05170     }
05171   g_variant_unref (signal_variant);
05172   g_list_free_full (connections, g_object_unref);
05173 }
05174 
05175 static void
05176 _bamf_dbus_matcher_on_signal_view_closed (
05177     BamfDBusMatcher *object,
05178     const gchar *arg_path,
05179     const gchar *arg_type)
05180 {
05181   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05182 
05183   GList      *connections, *l;
05184   GVariant   *signal_variant;
05185   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
05186 
05187   signal_variant = g_variant_ref_sink (g_variant_new ("(ss)",
05188                    arg_path,
05189                    arg_type));
05190   for (l = connections; l != NULL; l = l->next)
05191     {
05192       GDBusConnection *connection = l->data;
05193       g_dbus_connection_emit_signal (connection,
05194         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", "ViewClosed",
05195         signal_variant, NULL);
05196     }
05197   g_variant_unref (signal_variant);
05198   g_list_free_full (connections, g_object_unref);
05199 }
05200 
05201 static void
05202 _bamf_dbus_matcher_on_signal_view_opened (
05203     BamfDBusMatcher *object,
05204     const gchar *arg_path,
05205     const gchar *arg_type)
05206 {
05207   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05208 
05209   GList      *connections, *l;
05210   GVariant   *signal_variant;
05211   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
05212 
05213   signal_variant = g_variant_ref_sink (g_variant_new ("(ss)",
05214                    arg_path,
05215                    arg_type));
05216   for (l = connections; l != NULL; l = l->next)
05217     {
05218       GDBusConnection *connection = l->data;
05219       g_dbus_connection_emit_signal (connection,
05220         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", "ViewOpened",
05221         signal_variant, NULL);
05222     }
05223   g_variant_unref (signal_variant);
05224   g_list_free_full (connections, g_object_unref);
05225 }
05226 
05227 static void
05228 _bamf_dbus_matcher_on_signal_stacking_order_changed (
05229     BamfDBusMatcher *object)
05230 {
05231   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05232 
05233   GList      *connections, *l;
05234   GVariant   *signal_variant;
05235   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
05236 
05237   signal_variant = g_variant_ref_sink (g_variant_new ("()"));
05238   for (l = connections; l != NULL; l = l->next)
05239     {
05240       GDBusConnection *connection = l->data;
05241       g_dbus_connection_emit_signal (connection,
05242         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", "StackingOrderChanged",
05243         signal_variant, NULL);
05244     }
05245   g_variant_unref (signal_variant);
05246   g_list_free_full (connections, g_object_unref);
05247 }
05248 
05249 static void
05250 _bamf_dbus_matcher_on_signal_running_applications_changed (
05251     BamfDBusMatcher *object,
05252     const gchar *const *arg_opened_desktop_files,
05253     const gchar *const *arg_closed_desktop_files)
05254 {
05255   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05256 
05257   GList      *connections, *l;
05258   GVariant   *signal_variant;
05259   connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
05260 
05261   signal_variant = g_variant_ref_sink (g_variant_new ("(^as^as)",
05262                    arg_opened_desktop_files,
05263                    arg_closed_desktop_files));
05264   for (l = connections; l != NULL; l = l->next)
05265     {
05266       GDBusConnection *connection = l->data;
05267       g_dbus_connection_emit_signal (connection,
05268         NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "org.ayatana.bamf.matcher", "RunningApplicationsChanged",
05269         signal_variant, NULL);
05270     }
05271   g_variant_unref (signal_variant);
05272   g_list_free_full (connections, g_object_unref);
05273 }
05274 
05275 static void bamf_dbus_matcher_skeleton_iface_init (BamfDBusMatcherIface *iface);
05276 G_DEFINE_TYPE_WITH_CODE (BamfDBusMatcherSkeleton, bamf_dbus_matcher_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
05277                          G_IMPLEMENT_INTERFACE (BAMF_DBUS_TYPE_MATCHER, bamf_dbus_matcher_skeleton_iface_init));
05278 
05279 static void
05280 bamf_dbus_matcher_skeleton_finalize (GObject *object)
05281 {
05282   BamfDBusMatcherSkeleton *skeleton = BAMF_DBUS_MATCHER_SKELETON (object);
05283   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
05284   if (skeleton->priv->changed_properties_idle_source != NULL)
05285     g_source_destroy (skeleton->priv->changed_properties_idle_source);
05286   g_main_context_unref (skeleton->priv->context);
05287   g_mutex_clear (&skeleton->priv->lock);
05288   G_OBJECT_CLASS (bamf_dbus_matcher_skeleton_parent_class)->finalize (object);
05289 }
05290 
05291 static void
05292 bamf_dbus_matcher_skeleton_init (BamfDBusMatcherSkeleton *skeleton)
05293 {
05294   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, BAMF_DBUS_TYPE_MATCHER_SKELETON, BamfDBusMatcherSkeletonPrivate);
05295   g_mutex_init (&skeleton->priv->lock);
05296   skeleton->priv->context = g_main_context_ref_thread_default ();
05297 }
05298 
05299 static void
05300 bamf_dbus_matcher_skeleton_class_init (BamfDBusMatcherSkeletonClass *klass)
05301 {
05302   GObjectClass *gobject_class;
05303   GDBusInterfaceSkeletonClass *skeleton_class;
05304 
05305   g_type_class_add_private (klass, sizeof (BamfDBusMatcherSkeletonPrivate));
05306 
05307   gobject_class = G_OBJECT_CLASS (klass);
05308   gobject_class->finalize = bamf_dbus_matcher_skeleton_finalize;
05309 
05310   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
05311   skeleton_class->get_info = bamf_dbus_matcher_skeleton_dbus_interface_get_info;
05312   skeleton_class->get_properties = bamf_dbus_matcher_skeleton_dbus_interface_get_properties;
05313   skeleton_class->flush = bamf_dbus_matcher_skeleton_dbus_interface_flush;
05314   skeleton_class->get_vtable = bamf_dbus_matcher_skeleton_dbus_interface_get_vtable;
05315 }
05316 
05317 static void
05318 bamf_dbus_matcher_skeleton_iface_init (BamfDBusMatcherIface *iface)
05319 {
05320   iface->active_application_changed = _bamf_dbus_matcher_on_signal_active_application_changed;
05321   iface->active_window_changed = _bamf_dbus_matcher_on_signal_active_window_changed;
05322   iface->view_closed = _bamf_dbus_matcher_on_signal_view_closed;
05323   iface->view_opened = _bamf_dbus_matcher_on_signal_view_opened;
05324   iface->stacking_order_changed = _bamf_dbus_matcher_on_signal_stacking_order_changed;
05325   iface->running_applications_changed = _bamf_dbus_matcher_on_signal_running_applications_changed;
05326 }
05327 
05335 BamfDBusMatcher *
05336 bamf_dbus_matcher_skeleton_new (void)
05337 {
05338   return BAMF_DBUS_MATCHER (g_object_new (BAMF_DBUS_TYPE_MATCHER_SKELETON, NULL));
05339 }
05340