D-Bus
1.4.10
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-bus.h Convenience functions for communicating with the bus. 00003 * 00004 * Copyright (C) 2003 CodeFactory AB 00005 * 00006 * Licensed under the Academic Free License version 2.1 00007 * 00008 * This program is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU General Public License as published by 00010 * the Free Software Foundation; either version 2 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 */ 00023 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) 00024 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents." 00025 #endif 00026 00027 #ifndef DBUS_BUS_H 00028 #define DBUS_BUS_H 00029 00030 #include <dbus/dbus-connection.h> 00031 00032 DBUS_BEGIN_DECLS 00033 00039 DBUS_EXPORT 00040 DBusConnection *dbus_bus_get (DBusBusType type, 00041 DBusError *error); 00042 DBUS_EXPORT 00043 DBusConnection *dbus_bus_get_private (DBusBusType type, 00044 DBusError *error); 00045 00046 DBUS_EXPORT 00047 dbus_bool_t dbus_bus_register (DBusConnection *connection, 00048 DBusError *error); 00049 DBUS_EXPORT 00050 dbus_bool_t dbus_bus_set_unique_name (DBusConnection *connection, 00051 const char *unique_name); 00052 DBUS_EXPORT 00053 const char* dbus_bus_get_unique_name (DBusConnection *connection); 00054 DBUS_EXPORT 00055 unsigned long dbus_bus_get_unix_user (DBusConnection *connection, 00056 const char *name, 00057 DBusError *error); 00058 DBUS_EXPORT 00059 char* dbus_bus_get_id (DBusConnection *connection, 00060 DBusError *error); 00061 DBUS_EXPORT 00062 int dbus_bus_request_name (DBusConnection *connection, 00063 const char *name, 00064 unsigned int flags, 00065 DBusError *error); 00066 DBUS_EXPORT 00067 int dbus_bus_release_name (DBusConnection *connection, 00068 const char *name, 00069 DBusError *error); 00070 DBUS_EXPORT 00071 dbus_bool_t dbus_bus_name_has_owner (DBusConnection *connection, 00072 const char *name, 00073 DBusError *error); 00074 00075 DBUS_EXPORT 00076 dbus_bool_t dbus_bus_start_service_by_name (DBusConnection *connection, 00077 const char *name, 00078 dbus_uint32_t flags, 00079 dbus_uint32_t *reply, 00080 DBusError *error); 00081 00082 DBUS_EXPORT 00083 void dbus_bus_add_match (DBusConnection *connection, 00084 const char *rule, 00085 DBusError *error); 00086 DBUS_EXPORT 00087 void dbus_bus_remove_match (DBusConnection *connection, 00088 const char *rule, 00089 DBusError *error); 00090 00093 DBUS_END_DECLS 00094 00095 #endif /* DBUS_BUS_H */