dbus-bus.h 3.39 KB
Newer Older
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 3 4 5
/* dbus-bus.h  Convenience functions for communicating with the bus.
 *
 * Copyright (C) 2003  CodeFactory AB
 *
6
 * Licensed under the Academic Free License version 2.1
7 8 9 10 11 12 13 14 15 16 17 18 19
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 22 23 24 25 26 27 28 29 30 31
 *
 */
#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
#endif

#ifndef DBUS_BUS_H
#define DBUS_BUS_H

#include <dbus/dbus-connection.h>

32
DBUS_BEGIN_DECLS
33

34 35 36 37 38
/**
 * @addtogroup DBusBus
 * @{
 */

39
DBUS_EXPORT
40 41
DBusConnection *dbus_bus_get              (DBusBusType     type,
					   DBusError      *error);
42
DBUS_EXPORT
43 44 45
DBusConnection *dbus_bus_get_private      (DBusBusType     type,
					   DBusError      *error);

46
DBUS_EXPORT
47 48
dbus_bool_t     dbus_bus_register         (DBusConnection *connection,
					   DBusError      *error);
49
DBUS_EXPORT
50 51
dbus_bool_t     dbus_bus_set_unique_name  (DBusConnection *connection,
					   const char     *unique_name);
52
DBUS_EXPORT
53
const char*     dbus_bus_get_unique_name  (DBusConnection *connection);
54
DBUS_EXPORT
55
unsigned long   dbus_bus_get_unix_user    (DBusConnection *connection,
56
			                   const char     *name,
57
                                           DBusError      *error);
58
DBUS_EXPORT
59 60
char*           dbus_bus_get_id           (DBusConnection *connection,
                                           DBusError      *error);
61
DBUS_EXPORT
62 63
int             dbus_bus_request_name     (DBusConnection *connection,
					   const char     *name,
64 65
					   unsigned int    flags,
					   DBusError      *error);
66
DBUS_EXPORT
67 68 69
int             dbus_bus_release_name     (DBusConnection *connection,
					   const char     *name,
					   DBusError      *error);
70
DBUS_EXPORT
71 72
dbus_bool_t     dbus_bus_name_has_owner   (DBusConnection *connection,
					   const char     *name,
73
					   DBusError      *error);
74

75
DBUS_EXPORT
76 77 78 79 80
dbus_bool_t     dbus_bus_start_service_by_name (DBusConnection *connection,
                                                const char     *name,
                                                dbus_uint32_t   flags,
                                                dbus_uint32_t  *reply,
                                                DBusError      *error);
81

82
DBUS_EXPORT
83 84 85
void            dbus_bus_add_match        (DBusConnection *connection,
                                           const char     *rule,
                                           DBusError      *error);
86
DBUS_EXPORT
87 88 89 90
void            dbus_bus_remove_match     (DBusConnection *connection,
                                           const char     *rule,
                                           DBusError      *error);

91 92
/** @} */

93
DBUS_END_DECLS
94 95

#endif /* DBUS_BUS_H */