Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 08:55:32

0001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
0002 /* dbus-bus.h  Convenience functions for communicating with the bus.
0003  *
0004  * Copyright (C) 2003  CodeFactory AB
0005  *
0006  * SPDX-License-Identifier: AFL-2.1 OR GPL-2.0-or-later
0007  *
0008  * Licensed under the Academic Free License version 2.1
0009  *
0010  * This program is free software; you can redistribute it and/or modify
0011  * it under the terms of the GNU General Public License as published by
0012  * the Free Software Foundation; either version 2 of the License, or
0013  * (at your option) any later version.
0014  *
0015  * This program is distributed in the hope that it will be useful,
0016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0018  * GNU General Public License for more details.
0019  *
0020  * You should have received a copy of the GNU General Public License
0021  * along with this program; if not, write to the Free Software
0022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0023  *
0024  */
0025 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
0026 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
0027 #endif
0028 
0029 #ifndef DBUS_BUS_H
0030 #define DBUS_BUS_H
0031 
0032 #include <dbus/dbus-connection.h>
0033 
0034 DBUS_BEGIN_DECLS
0035 
0036 /**
0037  * @addtogroup DBusBus
0038  * @{
0039  */
0040 
0041 DBUS_EXPORT
0042 DBusConnection *dbus_bus_get              (DBusBusType     type,
0043                        DBusError      *error);
0044 DBUS_EXPORT
0045 DBusConnection *dbus_bus_get_private      (DBusBusType     type,
0046                        DBusError      *error);
0047 
0048 DBUS_EXPORT
0049 dbus_bool_t     dbus_bus_register         (DBusConnection *connection,
0050                        DBusError      *error);
0051 DBUS_EXPORT
0052 dbus_bool_t     dbus_bus_set_unique_name  (DBusConnection *connection,
0053                        const char     *unique_name);
0054 DBUS_EXPORT
0055 const char*     dbus_bus_get_unique_name  (DBusConnection *connection);
0056 DBUS_EXPORT
0057 unsigned long   dbus_bus_get_unix_user    (DBusConnection *connection,
0058                                const char     *name,
0059                                            DBusError      *error);
0060 DBUS_EXPORT
0061 char*           dbus_bus_get_id           (DBusConnection *connection,
0062                                            DBusError      *error);
0063 DBUS_EXPORT
0064 int             dbus_bus_request_name     (DBusConnection *connection,
0065                        const char     *name,
0066                        unsigned int    flags,
0067                        DBusError      *error);
0068 DBUS_EXPORT
0069 int             dbus_bus_release_name     (DBusConnection *connection,
0070                        const char     *name,
0071                        DBusError      *error);
0072 DBUS_EXPORT
0073 dbus_bool_t     dbus_bus_name_has_owner   (DBusConnection *connection,
0074                        const char     *name,
0075                        DBusError      *error);
0076 
0077 DBUS_EXPORT
0078 dbus_bool_t     dbus_bus_start_service_by_name (DBusConnection *connection,
0079                                                 const char     *name,
0080                                                 dbus_uint32_t   flags,
0081                                                 dbus_uint32_t  *reply,
0082                                                 DBusError      *error);
0083 
0084 DBUS_EXPORT
0085 void            dbus_bus_add_match        (DBusConnection *connection,
0086                                            const char     *rule,
0087                                            DBusError      *error);
0088 DBUS_EXPORT
0089 void            dbus_bus_remove_match     (DBusConnection *connection,
0090                                            const char     *rule,
0091                                            DBusError      *error);
0092 
0093 /** @} */
0094 
0095 DBUS_END_DECLS
0096 
0097 #endif /* DBUS_BUS_H */