• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
2  * Use of this source code is governed by a BSD-style license that can be
3  * found in the LICENSE file.
4  */
5 
6 #ifndef CRAS_DBUS_H_
7 #define CRAS_DBUS_H_
8 
9 #include <dbus/dbus.h>
10 
11 /* Establish connection to the D-Bus System Bus. */
12 DBusConnection *cras_dbus_connect_system_bus();
13 
14 /* Dispatch pending incoming and outgoing messages.
15  *
16  * This function must be called from the main loop to dispatch any
17  * pending incoming and outgoing messages to the appropriate registered
18  * object handler functions or filter functions - including those internal
19  * to libdbus.
20  *
21  * It does nothing if there are no pending messages.
22  */
23 void cras_dbus_dispatch(DBusConnection *conn);
24 
25 /* Disconnect from the D-Bus System Bus. */
26 void cras_dbus_disconnect_system_bus(DBusConnection *conn);
27 
28 #endif /* CRAS_DBUS_H_ */
29