nautilus-3.6.3/src/nautilus-freedesktop-generated.c

No issues found

   1 /*
   2  * Generated by gdbus-codegen 2.34.2. DO NOT EDIT.
   3  *
   4  * The license of this code is the same as for the source it was derived from.
   5  */
   6 
   7 #ifdef HAVE_CONFIG_H
   8 #  include "config.h"
   9 #endif
  10 
  11 #include "nautilus-freedesktop-generated.h"
  12 
  13 #include <string.h>
  14 #ifdef G_OS_UNIX
  15 #  include <gio/gunixfdlist.h>
  16 #endif
  17 
  18 typedef struct
  19 {
  20   GDBusArgInfo parent_struct;
  21   gboolean use_gvariant;
  22 } _ExtendedGDBusArgInfo;
  23 
  24 typedef struct
  25 {
  26   GDBusMethodInfo parent_struct;
  27   const gchar *signal_name;
  28   gboolean pass_fdlist;
  29 } _ExtendedGDBusMethodInfo;
  30 
  31 typedef struct
  32 {
  33   GDBusSignalInfo parent_struct;
  34   const gchar *signal_name;
  35 } _ExtendedGDBusSignalInfo;
  36 
  37 typedef struct
  38 {
  39   GDBusPropertyInfo parent_struct;
  40   const gchar *hyphen_name;
  41   gboolean use_gvariant;
  42 } _ExtendedGDBusPropertyInfo;
  43 
  44 typedef struct
  45 {
  46   GDBusInterfaceInfo parent_struct;
  47   const gchar *hyphen_name;
  48 } _ExtendedGDBusInterfaceInfo;
  49 
  50 typedef struct
  51 {
  52   const _ExtendedGDBusPropertyInfo *info;
  53   guint prop_id;
  54   GValue orig_value; /* the value before the change */
  55 } ChangedProperty;
  56 
  57 static void
  58 _changed_property_free (ChangedProperty *data)
  59 {
  60   g_value_unset (&data->orig_value);
  61   g_free (data);
  62 }
  63 
  64 static gboolean
  65 _g_strv_equal0 (gchar **a, gchar **b)
  66 {
  67   gboolean ret = FALSE;
  68   guint n;
  69   if (a == NULL && b == NULL)
  70     {
  71       ret = TRUE;
  72       goto out;
  73     }
  74   if (a == NULL || b == NULL)
  75     goto out;
  76   if (g_strv_length (a) != g_strv_length (b))
  77     goto out;
  78   for (n = 0; a[n] != NULL; n++)
  79     if (g_strcmp0 (a[n], b[n]) != 0)
  80       goto out;
  81   ret = TRUE;
  82 out:
  83   return ret;
  84 }
  85 
  86 static gboolean
  87 _g_variant_equal0 (GVariant *a, GVariant *b)
  88 {
  89   gboolean ret = FALSE;
  90   if (a == NULL && b == NULL)
  91     {
  92       ret = TRUE;
  93       goto out;
  94     }
  95   if (a == NULL || b == NULL)
  96     goto out;
  97   ret = g_variant_equal (a, b);
  98 out:
  99   return ret;
 100 }
 101 
 102 G_GNUC_UNUSED static gboolean
 103 _g_value_equal (const GValue *a, const GValue *b)
 104 {
 105   gboolean ret = FALSE;
 106   g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
 107   switch (G_VALUE_TYPE (a))
 108     {
 109       case G_TYPE_BOOLEAN:
 110         ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
 111         break;
 112       case G_TYPE_UCHAR:
 113         ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
 114         break;
 115       case G_TYPE_INT:
 116         ret = (g_value_get_int (a) == g_value_get_int (b));
 117         break;
 118       case G_TYPE_UINT:
 119         ret = (g_value_get_uint (a) == g_value_get_uint (b));
 120         break;
 121       case G_TYPE_INT64:
 122         ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
 123         break;
 124       case G_TYPE_UINT64:
 125         ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
 126         break;
 127       case G_TYPE_DOUBLE:
 128         {
 129           /* Avoid -Wfloat-equal warnings by doing a direct bit compare */
 130           gdouble da = g_value_get_double (a);
 131           gdouble db = g_value_get_double (b);
 132           ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
 133         }
 134         break;
 135       case G_TYPE_STRING:
 136         ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
 137         break;
 138       case G_TYPE_VARIANT:
 139         ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
 140         break;
 141       default:
 142         if (G_VALUE_TYPE (a) == G_TYPE_STRV)
 143           ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
 144         else
 145           g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
 146         break;
 147     }
 148   return ret;
 149 }
 150 
 151 /* ------------------------------------------------------------------------
 152  * Code for interface org.freedesktop.FileManager1
 153  * ------------------------------------------------------------------------
 154  */
 155 
 156 /**
 157  * SECTION:NautilusFreedesktopFileManager1
 158  * @title: NautilusFreedesktopFileManager1
 159  * @short_description: Generated C code for the org.freedesktop.FileManager1 D-Bus interface
 160  *
 161  * This section contains code for working with the <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link> D-Bus interface in C.
 162  */
 163 
 164 /* ---- Introspection data for org.freedesktop.FileManager1 ---- */
 165 
 166 static const _ExtendedGDBusArgInfo _nautilus_freedesktop_file_manager1_method_info_show_folders_IN_ARG_URIs =
 167 {
 168   {
 169     -1,
 170     (gchar *) "URIs",
 171     (gchar *) "as",
 172     NULL
 173   },
 174   FALSE
 175 };
 176 
 177 static const _ExtendedGDBusArgInfo _nautilus_freedesktop_file_manager1_method_info_show_folders_IN_ARG_StartupId =
 178 {
 179   {
 180     -1,
 181     (gchar *) "StartupId",
 182     (gchar *) "s",
 183     NULL
 184   },
 185   FALSE
 186 };
 187 
 188 static const _ExtendedGDBusArgInfo * const _nautilus_freedesktop_file_manager1_method_info_show_folders_IN_ARG_pointers[] =
 189 {
 190   &_nautilus_freedesktop_file_manager1_method_info_show_folders_IN_ARG_URIs,
 191   &_nautilus_freedesktop_file_manager1_method_info_show_folders_IN_ARG_StartupId,
 192   NULL
 193 };
 194 
 195 static const _ExtendedGDBusMethodInfo _nautilus_freedesktop_file_manager1_method_info_show_folders =
 196 {
 197   {
 198     -1,
 199     (gchar *) "ShowFolders",
 200     (GDBusArgInfo **) &_nautilus_freedesktop_file_manager1_method_info_show_folders_IN_ARG_pointers,
 201     NULL,
 202     NULL
 203   },
 204   "handle-show-folders",
 205   FALSE
 206 };
 207 
 208 static const _ExtendedGDBusArgInfo _nautilus_freedesktop_file_manager1_method_info_show_items_IN_ARG_URIs =
 209 {
 210   {
 211     -1,
 212     (gchar *) "URIs",
 213     (gchar *) "as",
 214     NULL
 215   },
 216   FALSE
 217 };
 218 
 219 static const _ExtendedGDBusArgInfo _nautilus_freedesktop_file_manager1_method_info_show_items_IN_ARG_StartupId =
 220 {
 221   {
 222     -1,
 223     (gchar *) "StartupId",
 224     (gchar *) "s",
 225     NULL
 226   },
 227   FALSE
 228 };
 229 
 230 static const _ExtendedGDBusArgInfo * const _nautilus_freedesktop_file_manager1_method_info_show_items_IN_ARG_pointers[] =
 231 {
 232   &_nautilus_freedesktop_file_manager1_method_info_show_items_IN_ARG_URIs,
 233   &_nautilus_freedesktop_file_manager1_method_info_show_items_IN_ARG_StartupId,
 234   NULL
 235 };
 236 
 237 static const _ExtendedGDBusMethodInfo _nautilus_freedesktop_file_manager1_method_info_show_items =
 238 {
 239   {
 240     -1,
 241     (gchar *) "ShowItems",
 242     (GDBusArgInfo **) &_nautilus_freedesktop_file_manager1_method_info_show_items_IN_ARG_pointers,
 243     NULL,
 244     NULL
 245   },
 246   "handle-show-items",
 247   FALSE
 248 };
 249 
 250 static const _ExtendedGDBusArgInfo _nautilus_freedesktop_file_manager1_method_info_show_item_properties_IN_ARG_URIs =
 251 {
 252   {
 253     -1,
 254     (gchar *) "URIs",
 255     (gchar *) "as",
 256     NULL
 257   },
 258   FALSE
 259 };
 260 
 261 static const _ExtendedGDBusArgInfo _nautilus_freedesktop_file_manager1_method_info_show_item_properties_IN_ARG_StartupId =
 262 {
 263   {
 264     -1,
 265     (gchar *) "StartupId",
 266     (gchar *) "s",
 267     NULL
 268   },
 269   FALSE
 270 };
 271 
 272 static const _ExtendedGDBusArgInfo * const _nautilus_freedesktop_file_manager1_method_info_show_item_properties_IN_ARG_pointers[] =
 273 {
 274   &_nautilus_freedesktop_file_manager1_method_info_show_item_properties_IN_ARG_URIs,
 275   &_nautilus_freedesktop_file_manager1_method_info_show_item_properties_IN_ARG_StartupId,
 276   NULL
 277 };
 278 
 279 static const _ExtendedGDBusMethodInfo _nautilus_freedesktop_file_manager1_method_info_show_item_properties =
 280 {
 281   {
 282     -1,
 283     (gchar *) "ShowItemProperties",
 284     (GDBusArgInfo **) &_nautilus_freedesktop_file_manager1_method_info_show_item_properties_IN_ARG_pointers,
 285     NULL,
 286     NULL
 287   },
 288   "handle-show-item-properties",
 289   FALSE
 290 };
 291 
 292 static const _ExtendedGDBusMethodInfo * const _nautilus_freedesktop_file_manager1_method_info_pointers[] =
 293 {
 294   &_nautilus_freedesktop_file_manager1_method_info_show_folders,
 295   &_nautilus_freedesktop_file_manager1_method_info_show_items,
 296   &_nautilus_freedesktop_file_manager1_method_info_show_item_properties,
 297   NULL
 298 };
 299 
 300 static const _ExtendedGDBusInterfaceInfo _nautilus_freedesktop_file_manager1_interface_info =
 301 {
 302   {
 303     -1,
 304     (gchar *) "org.freedesktop.FileManager1",
 305     (GDBusMethodInfo **) &_nautilus_freedesktop_file_manager1_method_info_pointers,
 306     NULL,
 307     NULL,
 308     NULL
 309   },
 310   "file-manager1",
 311 };
 312 
 313 
 314 /**
 315  * nautilus_freedesktop_file_manager1_interface_info:
 316  *
 317  * Gets a machine-readable description of the <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link> D-Bus interface.
 318  *
 319  * Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
 320  */
 321 GDBusInterfaceInfo *
 322 nautilus_freedesktop_file_manager1_interface_info (void)
 323 {
 324   return (GDBusInterfaceInfo *) &_nautilus_freedesktop_file_manager1_interface_info.parent_struct;
 325 }
 326 
 327 /**
 328  * nautilus_freedesktop_file_manager1_override_properties:
 329  * @klass: The class structure for a #GObject<!-- -->-derived class.
 330  * @property_id_begin: The property id to assign to the first overridden property.
 331  *
 332  * Overrides all #GObject properties in the #NautilusFreedesktopFileManager1 interface for a concrete class.
 333  * The properties are overridden in the order they are defined.
 334  *
 335  * Returns: The last property id.
 336  */
 337 guint
 338 nautilus_freedesktop_file_manager1_override_properties (GObjectClass *klass, guint property_id_begin)
 339 {
 340   return property_id_begin - 1;
 341 }
 342 
 343 
 344 
 345 /**
 346  * NautilusFreedesktopFileManager1:
 347  *
 348  * Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link>.
 349  */
 350 
 351 /**
 352  * NautilusFreedesktopFileManager1Iface:
 353  * @parent_iface: The parent interface.
 354  * @handle_show_folders: Handler for the #NautilusFreedesktopFileManager1::handle-show-folders signal.
 355  * @handle_show_item_properties: Handler for the #NautilusFreedesktopFileManager1::handle-show-item-properties signal.
 356  * @handle_show_items: Handler for the #NautilusFreedesktopFileManager1::handle-show-items signal.
 357  *
 358  * Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link>.
 359  */
 360 
 361 static void
 362 nautilus_freedesktop_file_manager1_default_init (NautilusFreedesktopFileManager1Iface *iface)
 363 {
 364   /* GObject signals for incoming D-Bus method calls: */
 365   /**
 366    * NautilusFreedesktopFileManager1::handle-show-folders:
 367    * @object: A #NautilusFreedesktopFileManager1.
 368    * @invocation: A #GDBusMethodInvocation.
 369    * @arg_URIs: Argument passed by remote caller.
 370    * @arg_StartupId: Argument passed by remote caller.
 371    *
 372    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowFolders">ShowFolders()</link> D-Bus method.
 373    *
 374    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call nautilus_freedesktop_file_manager1_complete_show_folders() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
 375    *
 376    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
 377    */
 378   g_signal_new ("handle-show-folders",
 379     G_TYPE_FROM_INTERFACE (iface),
 380     G_SIGNAL_RUN_LAST,
 381     G_STRUCT_OFFSET (NautilusFreedesktopFileManager1Iface, handle_show_folders),
 382     g_signal_accumulator_true_handled,
 383     NULL,
 384     g_cclosure_marshal_generic,
 385     G_TYPE_BOOLEAN,
 386     3,
 387     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_STRING);
 388 
 389   /**
 390    * NautilusFreedesktopFileManager1::handle-show-items:
 391    * @object: A #NautilusFreedesktopFileManager1.
 392    * @invocation: A #GDBusMethodInvocation.
 393    * @arg_URIs: Argument passed by remote caller.
 394    * @arg_StartupId: Argument passed by remote caller.
 395    *
 396    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItems">ShowItems()</link> D-Bus method.
 397    *
 398    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call nautilus_freedesktop_file_manager1_complete_show_items() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
 399    *
 400    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
 401    */
 402   g_signal_new ("handle-show-items",
 403     G_TYPE_FROM_INTERFACE (iface),
 404     G_SIGNAL_RUN_LAST,
 405     G_STRUCT_OFFSET (NautilusFreedesktopFileManager1Iface, handle_show_items),
 406     g_signal_accumulator_true_handled,
 407     NULL,
 408     g_cclosure_marshal_generic,
 409     G_TYPE_BOOLEAN,
 410     3,
 411     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_STRING);
 412 
 413   /**
 414    * NautilusFreedesktopFileManager1::handle-show-item-properties:
 415    * @object: A #NautilusFreedesktopFileManager1.
 416    * @invocation: A #GDBusMethodInvocation.
 417    * @arg_URIs: Argument passed by remote caller.
 418    * @arg_StartupId: Argument passed by remote caller.
 419    *
 420    * Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItemProperties">ShowItemProperties()</link> D-Bus method.
 421    *
 422    * If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call nautilus_freedesktop_file_manager1_complete_show_item_properties() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
 423    *
 424    * Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
 425    */
 426   g_signal_new ("handle-show-item-properties",
 427     G_TYPE_FROM_INTERFACE (iface),
 428     G_SIGNAL_RUN_LAST,
 429     G_STRUCT_OFFSET (NautilusFreedesktopFileManager1Iface, handle_show_item_properties),
 430     g_signal_accumulator_true_handled,
 431     NULL,
 432     g_cclosure_marshal_generic,
 433     G_TYPE_BOOLEAN,
 434     3,
 435     G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRV, G_TYPE_STRING);
 436 
 437 }
 438 
 439 typedef NautilusFreedesktopFileManager1Iface NautilusFreedesktopFileManager1Interface;
 440 G_DEFINE_INTERFACE (NautilusFreedesktopFileManager1, nautilus_freedesktop_file_manager1, G_TYPE_OBJECT);
 441 
 442 /**
 443  * nautilus_freedesktop_file_manager1_call_show_folders:
 444  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 445  * @arg_URIs: Argument to pass with the method invocation.
 446  * @arg_StartupId: Argument to pass with the method invocation.
 447  * @cancellable: (allow-none): A #GCancellable or %NULL.
 448  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 449  * @user_data: User data to pass to @callback.
 450  *
 451  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowFolders">ShowFolders()</link> D-Bus method on @proxy.
 452  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 453  * You can then call nautilus_freedesktop_file_manager1_call_show_folders_finish() to get the result of the operation.
 454  *
 455  * See nautilus_freedesktop_file_manager1_call_show_folders_sync() for the synchronous, blocking version of this method.
 456  */
 457 void
 458 nautilus_freedesktop_file_manager1_call_show_folders (
 459     NautilusFreedesktopFileManager1 *proxy,
 460     const gchar *const *arg_URIs,
 461     const gchar *arg_StartupId,
 462     GCancellable *cancellable,
 463     GAsyncReadyCallback callback,
 464     gpointer user_data)
 465 {
 466   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
 467     "ShowFolders",
 468     g_variant_new ("(^ass)",
 469                    arg_URIs,
 470                    arg_StartupId),
 471     G_DBUS_CALL_FLAGS_NONE,
 472     -1,
 473     cancellable,
 474     callback,
 475     user_data);
 476 }
 477 
 478 /**
 479  * nautilus_freedesktop_file_manager1_call_show_folders_finish:
 480  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 481  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_file_manager1_call_show_folders().
 482  * @error: Return location for error or %NULL.
 483  *
 484  * Finishes an operation started with nautilus_freedesktop_file_manager1_call_show_folders().
 485  *
 486  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 487  */
 488 gboolean
 489 nautilus_freedesktop_file_manager1_call_show_folders_finish (
 490     NautilusFreedesktopFileManager1 *proxy,
 491     GAsyncResult *res,
 492     GError **error)
 493 {
 494   GVariant *_ret;
 495   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
 496   if (_ret == NULL)
 497     goto _out;
 498   g_variant_get (_ret,
 499                  "()");
 500   g_variant_unref (_ret);
 501 _out:
 502   return _ret != NULL;
 503 }
 504 
 505 /**
 506  * nautilus_freedesktop_file_manager1_call_show_folders_sync:
 507  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 508  * @arg_URIs: Argument to pass with the method invocation.
 509  * @arg_StartupId: Argument to pass with the method invocation.
 510  * @cancellable: (allow-none): A #GCancellable or %NULL.
 511  * @error: Return location for error or %NULL.
 512  *
 513  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowFolders">ShowFolders()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 514  *
 515  * See nautilus_freedesktop_file_manager1_call_show_folders() for the asynchronous version of this method.
 516  *
 517  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 518  */
 519 gboolean
 520 nautilus_freedesktop_file_manager1_call_show_folders_sync (
 521     NautilusFreedesktopFileManager1 *proxy,
 522     const gchar *const *arg_URIs,
 523     const gchar *arg_StartupId,
 524     GCancellable *cancellable,
 525     GError **error)
 526 {
 527   GVariant *_ret;
 528   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
 529     "ShowFolders",
 530     g_variant_new ("(^ass)",
 531                    arg_URIs,
 532                    arg_StartupId),
 533     G_DBUS_CALL_FLAGS_NONE,
 534     -1,
 535     cancellable,
 536     error);
 537   if (_ret == NULL)
 538     goto _out;
 539   g_variant_get (_ret,
 540                  "()");
 541   g_variant_unref (_ret);
 542 _out:
 543   return _ret != NULL;
 544 }
 545 
 546 /**
 547  * nautilus_freedesktop_file_manager1_call_show_items:
 548  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 549  * @arg_URIs: Argument to pass with the method invocation.
 550  * @arg_StartupId: Argument to pass with the method invocation.
 551  * @cancellable: (allow-none): A #GCancellable or %NULL.
 552  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 553  * @user_data: User data to pass to @callback.
 554  *
 555  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItems">ShowItems()</link> D-Bus method on @proxy.
 556  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 557  * You can then call nautilus_freedesktop_file_manager1_call_show_items_finish() to get the result of the operation.
 558  *
 559  * See nautilus_freedesktop_file_manager1_call_show_items_sync() for the synchronous, blocking version of this method.
 560  */
 561 void
 562 nautilus_freedesktop_file_manager1_call_show_items (
 563     NautilusFreedesktopFileManager1 *proxy,
 564     const gchar *const *arg_URIs,
 565     const gchar *arg_StartupId,
 566     GCancellable *cancellable,
 567     GAsyncReadyCallback callback,
 568     gpointer user_data)
 569 {
 570   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
 571     "ShowItems",
 572     g_variant_new ("(^ass)",
 573                    arg_URIs,
 574                    arg_StartupId),
 575     G_DBUS_CALL_FLAGS_NONE,
 576     -1,
 577     cancellable,
 578     callback,
 579     user_data);
 580 }
 581 
 582 /**
 583  * nautilus_freedesktop_file_manager1_call_show_items_finish:
 584  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 585  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_file_manager1_call_show_items().
 586  * @error: Return location for error or %NULL.
 587  *
 588  * Finishes an operation started with nautilus_freedesktop_file_manager1_call_show_items().
 589  *
 590  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 591  */
 592 gboolean
 593 nautilus_freedesktop_file_manager1_call_show_items_finish (
 594     NautilusFreedesktopFileManager1 *proxy,
 595     GAsyncResult *res,
 596     GError **error)
 597 {
 598   GVariant *_ret;
 599   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
 600   if (_ret == NULL)
 601     goto _out;
 602   g_variant_get (_ret,
 603                  "()");
 604   g_variant_unref (_ret);
 605 _out:
 606   return _ret != NULL;
 607 }
 608 
 609 /**
 610  * nautilus_freedesktop_file_manager1_call_show_items_sync:
 611  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 612  * @arg_URIs: Argument to pass with the method invocation.
 613  * @arg_StartupId: Argument to pass with the method invocation.
 614  * @cancellable: (allow-none): A #GCancellable or %NULL.
 615  * @error: Return location for error or %NULL.
 616  *
 617  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItems">ShowItems()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 618  *
 619  * See nautilus_freedesktop_file_manager1_call_show_items() for the asynchronous version of this method.
 620  *
 621  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 622  */
 623 gboolean
 624 nautilus_freedesktop_file_manager1_call_show_items_sync (
 625     NautilusFreedesktopFileManager1 *proxy,
 626     const gchar *const *arg_URIs,
 627     const gchar *arg_StartupId,
 628     GCancellable *cancellable,
 629     GError **error)
 630 {
 631   GVariant *_ret;
 632   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
 633     "ShowItems",
 634     g_variant_new ("(^ass)",
 635                    arg_URIs,
 636                    arg_StartupId),
 637     G_DBUS_CALL_FLAGS_NONE,
 638     -1,
 639     cancellable,
 640     error);
 641   if (_ret == NULL)
 642     goto _out;
 643   g_variant_get (_ret,
 644                  "()");
 645   g_variant_unref (_ret);
 646 _out:
 647   return _ret != NULL;
 648 }
 649 
 650 /**
 651  * nautilus_freedesktop_file_manager1_call_show_item_properties:
 652  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 653  * @arg_URIs: Argument to pass with the method invocation.
 654  * @arg_StartupId: Argument to pass with the method invocation.
 655  * @cancellable: (allow-none): A #GCancellable or %NULL.
 656  * @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
 657  * @user_data: User data to pass to @callback.
 658  *
 659  * Asynchronously invokes the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItemProperties">ShowItemProperties()</link> D-Bus method on @proxy.
 660  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 661  * You can then call nautilus_freedesktop_file_manager1_call_show_item_properties_finish() to get the result of the operation.
 662  *
 663  * See nautilus_freedesktop_file_manager1_call_show_item_properties_sync() for the synchronous, blocking version of this method.
 664  */
 665 void
 666 nautilus_freedesktop_file_manager1_call_show_item_properties (
 667     NautilusFreedesktopFileManager1 *proxy,
 668     const gchar *const *arg_URIs,
 669     const gchar *arg_StartupId,
 670     GCancellable *cancellable,
 671     GAsyncReadyCallback callback,
 672     gpointer user_data)
 673 {
 674   g_dbus_proxy_call (G_DBUS_PROXY (proxy),
 675     "ShowItemProperties",
 676     g_variant_new ("(^ass)",
 677                    arg_URIs,
 678                    arg_StartupId),
 679     G_DBUS_CALL_FLAGS_NONE,
 680     -1,
 681     cancellable,
 682     callback,
 683     user_data);
 684 }
 685 
 686 /**
 687  * nautilus_freedesktop_file_manager1_call_show_item_properties_finish:
 688  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 689  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_file_manager1_call_show_item_properties().
 690  * @error: Return location for error or %NULL.
 691  *
 692  * Finishes an operation started with nautilus_freedesktop_file_manager1_call_show_item_properties().
 693  *
 694  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 695  */
 696 gboolean
 697 nautilus_freedesktop_file_manager1_call_show_item_properties_finish (
 698     NautilusFreedesktopFileManager1 *proxy,
 699     GAsyncResult *res,
 700     GError **error)
 701 {
 702   GVariant *_ret;
 703   _ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
 704   if (_ret == NULL)
 705     goto _out;
 706   g_variant_get (_ret,
 707                  "()");
 708   g_variant_unref (_ret);
 709 _out:
 710   return _ret != NULL;
 711 }
 712 
 713 /**
 714  * nautilus_freedesktop_file_manager1_call_show_item_properties_sync:
 715  * @proxy: A #NautilusFreedesktopFileManager1Proxy.
 716  * @arg_URIs: Argument to pass with the method invocation.
 717  * @arg_StartupId: Argument to pass with the method invocation.
 718  * @cancellable: (allow-none): A #GCancellable or %NULL.
 719  * @error: Return location for error or %NULL.
 720  *
 721  * Synchronously invokes the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItemProperties">ShowItemProperties()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
 722  *
 723  * See nautilus_freedesktop_file_manager1_call_show_item_properties() for the asynchronous version of this method.
 724  *
 725  * Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
 726  */
 727 gboolean
 728 nautilus_freedesktop_file_manager1_call_show_item_properties_sync (
 729     NautilusFreedesktopFileManager1 *proxy,
 730     const gchar *const *arg_URIs,
 731     const gchar *arg_StartupId,
 732     GCancellable *cancellable,
 733     GError **error)
 734 {
 735   GVariant *_ret;
 736   _ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
 737     "ShowItemProperties",
 738     g_variant_new ("(^ass)",
 739                    arg_URIs,
 740                    arg_StartupId),
 741     G_DBUS_CALL_FLAGS_NONE,
 742     -1,
 743     cancellable,
 744     error);
 745   if (_ret == NULL)
 746     goto _out;
 747   g_variant_get (_ret,
 748                  "()");
 749   g_variant_unref (_ret);
 750 _out:
 751   return _ret != NULL;
 752 }
 753 
 754 /**
 755  * nautilus_freedesktop_file_manager1_complete_show_folders:
 756  * @object: A #NautilusFreedesktopFileManager1.
 757  * @invocation: (transfer full): A #GDBusMethodInvocation.
 758  *
 759  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowFolders">ShowFolders()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 760  *
 761  * This method will free @invocation, you cannot use it afterwards.
 762  */
 763 void
 764 nautilus_freedesktop_file_manager1_complete_show_folders (
 765     NautilusFreedesktopFileManager1 *object,
 766     GDBusMethodInvocation *invocation)
 767 {
 768   g_dbus_method_invocation_return_value (invocation,
 769     g_variant_new ("()"));
 770 }
 771 
 772 /**
 773  * nautilus_freedesktop_file_manager1_complete_show_items:
 774  * @object: A #NautilusFreedesktopFileManager1.
 775  * @invocation: (transfer full): A #GDBusMethodInvocation.
 776  *
 777  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItems">ShowItems()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 778  *
 779  * This method will free @invocation, you cannot use it afterwards.
 780  */
 781 void
 782 nautilus_freedesktop_file_manager1_complete_show_items (
 783     NautilusFreedesktopFileManager1 *object,
 784     GDBusMethodInvocation *invocation)
 785 {
 786   g_dbus_method_invocation_return_value (invocation,
 787     g_variant_new ("()"));
 788 }
 789 
 790 /**
 791  * nautilus_freedesktop_file_manager1_complete_show_item_properties:
 792  * @object: A #NautilusFreedesktopFileManager1.
 793  * @invocation: (transfer full): A #GDBusMethodInvocation.
 794  *
 795  * Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-freedesktop-FileManager1.ShowItemProperties">ShowItemProperties()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
 796  *
 797  * This method will free @invocation, you cannot use it afterwards.
 798  */
 799 void
 800 nautilus_freedesktop_file_manager1_complete_show_item_properties (
 801     NautilusFreedesktopFileManager1 *object,
 802     GDBusMethodInvocation *invocation)
 803 {
 804   g_dbus_method_invocation_return_value (invocation,
 805     g_variant_new ("()"));
 806 }
 807 
 808 /* ------------------------------------------------------------------------ */
 809 
 810 /**
 811  * NautilusFreedesktopFileManager1Proxy:
 812  *
 813  * The #NautilusFreedesktopFileManager1Proxy structure contains only private data and should only be accessed using the provided API.
 814  */
 815 
 816 /**
 817  * NautilusFreedesktopFileManager1ProxyClass:
 818  * @parent_class: The parent class.
 819  *
 820  * Class structure for #NautilusFreedesktopFileManager1Proxy.
 821  */
 822 
 823 struct _NautilusFreedesktopFileManager1ProxyPrivate
 824 {
 825   GData *qdata;
 826 };
 827 
 828 static void nautilus_freedesktop_file_manager1_proxy_iface_init (NautilusFreedesktopFileManager1Iface *iface);
 829 
 830 G_DEFINE_TYPE_WITH_CODE (NautilusFreedesktopFileManager1Proxy, nautilus_freedesktop_file_manager1_proxy, G_TYPE_DBUS_PROXY,
 831                          G_IMPLEMENT_INTERFACE (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1, nautilus_freedesktop_file_manager1_proxy_iface_init));
 832 
 833 static void
 834 nautilus_freedesktop_file_manager1_proxy_finalize (GObject *object)
 835 {
 836   NautilusFreedesktopFileManager1Proxy *proxy = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_PROXY (object);
 837   g_datalist_clear (&proxy->priv->qdata);
 838   G_OBJECT_CLASS (nautilus_freedesktop_file_manager1_proxy_parent_class)->finalize (object);
 839 }
 840 
 841 static void
 842 nautilus_freedesktop_file_manager1_proxy_get_property (GObject      *object,
 843   guint         prop_id,
 844   GValue       *value,
 845   GParamSpec   *pspec)
 846 {
 847 }
 848 
 849 static void
 850 nautilus_freedesktop_file_manager1_proxy_set_property (GObject      *object,
 851   guint         prop_id,
 852   const GValue *value,
 853   GParamSpec   *pspec)
 854 {
 855 }
 856 
 857 static void
 858 nautilus_freedesktop_file_manager1_proxy_g_signal (GDBusProxy *proxy,
 859   const gchar *sender_name,
 860   const gchar *signal_name,
 861   GVariant *parameters)
 862 {
 863   _ExtendedGDBusSignalInfo *info;
 864   GVariantIter iter;
 865   GVariant *child;
 866   GValue *paramv;
 867   guint num_params;
 868   guint n;
 869   guint signal_id;
 870   info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_nautilus_freedesktop_file_manager1_interface_info.parent_struct, signal_name);
 871   if (info == NULL)
 872     return;
 873   num_params = g_variant_n_children (parameters);
 874   paramv = g_new0 (GValue, num_params + 1);
 875   g_value_init (&paramv[0], NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1);
 876   g_value_set_object (&paramv[0], proxy);
 877   g_variant_iter_init (&iter, parameters);
 878   n = 1;
 879   while ((child = g_variant_iter_next_value (&iter)) != NULL)
 880     {
 881       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
 882       if (arg_info->use_gvariant)
 883         {
 884           g_value_init (&paramv[n], G_TYPE_VARIANT);
 885           g_value_set_variant (&paramv[n], child);
 886           n++;
 887         }
 888       else
 889         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
 890       g_variant_unref (child);
 891     }
 892   signal_id = g_signal_lookup (info->signal_name, NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1);
 893   g_signal_emitv (paramv, signal_id, 0, NULL);
 894   for (n = 0; n < num_params + 1; n++)
 895     g_value_unset (&paramv[n]);
 896   g_free (paramv);
 897 }
 898 
 899 static void
 900 nautilus_freedesktop_file_manager1_proxy_g_properties_changed (GDBusProxy *_proxy,
 901   GVariant *changed_properties,
 902   const gchar *const *invalidated_properties)
 903 {
 904   NautilusFreedesktopFileManager1Proxy *proxy = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_PROXY (_proxy);
 905   guint n;
 906   const gchar *key;
 907   GVariantIter *iter;
 908   _ExtendedGDBusPropertyInfo *info;
 909   g_variant_get (changed_properties, "a{sv}", &iter);
 910   while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
 911     {
 912       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_nautilus_freedesktop_file_manager1_interface_info.parent_struct, key);
 913       g_datalist_remove_data (&proxy->priv->qdata, key);
 914       if (info != NULL)
 915         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
 916     }
 917   g_variant_iter_free (iter);
 918   for (n = 0; invalidated_properties[n] != NULL; n++)
 919     {
 920       info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_nautilus_freedesktop_file_manager1_interface_info.parent_struct, invalidated_properties[n]);
 921       g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
 922       if (info != NULL)
 923         g_object_notify (G_OBJECT (proxy), info->hyphen_name);
 924     }
 925 }
 926 
 927 static void
 928 nautilus_freedesktop_file_manager1_proxy_init (NautilusFreedesktopFileManager1Proxy *proxy)
 929 {
 930   proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_PROXY, NautilusFreedesktopFileManager1ProxyPrivate);
 931   g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), nautilus_freedesktop_file_manager1_interface_info ());
 932 }
 933 
 934 static void
 935 nautilus_freedesktop_file_manager1_proxy_class_init (NautilusFreedesktopFileManager1ProxyClass *klass)
 936 {
 937   GObjectClass *gobject_class;
 938   GDBusProxyClass *proxy_class;
 939 
 940   g_type_class_add_private (klass, sizeof (NautilusFreedesktopFileManager1ProxyPrivate));
 941 
 942   gobject_class = G_OBJECT_CLASS (klass);
 943   gobject_class->finalize     = nautilus_freedesktop_file_manager1_proxy_finalize;
 944   gobject_class->get_property = nautilus_freedesktop_file_manager1_proxy_get_property;
 945   gobject_class->set_property = nautilus_freedesktop_file_manager1_proxy_set_property;
 946 
 947   proxy_class = G_DBUS_PROXY_CLASS (klass);
 948   proxy_class->g_signal = nautilus_freedesktop_file_manager1_proxy_g_signal;
 949   proxy_class->g_properties_changed = nautilus_freedesktop_file_manager1_proxy_g_properties_changed;
 950 
 951 }
 952 
 953 static void
 954 nautilus_freedesktop_file_manager1_proxy_iface_init (NautilusFreedesktopFileManager1Iface *iface)
 955 {
 956 }
 957 
 958 /**
 959  * nautilus_freedesktop_file_manager1_proxy_new:
 960  * @connection: A #GDBusConnection.
 961  * @flags: Flags from the #GDBusProxyFlags enumeration.
 962  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
 963  * @object_path: An object path.
 964  * @cancellable: (allow-none): A #GCancellable or %NULL.
 965  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
 966  * @user_data: User data to pass to @callback.
 967  *
 968  * Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link>. See g_dbus_proxy_new() for more details.
 969  *
 970  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
 971  * You can then call nautilus_freedesktop_file_manager1_proxy_new_finish() to get the result of the operation.
 972  *
 973  * See nautilus_freedesktop_file_manager1_proxy_new_sync() for the synchronous, blocking version of this constructor.
 974  */
 975 void
 976 nautilus_freedesktop_file_manager1_proxy_new (
 977     GDBusConnection     *connection,
 978     GDBusProxyFlags      flags,
 979     const gchar         *name,
 980     const gchar         *object_path,
 981     GCancellable        *cancellable,
 982     GAsyncReadyCallback  callback,
 983     gpointer             user_data)
 984 {
 985   g_async_initable_new_async (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_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.freedesktop.FileManager1", NULL);
 986 }
 987 
 988 /**
 989  * nautilus_freedesktop_file_manager1_proxy_new_finish:
 990  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_file_manager1_proxy_new().
 991  * @error: Return location for error or %NULL
 992  *
 993  * Finishes an operation started with nautilus_freedesktop_file_manager1_proxy_new().
 994  *
 995  * Returns: (transfer full) (type NautilusFreedesktopFileManager1Proxy): The constructed proxy object or %NULL if @error is set.
 996  */
 997 NautilusFreedesktopFileManager1 *
 998 nautilus_freedesktop_file_manager1_proxy_new_finish (
 999     GAsyncResult        *res,
1000     GError             **error)
1001 {
1002   GObject *ret;
1003   GObject *source_object;
1004   source_object = g_async_result_get_source_object (res);
1005   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1006   g_object_unref (source_object);
1007   if (ret != NULL)
1008     return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (ret);
1009   else
1010     return NULL;
1011 }
1012 
1013 /**
1014  * nautilus_freedesktop_file_manager1_proxy_new_sync:
1015  * @connection: A #GDBusConnection.
1016  * @flags: Flags from the #GDBusProxyFlags enumeration.
1017  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1018  * @object_path: An object path.
1019  * @cancellable: (allow-none): A #GCancellable or %NULL.
1020  * @error: Return location for error or %NULL
1021  *
1022  * Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link>. See g_dbus_proxy_new_sync() for more details.
1023  *
1024  * The calling thread is blocked until a reply is received.
1025  *
1026  * See nautilus_freedesktop_file_manager1_proxy_new() for the asynchronous version of this constructor.
1027  *
1028  * Returns: (transfer full) (type NautilusFreedesktopFileManager1Proxy): The constructed proxy object or %NULL if @error is set.
1029  */
1030 NautilusFreedesktopFileManager1 *
1031 nautilus_freedesktop_file_manager1_proxy_new_sync (
1032     GDBusConnection     *connection,
1033     GDBusProxyFlags      flags,
1034     const gchar         *name,
1035     const gchar         *object_path,
1036     GCancellable        *cancellable,
1037     GError             **error)
1038 {
1039   GInitable *ret;
1040   ret = g_initable_new (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.freedesktop.FileManager1", NULL);
1041   if (ret != NULL)
1042     return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (ret);
1043   else
1044     return NULL;
1045 }
1046 
1047 
1048 /**
1049  * nautilus_freedesktop_file_manager1_proxy_new_for_bus:
1050  * @bus_type: A #GBusType.
1051  * @flags: Flags from the #GDBusProxyFlags enumeration.
1052  * @name: A bus name (well-known or unique).
1053  * @object_path: An object path.
1054  * @cancellable: (allow-none): A #GCancellable or %NULL.
1055  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1056  * @user_data: User data to pass to @callback.
1057  *
1058  * Like nautilus_freedesktop_file_manager1_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
1059  *
1060  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1061  * You can then call nautilus_freedesktop_file_manager1_proxy_new_for_bus_finish() to get the result of the operation.
1062  *
1063  * See nautilus_freedesktop_file_manager1_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1064  */
1065 void
1066 nautilus_freedesktop_file_manager1_proxy_new_for_bus (
1067     GBusType             bus_type,
1068     GDBusProxyFlags      flags,
1069     const gchar         *name,
1070     const gchar         *object_path,
1071     GCancellable        *cancellable,
1072     GAsyncReadyCallback  callback,
1073     gpointer             user_data)
1074 {
1075   g_async_initable_new_async (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_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.freedesktop.FileManager1", NULL);
1076 }
1077 
1078 /**
1079  * nautilus_freedesktop_file_manager1_proxy_new_for_bus_finish:
1080  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_file_manager1_proxy_new_for_bus().
1081  * @error: Return location for error or %NULL
1082  *
1083  * Finishes an operation started with nautilus_freedesktop_file_manager1_proxy_new_for_bus().
1084  *
1085  * Returns: (transfer full) (type NautilusFreedesktopFileManager1Proxy): The constructed proxy object or %NULL if @error is set.
1086  */
1087 NautilusFreedesktopFileManager1 *
1088 nautilus_freedesktop_file_manager1_proxy_new_for_bus_finish (
1089     GAsyncResult        *res,
1090     GError             **error)
1091 {
1092   GObject *ret;
1093   GObject *source_object;
1094   source_object = g_async_result_get_source_object (res);
1095   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1096   g_object_unref (source_object);
1097   if (ret != NULL)
1098     return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (ret);
1099   else
1100     return NULL;
1101 }
1102 
1103 /**
1104  * nautilus_freedesktop_file_manager1_proxy_new_for_bus_sync:
1105  * @bus_type: A #GBusType.
1106  * @flags: Flags from the #GDBusProxyFlags enumeration.
1107  * @name: A bus name (well-known or unique).
1108  * @object_path: An object path.
1109  * @cancellable: (allow-none): A #GCancellable or %NULL.
1110  * @error: Return location for error or %NULL
1111  *
1112  * Like nautilus_freedesktop_file_manager1_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1113  *
1114  * The calling thread is blocked until a reply is received.
1115  *
1116  * See nautilus_freedesktop_file_manager1_proxy_new_for_bus() for the asynchronous version of this constructor.
1117  *
1118  * Returns: (transfer full) (type NautilusFreedesktopFileManager1Proxy): The constructed proxy object or %NULL if @error is set.
1119  */
1120 NautilusFreedesktopFileManager1 *
1121 nautilus_freedesktop_file_manager1_proxy_new_for_bus_sync (
1122     GBusType             bus_type,
1123     GDBusProxyFlags      flags,
1124     const gchar         *name,
1125     const gchar         *object_path,
1126     GCancellable        *cancellable,
1127     GError             **error)
1128 {
1129   GInitable *ret;
1130   ret = g_initable_new (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.freedesktop.FileManager1", NULL);
1131   if (ret != NULL)
1132     return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (ret);
1133   else
1134     return NULL;
1135 }
1136 
1137 
1138 /* ------------------------------------------------------------------------ */
1139 
1140 /**
1141  * NautilusFreedesktopFileManager1Skeleton:
1142  *
1143  * The #NautilusFreedesktopFileManager1Skeleton structure contains only private data and should only be accessed using the provided API.
1144  */
1145 
1146 /**
1147  * NautilusFreedesktopFileManager1SkeletonClass:
1148  * @parent_class: The parent class.
1149  *
1150  * Class structure for #NautilusFreedesktopFileManager1Skeleton.
1151  */
1152 
1153 struct _NautilusFreedesktopFileManager1SkeletonPrivate
1154 {
1155   GValue *properties;
1156   GList *changed_properties;
1157   GSource *changed_properties_idle_source;
1158   GMainContext *context;
1159   GMutex lock;
1160 };
1161 
1162 static void
1163 _nautilus_freedesktop_file_manager1_skeleton_handle_method_call (
1164   GDBusConnection *connection,
1165   const gchar *sender,
1166   const gchar *object_path,
1167   const gchar *interface_name,
1168   const gchar *method_name,
1169   GVariant *parameters,
1170   GDBusMethodInvocation *invocation,
1171   gpointer user_data)
1172 {
1173   NautilusFreedesktopFileManager1Skeleton *skeleton = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_SKELETON (user_data);
1174   _ExtendedGDBusMethodInfo *info;
1175   GVariantIter iter;
1176   GVariant *child;
1177   GValue *paramv;
1178   guint num_params;
1179   guint num_extra;
1180   guint n;
1181   guint signal_id;
1182   GValue return_value = G_VALUE_INIT;
1183   info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
1184   g_assert (info != NULL);
1185   num_params = g_variant_n_children (parameters);
1186   num_extra = info->pass_fdlist ? 3 : 2;  paramv = g_new0 (GValue, num_params + num_extra);
1187   n = 0;
1188   g_value_init (&paramv[n], NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1);
1189   g_value_set_object (&paramv[n++], skeleton);
1190   g_value_init (&paramv[n], G_TYPE_DBUS_METHOD_INVOCATION);
1191   g_value_set_object (&paramv[n++], invocation);
1192   if (info->pass_fdlist)
1193     {
1194 #ifdef G_OS_UNIX
1195       g_value_init (&paramv[n], G_TYPE_UNIX_FD_LIST);
1196       g_value_set_object (&paramv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
1197 #else
1198       g_assert_not_reached ();
1199 #endif
1200     }
1201   g_variant_iter_init (&iter, parameters);
1202   while ((child = g_variant_iter_next_value (&iter)) != NULL)
1203     {
1204       _ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
1205       if (arg_info->use_gvariant)
1206         {
1207           g_value_init (&paramv[n], G_TYPE_VARIANT);
1208           g_value_set_variant (&paramv[n], child);
1209           n++;
1210         }
1211       else
1212         g_dbus_gvariant_to_gvalue (child, &paramv[n++]);
1213       g_variant_unref (child);
1214     }
1215   signal_id = g_signal_lookup (info->signal_name, NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1);
1216   g_value_init (&return_value, G_TYPE_BOOLEAN);
1217   g_signal_emitv (paramv, signal_id, 0, &return_value);
1218   if (!g_value_get_boolean (&return_value))
1219     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);
1220   g_value_unset (&return_value);
1221   for (n = 0; n < num_params + num_extra; n++)
1222     g_value_unset (&paramv[n]);
1223   g_free (paramv);
1224 }
1225 
1226 static GVariant *
1227 _nautilus_freedesktop_file_manager1_skeleton_handle_get_property (
1228   GDBusConnection *connection,
1229   const gchar *sender,
1230   const gchar *object_path,
1231   const gchar *interface_name,
1232   const gchar *property_name,
1233   GError **error,
1234   gpointer user_data)
1235 {
1236   NautilusFreedesktopFileManager1Skeleton *skeleton = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_SKELETON (user_data);
1237   GValue value = G_VALUE_INIT;
1238   GParamSpec *pspec;
1239   _ExtendedGDBusPropertyInfo *info;
1240   GVariant *ret;
1241   ret = NULL;
1242   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_nautilus_freedesktop_file_manager1_interface_info.parent_struct, property_name);
1243   g_assert (info != NULL);
1244   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1245   if (pspec == NULL)
1246     {
1247       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1248     }
1249   else
1250     {
1251       g_value_init (&value, pspec->value_type);
1252       g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1253       ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
1254       g_value_unset (&value);
1255     }
1256   return ret;
1257 }
1258 
1259 static gboolean
1260 _nautilus_freedesktop_file_manager1_skeleton_handle_set_property (
1261   GDBusConnection *connection,
1262   const gchar *sender,
1263   const gchar *object_path,
1264   const gchar *interface_name,
1265   const gchar *property_name,
1266   GVariant *variant,
1267   GError **error,
1268   gpointer user_data)
1269 {
1270   NautilusFreedesktopFileManager1Skeleton *skeleton = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_SKELETON (user_data);
1271   GValue value = G_VALUE_INIT;
1272   GParamSpec *pspec;
1273   _ExtendedGDBusPropertyInfo *info;
1274   gboolean ret;
1275   ret = FALSE;
1276   info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_nautilus_freedesktop_file_manager1_interface_info.parent_struct, property_name);
1277   g_assert (info != NULL);
1278   pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1279   if (pspec == NULL)
1280     {
1281       g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1282     }
1283   else
1284     {
1285       if (info->use_gvariant)
1286         g_value_set_variant (&value, variant);
1287       else
1288         g_dbus_gvariant_to_gvalue (variant, &value);
1289       g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1290       g_value_unset (&value);
1291       ret = TRUE;
1292     }
1293   return ret;
1294 }
1295 
1296 static const GDBusInterfaceVTable _nautilus_freedesktop_file_manager1_skeleton_vtable =
1297 {
1298   _nautilus_freedesktop_file_manager1_skeleton_handle_method_call,
1299   _nautilus_freedesktop_file_manager1_skeleton_handle_get_property,
1300   _nautilus_freedesktop_file_manager1_skeleton_handle_set_property
1301 };
1302 
1303 static GDBusInterfaceInfo *
1304 nautilus_freedesktop_file_manager1_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
1305 {
1306   return nautilus_freedesktop_file_manager1_interface_info ();
1307 }
1308 
1309 static GDBusInterfaceVTable *
1310 nautilus_freedesktop_file_manager1_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
1311 {
1312   return (GDBusInterfaceVTable *) &_nautilus_freedesktop_file_manager1_skeleton_vtable;
1313 }
1314 
1315 static GVariant *
1316 nautilus_freedesktop_file_manager1_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
1317 {
1318   NautilusFreedesktopFileManager1Skeleton *skeleton = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_SKELETON (_skeleton);
1319 
1320   GVariantBuilder builder;
1321   guint n;
1322   g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
1323   if (_nautilus_freedesktop_file_manager1_interface_info.parent_struct.properties == NULL)
1324     goto out;
1325   for (n = 0; _nautilus_freedesktop_file_manager1_interface_info.parent_struct.properties[n] != NULL; n++)
1326     {
1327       GDBusPropertyInfo *info = _nautilus_freedesktop_file_manager1_interface_info.parent_struct.properties[n];
1328       if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
1329         {
1330           GVariant *value;
1331           value = _nautilus_freedesktop_file_manager1_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.freedesktop.FileManager1", info->name, NULL, skeleton);
1332           if (value != NULL)
1333             {
1334               g_variant_take_ref (value);
1335               g_variant_builder_add (&builder, "{sv}", info->name, value);
1336               g_variant_unref (value);
1337             }
1338         }
1339     }
1340 out:
1341   return g_variant_builder_end (&builder);
1342 }
1343 
1344 static void
1345 nautilus_freedesktop_file_manager1_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
1346 {
1347 }
1348 
1349 static void nautilus_freedesktop_file_manager1_skeleton_iface_init (NautilusFreedesktopFileManager1Iface *iface);
1350 G_DEFINE_TYPE_WITH_CODE (NautilusFreedesktopFileManager1Skeleton, nautilus_freedesktop_file_manager1_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
1351                          G_IMPLEMENT_INTERFACE (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1, nautilus_freedesktop_file_manager1_skeleton_iface_init));
1352 
1353 static void
1354 nautilus_freedesktop_file_manager1_skeleton_finalize (GObject *object)
1355 {
1356   NautilusFreedesktopFileManager1Skeleton *skeleton = NAUTILUS_FREEDESKTOP_FILE_MANAGER1_SKELETON (object);
1357   g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
1358   if (skeleton->priv->changed_properties_idle_source != NULL)
1359     g_source_destroy (skeleton->priv->changed_properties_idle_source);
1360   g_main_context_unref (skeleton->priv->context);
1361   g_mutex_clear (&skeleton->priv->lock);
1362   G_OBJECT_CLASS (nautilus_freedesktop_file_manager1_skeleton_parent_class)->finalize (object);
1363 }
1364 
1365 static void
1366 nautilus_freedesktop_file_manager1_skeleton_init (NautilusFreedesktopFileManager1Skeleton *skeleton)
1367 {
1368   skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_SKELETON, NautilusFreedesktopFileManager1SkeletonPrivate);
1369   g_mutex_init (&skeleton->priv->lock);
1370   skeleton->priv->context = g_main_context_ref_thread_default ();
1371 }
1372 
1373 static void
1374 nautilus_freedesktop_file_manager1_skeleton_class_init (NautilusFreedesktopFileManager1SkeletonClass *klass)
1375 {
1376   GObjectClass *gobject_class;
1377   GDBusInterfaceSkeletonClass *skeleton_class;
1378 
1379   g_type_class_add_private (klass, sizeof (NautilusFreedesktopFileManager1SkeletonPrivate));
1380 
1381   gobject_class = G_OBJECT_CLASS (klass);
1382   gobject_class->finalize = nautilus_freedesktop_file_manager1_skeleton_finalize;
1383 
1384   skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
1385   skeleton_class->get_info = nautilus_freedesktop_file_manager1_skeleton_dbus_interface_get_info;
1386   skeleton_class->get_properties = nautilus_freedesktop_file_manager1_skeleton_dbus_interface_get_properties;
1387   skeleton_class->flush = nautilus_freedesktop_file_manager1_skeleton_dbus_interface_flush;
1388   skeleton_class->get_vtable = nautilus_freedesktop_file_manager1_skeleton_dbus_interface_get_vtable;
1389 }
1390 
1391 static void
1392 nautilus_freedesktop_file_manager1_skeleton_iface_init (NautilusFreedesktopFileManager1Iface *iface)
1393 {
1394 }
1395 
1396 /**
1397  * nautilus_freedesktop_file_manager1_skeleton_new:
1398  *
1399  * Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link>.
1400  *
1401  * Returns: (transfer full) (type NautilusFreedesktopFileManager1Skeleton): The skeleton object.
1402  */
1403 NautilusFreedesktopFileManager1 *
1404 nautilus_freedesktop_file_manager1_skeleton_new (void)
1405 {
1406   return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (g_object_new (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_SKELETON, NULL));
1407 }
1408 
1409 /* ------------------------------------------------------------------------
1410  * Code for Object, ObjectProxy and ObjectSkeleton
1411  * ------------------------------------------------------------------------
1412  */
1413 
1414 /**
1415  * SECTION:NautilusFreedesktopObject
1416  * @title: NautilusFreedesktopObject
1417  * @short_description: Specialized GDBusObject types
1418  *
1419  * This section contains the #NautilusFreedesktopObject, #NautilusFreedesktopObjectProxy, and #NautilusFreedesktopObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces.
1420  */
1421 
1422 /**
1423  * NautilusFreedesktopObject:
1424  *
1425  * The #NautilusFreedesktopObject type is a specialized container of interfaces.
1426  */
1427 
1428 /**
1429  * NautilusFreedesktopObjectIface:
1430  * @parent_iface: The parent interface.
1431  *
1432  * Virtual table for the #NautilusFreedesktopObject interface.
1433  */
1434 
1435 static void
1436 nautilus_freedesktop_object_default_init (NautilusFreedesktopObjectIface *iface)
1437 {
1438   /**
1439    * NautilusFreedesktopObject:file-manager1:
1440    *
1441    * The #NautilusFreedesktopFileManager1 instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link>, if any.
1442    *
1443    * Connect to the #GObject::notify signal to get informed of property changes.
1444    */
1445   g_object_interface_install_property (iface, g_param_spec_object ("file-manager1", "file-manager1", "file-manager1", NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
1446 
1447 }
1448 
1449 typedef NautilusFreedesktopObjectIface NautilusFreedesktopObjectInterface;
1450 G_DEFINE_INTERFACE_WITH_CODE (NautilusFreedesktopObject, nautilus_freedesktop_object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT));
1451 
1452 /**
1453  * nautilus_freedesktop_object_get_file_manager1:
1454  * @object: A #NautilusFreedesktopObject.
1455  *
1456  * Gets the #NautilusFreedesktopFileManager1 instance for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link> on @object, if any.
1457  *
1458  * Returns: (transfer full): A #NautilusFreedesktopFileManager1 that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
1459  */
1460 NautilusFreedesktopFileManager1 *nautilus_freedesktop_object_get_file_manager1 (NautilusFreedesktopObject *object)
1461 {
1462   GDBusInterface *ret;
1463   ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.FileManager1");
1464   if (ret == NULL)
1465     return NULL;
1466   return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (ret);
1467 }
1468 
1469 
1470 /**
1471  * nautilus_freedesktop_object_peek_file_manager1: (skip)
1472  * @object: A #NautilusFreedesktopObject.
1473  *
1474  * Like nautilus_freedesktop_object_get_file_manager1() but doesn't increase the reference count on the returned object.
1475  *
1476  * <warning>It is not safe to use the returned object if you are on another thread than the one where the #GDBusObjectManagerClient or #GDBusObjectManagerServer for @object is running.</warning>
1477  *
1478  * Returns: (transfer none): A #NautilusFreedesktopFileManager1 or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
1479  */
1480 NautilusFreedesktopFileManager1 *nautilus_freedesktop_object_peek_file_manager1 (NautilusFreedesktopObject *object)
1481 {
1482   GDBusInterface *ret;
1483   ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.FileManager1");
1484   if (ret == NULL)
1485     return NULL;
1486   g_object_unref (ret);
1487   return NAUTILUS_FREEDESKTOP_FILE_MANAGER1 (ret);
1488 }
1489 
1490 
1491 static void
1492 nautilus_freedesktop_object_notify (GDBusObject *object, GDBusInterface *interface)
1493 {
1494   g_object_notify (G_OBJECT (object), ((_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface))->hyphen_name);
1495 }
1496 
1497 /**
1498  * NautilusFreedesktopObjectProxy:
1499  *
1500  * The #NautilusFreedesktopObjectProxy structure contains only private data and should only be accessed using the provided API.
1501  */
1502 
1503 /**
1504  * NautilusFreedesktopObjectProxyClass:
1505  * @parent_class: The parent class.
1506  *
1507  * Class structure for #NautilusFreedesktopObjectProxy.
1508  */
1509 
1510 static void
1511 nautilus_freedesktop_object_proxy__nautilus_freedesktop_object_iface_init (NautilusFreedesktopObjectIface *iface)
1512 {
1513 }
1514 
1515 static void
1516 nautilus_freedesktop_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface)
1517 {
1518   iface->interface_added = nautilus_freedesktop_object_notify;
1519   iface->interface_removed = nautilus_freedesktop_object_notify;
1520 }
1521 
1522 
1523 G_DEFINE_TYPE_WITH_CODE (NautilusFreedesktopObjectProxy, nautilus_freedesktop_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
1524                          G_IMPLEMENT_INTERFACE (NAUTILUS_FREEDESKTOP_TYPE_OBJECT, nautilus_freedesktop_object_proxy__nautilus_freedesktop_object_iface_init)
1525                          G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, nautilus_freedesktop_object_proxy__g_dbus_object_iface_init));
1526 
1527 static void
1528 nautilus_freedesktop_object_proxy_init (NautilusFreedesktopObjectProxy *object)
1529 {
1530 }
1531 
1532 static void
1533 nautilus_freedesktop_object_proxy_set_property (GObject      *gobject,
1534   guint         prop_id,
1535   const GValue *value,
1536   GParamSpec   *pspec)
1537 {
1538   G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
1539 }
1540 
1541 static void
1542 nautilus_freedesktop_object_proxy_get_property (GObject      *gobject,
1543   guint         prop_id,
1544   GValue       *value,
1545   GParamSpec   *pspec)
1546 {
1547   NautilusFreedesktopObjectProxy *object = NAUTILUS_FREEDESKTOP_OBJECT_PROXY (gobject);
1548   GDBusInterface *interface;
1549 
1550   switch (prop_id)
1551     {
1552     case 1:
1553       interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.FileManager1");
1554       g_value_take_object (value, interface);
1555       break;
1556 
1557     default:
1558       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
1559       break;
1560   }
1561 }
1562 
1563 static void
1564 nautilus_freedesktop_object_proxy_class_init (NautilusFreedesktopObjectProxyClass *klass)
1565 {
1566   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1567 
1568   gobject_class->set_property = nautilus_freedesktop_object_proxy_set_property;
1569   gobject_class->get_property = nautilus_freedesktop_object_proxy_get_property;
1570 
1571   g_object_class_override_property (gobject_class, 1, "file-manager1");
1572 }
1573 
1574 /**
1575  * nautilus_freedesktop_object_proxy_new:
1576  * @connection: A #GDBusConnection.
1577  * @object_path: An object path.
1578  *
1579  * Creates a new proxy object.
1580  *
1581  * Returns: (transfer full): The proxy object.
1582  */
1583 NautilusFreedesktopObjectProxy *
1584 nautilus_freedesktop_object_proxy_new (GDBusConnection *connection,
1585   const gchar *object_path)
1586 {
1587   g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
1588   g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
1589   return NAUTILUS_FREEDESKTOP_OBJECT_PROXY (g_object_new (NAUTILUS_FREEDESKTOP_TYPE_OBJECT_PROXY, "g-connection", connection, "g-object-path", object_path, NULL));
1590 }
1591 
1592 /**
1593  * NautilusFreedesktopObjectSkeleton:
1594  *
1595  * The #NautilusFreedesktopObjectSkeleton structure contains only private data and should only be accessed using the provided API.
1596  */
1597 
1598 /**
1599  * NautilusFreedesktopObjectSkeletonClass:
1600  * @parent_class: The parent class.
1601  *
1602  * Class structure for #NautilusFreedesktopObjectSkeleton.
1603  */
1604 
1605 static void
1606 nautilus_freedesktop_object_skeleton__nautilus_freedesktop_object_iface_init (NautilusFreedesktopObjectIface *iface)
1607 {
1608 }
1609 
1610 
1611 static void
1612 nautilus_freedesktop_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface)
1613 {
1614   iface->interface_added = nautilus_freedesktop_object_notify;
1615   iface->interface_removed = nautilus_freedesktop_object_notify;
1616 }
1617 
1618 G_DEFINE_TYPE_WITH_CODE (NautilusFreedesktopObjectSkeleton, nautilus_freedesktop_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
1619                          G_IMPLEMENT_INTERFACE (NAUTILUS_FREEDESKTOP_TYPE_OBJECT, nautilus_freedesktop_object_skeleton__nautilus_freedesktop_object_iface_init)
1620                          G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, nautilus_freedesktop_object_skeleton__g_dbus_object_iface_init));
1621 
1622 static void
1623 nautilus_freedesktop_object_skeleton_init (NautilusFreedesktopObjectSkeleton *object)
1624 {
1625 }
1626 
1627 static void
1628 nautilus_freedesktop_object_skeleton_set_property (GObject      *gobject,
1629   guint         prop_id,
1630   const GValue *value,
1631   GParamSpec   *pspec)
1632 {
1633   NautilusFreedesktopObjectSkeleton *object = NAUTILUS_FREEDESKTOP_OBJECT_SKELETON (gobject);
1634   GDBusInterfaceSkeleton *interface;
1635 
1636   switch (prop_id)
1637     {
1638     case 1:
1639       interface = g_value_get_object (value);
1640       if (interface != NULL)
1641         {
1642           g_warn_if_fail (NAUTILUS_FREEDESKTOP_IS_FILE_MANAGER1 (interface));
1643           g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
1644         }
1645       else
1646         {
1647           g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.freedesktop.FileManager1");
1648         }
1649       break;
1650 
1651     default:
1652       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
1653       break;
1654   }
1655 }
1656 
1657 static void
1658 nautilus_freedesktop_object_skeleton_get_property (GObject      *gobject,
1659   guint         prop_id,
1660   GValue       *value,
1661   GParamSpec   *pspec)
1662 {
1663   NautilusFreedesktopObjectSkeleton *object = NAUTILUS_FREEDESKTOP_OBJECT_SKELETON (gobject);
1664   GDBusInterface *interface;
1665 
1666   switch (prop_id)
1667     {
1668     case 1:
1669       interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.FileManager1");
1670       g_value_take_object (value, interface);
1671       break;
1672 
1673     default:
1674       G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
1675       break;
1676   }
1677 }
1678 
1679 static void
1680 nautilus_freedesktop_object_skeleton_class_init (NautilusFreedesktopObjectSkeletonClass *klass)
1681 {
1682   GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
1683 
1684   gobject_class->set_property = nautilus_freedesktop_object_skeleton_set_property;
1685   gobject_class->get_property = nautilus_freedesktop_object_skeleton_get_property;
1686 
1687   g_object_class_override_property (gobject_class, 1, "file-manager1");
1688 }
1689 
1690 /**
1691  * nautilus_freedesktop_object_skeleton_new:
1692  * @object_path: An object path.
1693  *
1694  * Creates a new skeleton object.
1695  *
1696  * Returns: (transfer full): The skeleton object.
1697  */
1698 NautilusFreedesktopObjectSkeleton *
1699 nautilus_freedesktop_object_skeleton_new (const gchar *object_path)
1700 {
1701   g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
1702   return NAUTILUS_FREEDESKTOP_OBJECT_SKELETON (g_object_new (NAUTILUS_FREEDESKTOP_TYPE_OBJECT_SKELETON, "g-object-path", object_path, NULL));
1703 }
1704 
1705 /**
1706  * nautilus_freedesktop_object_skeleton_set_file_manager1:
1707  * @object: A #NautilusFreedesktopObjectSkeleton.
1708  * @interface_: (allow-none): A #NautilusFreedesktopFileManager1 or %NULL to clear the interface.
1709  *
1710  * Sets the #NautilusFreedesktopFileManager1 instance for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-FileManager1.top_of_page">org.freedesktop.FileManager1</link> on @object.
1711  */
1712 void nautilus_freedesktop_object_skeleton_set_file_manager1 (NautilusFreedesktopObjectSkeleton *object, NautilusFreedesktopFileManager1 *interface_)
1713 {
1714   g_object_set (G_OBJECT (object), "file-manager1", interface_, NULL);
1715 }
1716 
1717 
1718 /* ------------------------------------------------------------------------
1719  * Code for ObjectManager client
1720  * ------------------------------------------------------------------------
1721  */
1722 
1723 /**
1724  * SECTION:NautilusFreedesktopObjectManagerClient
1725  * @title: NautilusFreedesktopObjectManagerClient
1726  * @short_description: Generated GDBusObjectManagerClient type
1727  *
1728  * This section contains a #GDBusObjectManagerClient that uses nautilus_freedesktop_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.
1729  */
1730 
1731 /**
1732  * NautilusFreedesktopObjectManagerClient:
1733  *
1734  * The #NautilusFreedesktopObjectManagerClient structure contains only private data and should only be accessed using the provided API.
1735  */
1736 
1737 /**
1738  * NautilusFreedesktopObjectManagerClientClass:
1739  * @parent_class: The parent class.
1740  *
1741  * Class structure for #NautilusFreedesktopObjectManagerClient.
1742  */
1743 
1744 G_DEFINE_TYPE (NautilusFreedesktopObjectManagerClient, nautilus_freedesktop_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT);
1745 
1746 static void
1747 nautilus_freedesktop_object_manager_client_init (NautilusFreedesktopObjectManagerClient *manager)
1748 {
1749 }
1750 
1751 static void
1752 nautilus_freedesktop_object_manager_client_class_init (NautilusFreedesktopObjectManagerClientClass *klass)
1753 {
1754 }
1755 
1756 /**
1757  * nautilus_freedesktop_object_manager_client_get_proxy_type:
1758  * @manager: A #GDBusObjectManagerClient.
1759  * @object_path: The object path of the remote object (unused).
1760  * @interface_name: (allow-none): Interface name of the remote object or %NULL to get the object proxy #GType.
1761  * @user_data: User data (unused).
1762  *
1763  * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy<!-- -->- and #GDBusProxy<!-- -->-derived types.
1764  *
1765  * Returns: A #GDBusProxy<!-- -->-derived #GType if @interface_name is not %NULL, otherwise the #GType for #NautilusFreedesktopObjectProxy.
1766  */
1767 GType
1768 nautilus_freedesktop_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager, const gchar *object_path, const gchar *interface_name, gpointer user_data)
1769 {
1770   static gsize once_init_value = 0;
1771   static GHashTable *lookup_hash;
1772   GType ret;
1773 
1774   if (interface_name == NULL)
1775     return NAUTILUS_FREEDESKTOP_TYPE_OBJECT_PROXY;
1776   if (g_once_init_enter (&once_init_value))
1777     {
1778       lookup_hash = g_hash_table_new (g_str_hash, g_str_equal);
1779       g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.FileManager1", GSIZE_TO_POINTER (NAUTILUS_FREEDESKTOP_TYPE_FILE_MANAGER1_PROXY));
1780       g_once_init_leave (&once_init_value, 1);
1781     }
1782   ret = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (lookup_hash, interface_name));
1783   if (ret == (GType) 0)
1784     ret = G_TYPE_DBUS_PROXY;
1785   return ret;
1786 }
1787 
1788 /**
1789  * nautilus_freedesktop_object_manager_client_new:
1790  * @connection: A #GDBusConnection.
1791  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
1792  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1793  * @object_path: An object path.
1794  * @cancellable: (allow-none): A #GCancellable or %NULL.
1795  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1796  * @user_data: User data to pass to @callback.
1797  *
1798  * Asynchronously creates #GDBusObjectManagerClient using nautilus_freedesktop_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details.
1799  *
1800  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1801  * You can then call nautilus_freedesktop_object_manager_client_new_finish() to get the result of the operation.
1802  *
1803  * See nautilus_freedesktop_object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
1804  */
1805 void
1806 nautilus_freedesktop_object_manager_client_new (
1807     GDBusConnection        *connection,
1808     GDBusObjectManagerClientFlags  flags,
1809     const gchar            *name,
1810     const gchar            *object_path,
1811     GCancellable           *cancellable,
1812     GAsyncReadyCallback     callback,
1813     gpointer                user_data)
1814 {
1815   g_async_initable_new_async (NAUTILUS_FREEDESKTOP_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", nautilus_freedesktop_object_manager_client_get_proxy_type, NULL);
1816 }
1817 
1818 /**
1819  * nautilus_freedesktop_object_manager_client_new_finish:
1820  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_object_manager_client_new().
1821  * @error: Return location for error or %NULL
1822  *
1823  * Finishes an operation started with nautilus_freedesktop_object_manager_client_new().
1824  *
1825  * Returns: (transfer full) (type NautilusFreedesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
1826  */
1827 GDBusObjectManager *
1828 nautilus_freedesktop_object_manager_client_new_finish (
1829     GAsyncResult        *res,
1830     GError             **error)
1831 {
1832   GObject *ret;
1833   GObject *source_object;
1834   source_object = g_async_result_get_source_object (res);
1835   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1836   g_object_unref (source_object);
1837   if (ret != NULL)
1838     return G_DBUS_OBJECT_MANAGER (ret);
1839   else
1840     return NULL;
1841 }
1842 
1843 /**
1844  * nautilus_freedesktop_object_manager_client_new_sync:
1845  * @connection: A #GDBusConnection.
1846  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
1847  * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1848  * @object_path: An object path.
1849  * @cancellable: (allow-none): A #GCancellable or %NULL.
1850  * @error: Return location for error or %NULL
1851  *
1852  * Synchronously creates #GDBusObjectManagerClient using nautilus_freedesktop_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
1853  *
1854  * The calling thread is blocked until a reply is received.
1855  *
1856  * See nautilus_freedesktop_object_manager_client_new() for the asynchronous version of this constructor.
1857  *
1858  * Returns: (transfer full) (type NautilusFreedesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
1859  */
1860 GDBusObjectManager *
1861 nautilus_freedesktop_object_manager_client_new_sync (
1862     GDBusConnection        *connection,
1863     GDBusObjectManagerClientFlags  flags,
1864     const gchar            *name,
1865     const gchar            *object_path,
1866     GCancellable           *cancellable,
1867     GError                **error)
1868 {
1869   GInitable *ret;
1870   ret = g_initable_new (NAUTILUS_FREEDESKTOP_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", nautilus_freedesktop_object_manager_client_get_proxy_type, NULL);
1871   if (ret != NULL)
1872     return G_DBUS_OBJECT_MANAGER (ret);
1873   else
1874     return NULL;
1875 }
1876 
1877 
1878 /**
1879  * nautilus_freedesktop_object_manager_client_new_for_bus:
1880  * @bus_type: A #GBusType.
1881  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
1882  * @name: A bus name (well-known or unique).
1883  * @object_path: An object path.
1884  * @cancellable: (allow-none): A #GCancellable or %NULL.
1885  * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1886  * @user_data: User data to pass to @callback.
1887  *
1888  * Like nautilus_freedesktop_object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection.
1889  *
1890  * When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1891  * You can then call nautilus_freedesktop_object_manager_client_new_for_bus_finish() to get the result of the operation.
1892  *
1893  * See nautilus_freedesktop_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1894  */
1895 void
1896 nautilus_freedesktop_object_manager_client_new_for_bus (
1897     GBusType                bus_type,
1898     GDBusObjectManagerClientFlags  flags,
1899     const gchar            *name,
1900     const gchar            *object_path,
1901     GCancellable           *cancellable,
1902     GAsyncReadyCallback     callback,
1903     gpointer                user_data)
1904 {
1905   g_async_initable_new_async (NAUTILUS_FREEDESKTOP_TYPE_OBJECT_MANAGER_CLIENT, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", nautilus_freedesktop_object_manager_client_get_proxy_type, NULL);
1906 }
1907 
1908 /**
1909  * nautilus_freedesktop_object_manager_client_new_for_bus_finish:
1910  * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to nautilus_freedesktop_object_manager_client_new_for_bus().
1911  * @error: Return location for error or %NULL
1912  *
1913  * Finishes an operation started with nautilus_freedesktop_object_manager_client_new_for_bus().
1914  *
1915  * Returns: (transfer full) (type NautilusFreedesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
1916  */
1917 GDBusObjectManager *
1918 nautilus_freedesktop_object_manager_client_new_for_bus_finish (
1919     GAsyncResult        *res,
1920     GError             **error)
1921 {
1922   GObject *ret;
1923   GObject *source_object;
1924   source_object = g_async_result_get_source_object (res);
1925   ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1926   g_object_unref (source_object);
1927   if (ret != NULL)
1928     return G_DBUS_OBJECT_MANAGER (ret);
1929   else
1930     return NULL;
1931 }
1932 
1933 /**
1934  * nautilus_freedesktop_object_manager_client_new_for_bus_sync:
1935  * @bus_type: A #GBusType.
1936  * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
1937  * @name: A bus name (well-known or unique).
1938  * @object_path: An object path.
1939  * @cancellable: (allow-none): A #GCancellable or %NULL.
1940  * @error: Return location for error or %NULL
1941  *
1942  * Like nautilus_freedesktop_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1943  *
1944  * The calling thread is blocked until a reply is received.
1945  *
1946  * See nautilus_freedesktop_object_manager_client_new_for_bus() for the asynchronous version of this constructor.
1947  *
1948  * Returns: (transfer full) (type NautilusFreedesktopObjectManagerClient): The constructed object manager client or %NULL if @error is set.
1949  */
1950 GDBusObjectManager *
1951 nautilus_freedesktop_object_manager_client_new_for_bus_sync (
1952     GBusType                bus_type,
1953     GDBusObjectManagerClientFlags  flags,
1954     const gchar            *name,
1955     const gchar            *object_path,
1956     GCancellable           *cancellable,
1957     GError                **error)
1958 {
1959   GInitable *ret;
1960   ret = g_initable_new (NAUTILUS_FREEDESKTOP_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", nautilus_freedesktop_object_manager_client_get_proxy_type, NULL);
1961   if (ret != NULL)
1962     return G_DBUS_OBJECT_MANAGER (ret);
1963   else
1964     return NULL;
1965 }