• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * dbus.h - event loop dbus integration
3  * Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
4  * Use of this source code is governed by a BSD-style license that can be
5  * found in the LICENSE file.
6  */
7 #ifndef DBUS_H_
8 #define DBUS_H_
9 
10 #include "config.h"
11 
12 #ifdef HAVE_DBUS
13 #include <dbus/dbus.h>
14 
15 #define SET_TIME_OK 0
16 #define SET_TIME_INVALID 1
17 #define SET_TIME_NOT_ALLOWED 2
18 #define SET_TIME_BAD_CALL 3
19 
20 struct state;
21 int init_dbus (struct state *state);
22 
23 struct dbus_state
24 {
25   DBusConnection *conn;
26 };
27 
28 struct dbus_event_data
29 {
30   struct dbus_state *state;
31   struct event *event;
32 };
33 
34 void dbus_announce (struct state *);
35 
36 #else  /* !HAVE_DBUS */
37 struct state;
init_dbus(struct state * state)38 static inline int init_dbus (struct state *state)
39 {
40   return 0;
41 }
dbus_announce(struct state * global_state)42 static inline void dbus_announce (struct state *global_state)
43 {
44 }
45 #endif
46 
47 #endif  /* DBUS_H_ */
48