Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:55

0001 /* GDBus - GLib D-Bus Library
0002  *
0003  * Copyright (C) 2008-2010 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: David Zeuthen <davidz@redhat.com>
0021  */
0022 
0023 #ifndef __G_DBUS_NAME_WATCHING_H__
0024 #define __G_DBUS_NAME_WATCHING_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 /**
0035  * GBusNameAppearedCallback:
0036  * @connection: The #GDBusConnection the name is being watched on.
0037  * @name: The name being watched.
0038  * @name_owner: Unique name of the owner of the name being watched.
0039  * @user_data: User data passed to g_bus_watch_name().
0040  *
0041  * Invoked when the name being watched is known to have to have an owner.
0042  *
0043  * Since: 2.26
0044  */
0045 typedef void (*GBusNameAppearedCallback) (GDBusConnection *connection,
0046                                           const gchar     *name,
0047                                           const gchar     *name_owner,
0048                                           gpointer         user_data);
0049 
0050 /**
0051  * GBusNameVanishedCallback:
0052  * @connection: The #GDBusConnection the name is being watched on, or
0053  *     %NULL.
0054  * @name: The name being watched.
0055  * @user_data: User data passed to g_bus_watch_name().
0056  *
0057  * Invoked when the name being watched is known not to have to have an owner.
0058  *
0059  * This is also invoked when the #GDBusConnection on which the watch was
0060  * established has been closed.  In that case, @connection will be
0061  * %NULL.
0062  *
0063  * Since: 2.26
0064  */
0065 typedef void (*GBusNameVanishedCallback) (GDBusConnection *connection,
0066                                           const gchar     *name,
0067                                           gpointer         user_data);
0068 
0069 
0070 GIO_AVAILABLE_IN_ALL
0071 guint g_bus_watch_name               (GBusType                  bus_type,
0072                                       const gchar              *name,
0073                                       GBusNameWatcherFlags      flags,
0074                                       GBusNameAppearedCallback  name_appeared_handler,
0075                                       GBusNameVanishedCallback  name_vanished_handler,
0076                                       gpointer                  user_data,
0077                                       GDestroyNotify            user_data_free_func);
0078 GIO_AVAILABLE_IN_ALL
0079 guint g_bus_watch_name_on_connection (GDBusConnection          *connection,
0080                                       const gchar              *name,
0081                                       GBusNameWatcherFlags      flags,
0082                                       GBusNameAppearedCallback  name_appeared_handler,
0083                                       GBusNameVanishedCallback  name_vanished_handler,
0084                                       gpointer                  user_data,
0085                                       GDestroyNotify            user_data_free_func);
0086 GIO_AVAILABLE_IN_ALL
0087 guint g_bus_watch_name_with_closures (GBusType                  bus_type,
0088                                       const gchar              *name,
0089                                       GBusNameWatcherFlags      flags,
0090                                       GClosure                 *name_appeared_closure,
0091                                       GClosure                 *name_vanished_closure);
0092 GIO_AVAILABLE_IN_ALL
0093 guint g_bus_watch_name_on_connection_with_closures (
0094                                       GDBusConnection          *connection,
0095                                       const gchar              *name,
0096                                       GBusNameWatcherFlags      flags,
0097                                       GClosure                 *name_appeared_closure,
0098                                       GClosure                 *name_vanished_closure);
0099 GIO_AVAILABLE_IN_ALL
0100 void  g_bus_unwatch_name             (guint                     watcher_id);
0101 
0102 G_END_DECLS
0103 
0104 #endif /* __G_DBUS_NAME_WATCHING_H__ */