1 /* GDBus - GLib D-Bus Library
3 * Copyright (C) 2008-2010 Red Hat, Inc.
5 * SPDX-License-Identifier: LGPL-2.1-or-later
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 * Author: David Zeuthen <davidz@redhat.com>
23 #ifndef __G_DBUS_NAME_OWNING_H__
24 #define __G_DBUS_NAME_OWNING_H__
26 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27 #error "Only <gio/gio.h> can be included directly."
30 #include <gio/giotypes.h>
31 #include <gio/tizen_header_glib.h> /* for TIZEN_PUBLIC_DEPRECATED_API */
36 * GBusAcquiredCallback:
37 * @connection: The #GDBusConnection to a message bus.
38 * @name: The name that is requested to be owned.
39 * @user_data: User data passed to g_bus_own_name().
41 * Invoked when a connection to a message bus has been obtained.
45 typedef void (*GBusAcquiredCallback) (GDBusConnection *connection,
50 * GBusNameAcquiredCallback:
51 * @connection: The #GDBusConnection on which to acquired the name.
52 * @name: The name being owned.
53 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
55 * Invoked when the name is acquired.
59 typedef void (*GBusNameAcquiredCallback) (GDBusConnection *connection,
64 * GBusNameLostCallback:
65 * @connection: The #GDBusConnection on which to acquire the name or %NULL if
66 * the connection was disconnected.
67 * @name: The name being owned.
68 * @user_data: User data passed to g_bus_own_name() or g_bus_own_name_on_connection().
70 * Invoked when the name is lost or @connection has been closed.
74 typedef void (*GBusNameLostCallback) (GDBusConnection *connection,
79 guint g_bus_own_name (GBusType bus_type,
81 GBusNameOwnerFlags flags,
82 GBusAcquiredCallback bus_acquired_handler,
83 GBusNameAcquiredCallback name_acquired_handler,
84 GBusNameLostCallback name_lost_handler,
86 GDestroyNotify user_data_free_func) TIZEN_PUBLIC_DEPRECATED_API;
89 guint g_bus_own_name_on_connection (GDBusConnection *connection,
91 GBusNameOwnerFlags flags,
92 GBusNameAcquiredCallback name_acquired_handler,
93 GBusNameLostCallback name_lost_handler,
95 GDestroyNotify user_data_free_func) TIZEN_PUBLIC_DEPRECATED_API;
98 guint g_bus_own_name_with_closures (GBusType bus_type,
100 GBusNameOwnerFlags flags,
101 GClosure *bus_acquired_closure,
102 GClosure *name_acquired_closure,
103 GClosure *name_lost_closure) TIZEN_PUBLIC_DEPRECATED_API;
106 guint g_bus_own_name_on_connection_with_closures (
107 GDBusConnection *connection,
109 GBusNameOwnerFlags flags,
110 GClosure *name_acquired_closure,
111 GClosure *name_lost_closure) TIZEN_PUBLIC_DEPRECATED_API;
114 void g_bus_unown_name (guint owner_id) TIZEN_PUBLIC_DEPRECATED_API;
118 #endif /* __G_DBUS_NAME_OWNING_H__ */