started diablo branch
[libicd-wpa] / dbus.h
1 /**
2   @file dbus.h
3
4   Copyright (C) 2004 Nokia Corporation. All rights reserved.
5
6   @author Johan Hedberg <johan.hedberg@nokia.com>  
7  
8   This program is free software; you can redistribute it and/or modify it
9   under the terms of the GNU General Public License as published by the
10   Free Software Foundation; either version 2 of the License, or (at your
11   option) any later version.
12
13   This program is distributed in the hope that it will be useful, but
14   WITHOUT ANY WARRANTY; without even the implied warranty of
15   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16   General Public License for more details.
17
18   You should have received a copy of the GNU General Public License along
19   with this program; if not, write to the Free Software Foundation, Inc.,
20   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21
22 */
23 #ifndef _DBUS_H_
24 #define _DBUS_H_
25
26 #ifndef DBUS_API_SUBJECT_TO_CHANGE
27 # define DBUS_API_SUBJECT_TO_CHANGE
28 # include <dbus/dbus.h>
29 #endif
30
31 /** Connect to the system D-Bus
32  * @returns 0 on success, -1 on failure
33  */
34 int setup_dbus_connection(const char *service,
35                           void (*handler_init)(DBusConnection *connection));
36
37 /** Disconnect from the system D-Bus */
38 void close_dbus_connection(void);
39
40 DBusConnection *get_dbus_connection(void);
41
42 #endif /* _DBUS_H_ */