(1) regenerate leaner genfiles, we're not using the object manager functionality...
[systembsd.git] / src / interfaces / logind / logind-gen.c
index 86c5f1205b7f6e4fb8fe34a98db0de384184abb0..7a0386a79a9569cfc85f77d2fd493d877f964265 100644 (file)
@@ -10873,567 +10873,3 @@ logind_login1_manager_skeleton_new (void)
   return LOGIND_LOGIN1_MANAGER (g_object_new (LOGIND_TYPE_LOGIN1_MANAGER_SKELETON, NULL));
 }
 
-/* ------------------------------------------------------------------------
- * Code for Object, ObjectProxy and ObjectSkeleton
- * ------------------------------------------------------------------------
- */
-
-/**
- * SECTION:logindObject
- * @title: logindObject
- * @short_description: Specialized GDBusObject types
- *
- * This section contains the #logindObject, #logindObjectProxy, and #logindObjectSkeleton types which make it easier to work with objects implementing generated types for D-Bus interfaces.
- */
-
-/**
- * logindObject:
- *
- * The #logindObject type is a specialized container of interfaces.
- */
-
-/**
- * logindObjectIface:
- * @parent_iface: The parent interface.
- *
- * Virtual table for the #logindObject interface.
- */
-
-typedef logindObjectIface logindObjectInterface;
-G_DEFINE_INTERFACE_WITH_CODE (logindObject, logind_object, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_DBUS_OBJECT));
-
-static void
-logind_object_default_init (logindObjectIface *iface)
-{
-  /**
-   * logindObject:login1-manager:
-   *
-   * The #logindLogin1Manager instance corresponding to the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-login1-Manager.top_of_page">org.freedesktop.login1.Manager</link>, if any.
-   *
-   * Connect to the #GObject::notify signal to get informed of property changes.
-   */
-  g_object_interface_install_property (iface, g_param_spec_object ("login1-manager", "login1-manager", "login1-manager", LOGIND_TYPE_LOGIN1_MANAGER, G_PARAM_READWRITE|G_PARAM_STATIC_STRINGS));
-
-}
-
-/**
- * logind_object_get_login1_manager:
- * @object: A #logindObject.
- *
- * Gets the #logindLogin1Manager instance for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-login1-Manager.top_of_page">org.freedesktop.login1.Manager</link> on @object, if any.
- *
- * Returns: (transfer full): A #logindLogin1Manager that must be freed with g_object_unref() or %NULL if @object does not implement the interface.
- */
-logindLogin1Manager *logind_object_get_login1_manager (logindObject *object)
-{
-  GDBusInterface *ret;
-  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.login1.Manager");
-  if (ret == NULL)
-    return NULL;
-  return LOGIND_LOGIN1_MANAGER (ret);
-}
-
-
-/**
- * logind_object_peek_login1_manager: (skip)
- * @object: A #logindObject.
- *
- * Like logind_object_get_login1_manager() but doesn't increase the reference count on the returned object.
- *
- * <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>
- *
- * Returns: (transfer none): A #logindLogin1Manager or %NULL if @object does not implement the interface. Do not free the returned object, it is owned by @object.
- */
-logindLogin1Manager *logind_object_peek_login1_manager (logindObject *object)
-{
-  GDBusInterface *ret;
-  ret = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.login1.Manager");
-  if (ret == NULL)
-    return NULL;
-  g_object_unref (ret);
-  return LOGIND_LOGIN1_MANAGER (ret);
-}
-
-
-static void
-logind_object_notify (GDBusObject *object, GDBusInterface *interface)
-{
-  _ExtendedGDBusInterfaceInfo *info = (_ExtendedGDBusInterfaceInfo *) g_dbus_interface_get_info (interface);
-  /* info can be NULL if the other end is using a D-Bus interface we don't know
-   * anything about, for example old generated code in this process talking to
-   * newer generated code in the other process. */
-  if (info != NULL)
-    g_object_notify (G_OBJECT (object), info->hyphen_name);
-}
-
-/**
- * logindObjectProxy:
- *
- * The #logindObjectProxy structure contains only private data and should only be accessed using the provided API.
- */
-
-/**
- * logindObjectProxyClass:
- * @parent_class: The parent class.
- *
- * Class structure for #logindObjectProxy.
- */
-
-static void
-logind_object_proxy__logind_object_iface_init (logindObjectIface *iface G_GNUC_UNUSED)
-{
-}
-
-static void
-logind_object_proxy__g_dbus_object_iface_init (GDBusObjectIface *iface)
-{
-  iface->interface_added = logind_object_notify;
-  iface->interface_removed = logind_object_notify;
-}
-
-
-G_DEFINE_TYPE_WITH_CODE (logindObjectProxy, logind_object_proxy, G_TYPE_DBUS_OBJECT_PROXY,
-                         G_IMPLEMENT_INTERFACE (LOGIND_TYPE_OBJECT, logind_object_proxy__logind_object_iface_init)
-                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, logind_object_proxy__g_dbus_object_iface_init));
-
-static void
-logind_object_proxy_init (logindObjectProxy *object G_GNUC_UNUSED)
-{
-}
-
-static void
-logind_object_proxy_set_property (GObject      *gobject,
-  guint         prop_id,
-  const GValue *value G_GNUC_UNUSED,
-  GParamSpec   *pspec)
-{
-  G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
-}
-
-static void
-logind_object_proxy_get_property (GObject      *gobject,
-  guint         prop_id,
-  GValue       *value,
-  GParamSpec   *pspec)
-{
-  logindObjectProxy *object = LOGIND_OBJECT_PROXY (gobject);
-  GDBusInterface *interface;
-
-  switch (prop_id)
-    {
-    case 1:
-      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.login1.Manager");
-      g_value_take_object (value, interface);
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-logind_object_proxy_class_init (logindObjectProxyClass *klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-  gobject_class->set_property = logind_object_proxy_set_property;
-  gobject_class->get_property = logind_object_proxy_get_property;
-
-  g_object_class_override_property (gobject_class, 1, "login1-manager");
-}
-
-/**
- * logind_object_proxy_new:
- * @connection: A #GDBusConnection.
- * @object_path: An object path.
- *
- * Creates a new proxy object.
- *
- * Returns: (transfer full): The proxy object.
- */
-logindObjectProxy *
-logind_object_proxy_new (GDBusConnection *connection,
-  const gchar *object_path)
-{
-  g_return_val_if_fail (G_IS_DBUS_CONNECTION (connection), NULL);
-  g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
-  return LOGIND_OBJECT_PROXY (g_object_new (LOGIND_TYPE_OBJECT_PROXY, "g-connection", connection, "g-object-path", object_path, NULL));
-}
-
-/**
- * logindObjectSkeleton:
- *
- * The #logindObjectSkeleton structure contains only private data and should only be accessed using the provided API.
- */
-
-/**
- * logindObjectSkeletonClass:
- * @parent_class: The parent class.
- *
- * Class structure for #logindObjectSkeleton.
- */
-
-static void
-logind_object_skeleton__logind_object_iface_init (logindObjectIface *iface G_GNUC_UNUSED)
-{
-}
-
-
-static void
-logind_object_skeleton__g_dbus_object_iface_init (GDBusObjectIface *iface)
-{
-  iface->interface_added = logind_object_notify;
-  iface->interface_removed = logind_object_notify;
-}
-
-G_DEFINE_TYPE_WITH_CODE (logindObjectSkeleton, logind_object_skeleton, G_TYPE_DBUS_OBJECT_SKELETON,
-                         G_IMPLEMENT_INTERFACE (LOGIND_TYPE_OBJECT, logind_object_skeleton__logind_object_iface_init)
-                         G_IMPLEMENT_INTERFACE (G_TYPE_DBUS_OBJECT, logind_object_skeleton__g_dbus_object_iface_init));
-
-static void
-logind_object_skeleton_init (logindObjectSkeleton *object G_GNUC_UNUSED)
-{
-}
-
-static void
-logind_object_skeleton_set_property (GObject      *gobject,
-  guint         prop_id,
-  const GValue *value,
-  GParamSpec   *pspec)
-{
-  logindObjectSkeleton *object = LOGIND_OBJECT_SKELETON (gobject);
-  GDBusInterfaceSkeleton *interface;
-
-  switch (prop_id)
-    {
-    case 1:
-      interface = g_value_get_object (value);
-      if (interface != NULL)
-        {
-          g_warn_if_fail (LOGIND_IS_LOGIN1_MANAGER (interface));
-          g_dbus_object_skeleton_add_interface (G_DBUS_OBJECT_SKELETON (object), interface);
-        }
-      else
-        {
-          g_dbus_object_skeleton_remove_interface_by_name (G_DBUS_OBJECT_SKELETON (object), "org.freedesktop.login1.Manager");
-        }
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-logind_object_skeleton_get_property (GObject      *gobject,
-  guint         prop_id,
-  GValue       *value,
-  GParamSpec   *pspec)
-{
-  logindObjectSkeleton *object = LOGIND_OBJECT_SKELETON (gobject);
-  GDBusInterface *interface;
-
-  switch (prop_id)
-    {
-    case 1:
-      interface = g_dbus_object_get_interface (G_DBUS_OBJECT (object), "org.freedesktop.login1.Manager");
-      g_value_take_object (value, interface);
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
-      break;
-  }
-}
-
-static void
-logind_object_skeleton_class_init (logindObjectSkeletonClass *klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-  gobject_class->set_property = logind_object_skeleton_set_property;
-  gobject_class->get_property = logind_object_skeleton_get_property;
-
-  g_object_class_override_property (gobject_class, 1, "login1-manager");
-}
-
-/**
- * logind_object_skeleton_new:
- * @object_path: An object path.
- *
- * Creates a new skeleton object.
- *
- * Returns: (transfer full): The skeleton object.
- */
-logindObjectSkeleton *
-logind_object_skeleton_new (const gchar *object_path)
-{
-  g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
-  return LOGIND_OBJECT_SKELETON (g_object_new (LOGIND_TYPE_OBJECT_SKELETON, "g-object-path", object_path, NULL));
-}
-
-/**
- * logind_object_skeleton_set_login1_manager:
- * @object: A #logindObjectSkeleton.
- * @interface_: (allow-none): A #logindLogin1Manager or %NULL to clear the interface.
- *
- * Sets the #logindLogin1Manager instance for the D-Bus interface <link linkend="gdbus-interface-org-freedesktop-login1-Manager.top_of_page">org.freedesktop.login1.Manager</link> on @object.
- */
-void logind_object_skeleton_set_login1_manager (logindObjectSkeleton *object, logindLogin1Manager *interface_)
-{
-  g_object_set (G_OBJECT (object), "login1-manager", interface_, NULL);
-}
-
-
-/* ------------------------------------------------------------------------
- * Code for ObjectManager client
- * ------------------------------------------------------------------------
- */
-
-/**
- * SECTION:logindObjectManagerClient
- * @title: logindObjectManagerClient
- * @short_description: Generated GDBusObjectManagerClient type
- *
- * This section contains a #GDBusObjectManagerClient that uses logind_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.
- */
-
-/**
- * logindObjectManagerClient:
- *
- * The #logindObjectManagerClient structure contains only private data and should only be accessed using the provided API.
- */
-
-/**
- * logindObjectManagerClientClass:
- * @parent_class: The parent class.
- *
- * Class structure for #logindObjectManagerClient.
- */
-
-G_DEFINE_TYPE (logindObjectManagerClient, logind_object_manager_client, G_TYPE_DBUS_OBJECT_MANAGER_CLIENT);
-
-static void
-logind_object_manager_client_init (logindObjectManagerClient *manager G_GNUC_UNUSED)
-{
-}
-
-static void
-logind_object_manager_client_class_init (logindObjectManagerClientClass *klass G_GNUC_UNUSED)
-{
-}
-
-/**
- * logind_object_manager_client_get_proxy_type:
- * @manager: A #GDBusObjectManagerClient.
- * @object_path: The object path of the remote object (unused).
- * @interface_name: (allow-none): Interface name of the remote object or %NULL to get the object proxy #GType.
- * @user_data: User data (unused).
- *
- * A #GDBusProxyTypeFunc that maps @interface_name to the generated #GDBusObjectProxy<!-- -->- and #GDBusProxy<!-- -->-derived types.
- *
- * Returns: A #GDBusProxy<!-- -->-derived #GType if @interface_name is not %NULL, otherwise the #GType for #logindObjectProxy.
- */
-GType
-logind_object_manager_client_get_proxy_type (GDBusObjectManagerClient *manager G_GNUC_UNUSED, const gchar *object_path G_GNUC_UNUSED, const gchar *interface_name, gpointer user_data G_GNUC_UNUSED)
-{
-  static gsize once_init_value = 0;
-  static GHashTable *lookup_hash;
-  GType ret;
-
-  if (interface_name == NULL)
-    return LOGIND_TYPE_OBJECT_PROXY;
-  if (g_once_init_enter (&once_init_value))
-    {
-      lookup_hash = g_hash_table_new (g_str_hash, g_str_equal);
-      g_hash_table_insert (lookup_hash, (gpointer) "org.freedesktop.login1.Manager", GSIZE_TO_POINTER (LOGIND_TYPE_LOGIN1_MANAGER_PROXY));
-      g_once_init_leave (&once_init_value, 1);
-    }
-  ret = (GType) GPOINTER_TO_SIZE (g_hash_table_lookup (lookup_hash, interface_name));
-  if (ret == (GType) 0)
-    ret = G_TYPE_DBUS_PROXY;
-  return ret;
-}
-
-/**
- * logind_object_manager_client_new:
- * @connection: A #GDBusConnection.
- * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
- * @user_data: User data to pass to @callback.
- *
- * Asynchronously creates #GDBusObjectManagerClient using logind_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new() for more details.
- *
- * 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.
- * You can then call logind_object_manager_client_new_finish() to get the result of the operation.
- *
- * See logind_object_manager_client_new_sync() for the synchronous, blocking version of this constructor.
- */
-void
-logind_object_manager_client_new (
-    GDBusConnection        *connection,
-    GDBusObjectManagerClientFlags  flags,
-    const gchar            *name,
-    const gchar            *object_path,
-    GCancellable           *cancellable,
-    GAsyncReadyCallback     callback,
-    gpointer                user_data)
-{
-  g_async_initable_new_async (LOGIND_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", logind_object_manager_client_get_proxy_type, NULL);
-}
-
-/**
- * logind_object_manager_client_new_finish:
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to logind_object_manager_client_new().
- * @error: Return location for error or %NULL
- *
- * Finishes an operation started with logind_object_manager_client_new().
- *
- * Returns: (transfer full) (type logindObjectManagerClient): The constructed object manager client or %NULL if @error is set.
- */
-GDBusObjectManager *
-logind_object_manager_client_new_finish (
-    GAsyncResult        *res,
-    GError             **error)
-{
-  GObject *ret;
-  GObject *source_object;
-  source_object = g_async_result_get_source_object (res);
-  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
-  g_object_unref (source_object);
-  if (ret != NULL)
-    return G_DBUS_OBJECT_MANAGER (ret);
-  else
-    return NULL;
-}
-
-/**
- * logind_object_manager_client_new_sync:
- * @connection: A #GDBusConnection.
- * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
- * @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL
- *
- * Synchronously creates #GDBusObjectManagerClient using logind_object_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc. See g_dbus_object_manager_client_new_sync() for more details.
- *
- * The calling thread is blocked until a reply is received.
- *
- * See logind_object_manager_client_new() for the asynchronous version of this constructor.
- *
- * Returns: (transfer full) (type logindObjectManagerClient): The constructed object manager client or %NULL if @error is set.
- */
-GDBusObjectManager *
-logind_object_manager_client_new_sync (
-    GDBusConnection        *connection,
-    GDBusObjectManagerClientFlags  flags,
-    const gchar            *name,
-    const gchar            *object_path,
-    GCancellable           *cancellable,
-    GError                **error)
-{
-  GInitable *ret;
-  ret = g_initable_new (LOGIND_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "connection", connection, "object-path", object_path, "get-proxy-type-func", logind_object_manager_client_get_proxy_type, NULL);
-  if (ret != NULL)
-    return G_DBUS_OBJECT_MANAGER (ret);
-  else
-    return NULL;
-}
-
-
-/**
- * logind_object_manager_client_new_for_bus:
- * @bus_type: A #GBusType.
- * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
- * @name: A bus name (well-known or unique).
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @callback: A #GAsyncReadyCallback to call when the request is satisfied.
- * @user_data: User data to pass to @callback.
- *
- * Like logind_object_manager_client_new() but takes a #GBusType instead of a #GDBusConnection.
- *
- * 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.
- * You can then call logind_object_manager_client_new_for_bus_finish() to get the result of the operation.
- *
- * See logind_object_manager_client_new_for_bus_sync() for the synchronous, blocking version of this constructor.
- */
-void
-logind_object_manager_client_new_for_bus (
-    GBusType                bus_type,
-    GDBusObjectManagerClientFlags  flags,
-    const gchar            *name,
-    const gchar            *object_path,
-    GCancellable           *cancellable,
-    GAsyncReadyCallback     callback,
-    gpointer                user_data)
-{
-  g_async_initable_new_async (LOGIND_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", logind_object_manager_client_get_proxy_type, NULL);
-}
-
-/**
- * logind_object_manager_client_new_for_bus_finish:
- * @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to logind_object_manager_client_new_for_bus().
- * @error: Return location for error or %NULL
- *
- * Finishes an operation started with logind_object_manager_client_new_for_bus().
- *
- * Returns: (transfer full) (type logindObjectManagerClient): The constructed object manager client or %NULL if @error is set.
- */
-GDBusObjectManager *
-logind_object_manager_client_new_for_bus_finish (
-    GAsyncResult        *res,
-    GError             **error)
-{
-  GObject *ret;
-  GObject *source_object;
-  source_object = g_async_result_get_source_object (res);
-  ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
-  g_object_unref (source_object);
-  if (ret != NULL)
-    return G_DBUS_OBJECT_MANAGER (ret);
-  else
-    return NULL;
-}
-
-/**
- * logind_object_manager_client_new_for_bus_sync:
- * @bus_type: A #GBusType.
- * @flags: Flags from the #GDBusObjectManagerClientFlags enumeration.
- * @name: A bus name (well-known or unique).
- * @object_path: An object path.
- * @cancellable: (allow-none): A #GCancellable or %NULL.
- * @error: Return location for error or %NULL
- *
- * Like logind_object_manager_client_new_sync() but takes a #GBusType instead of a #GDBusConnection.
- *
- * The calling thread is blocked until a reply is received.
- *
- * See logind_object_manager_client_new_for_bus() for the asynchronous version of this constructor.
- *
- * Returns: (transfer full) (type logindObjectManagerClient): The constructed object manager client or %NULL if @error is set.
- */
-GDBusObjectManager *
-logind_object_manager_client_new_for_bus_sync (
-    GBusType                bus_type,
-    GDBusObjectManagerClientFlags  flags,
-    const gchar            *name,
-    const gchar            *object_path,
-    GCancellable           *cancellable,
-    GError                **error)
-{
-  GInitable *ret;
-  ret = g_initable_new (LOGIND_TYPE_OBJECT_MANAGER_CLIENT, cancellable, error, "flags", flags, "name", name, "bus-type", bus_type, "object-path", object_path, "get-proxy-type-func", logind_object_manager_client_get_proxy_type, NULL);
-  if (ret != NULL)
-    return G_DBUS_OBJECT_MANAGER (ret);
-  else
-    return NULL;
-}
-
-