1 /***************************************************************************
4 * hal_dbus.h : D-BUS interface of HAL daemon
6 * Copyright (C) 2003 David Zeuthen, <david@fubar.dk>
8 * Licensed under the Academic Free License version 2.1
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 **************************************************************************/
29 #include <dbus/dbus.h>
33 DBusHandlerResult
manager_get_all_devices (DBusConnection
*conn
,
35 DBusHandlerResult
manager_find_device_string_match (DBusConnection
*conn
,
37 DBusHandlerResult
manager_find_device_by_capability (DBusConnection
*conn
,
39 DBusHandlerResult
manager_device_exists (DBusConnection
*conn
,
41 DBusHandlerResult
device_get_all_properties (DBusConnection
*conn
,
43 DBusHandlerResult
device_get_property (DBusConnection
*conn
,
45 DBusHandlerResult
device_get_property_type (DBusConnection
*conn
,
47 DBusHandlerResult
device_set_property (DBusConnection
*conn
,
48 DBusMessage
*msg
, dbus_bool_t local_interface
);
49 DBusHandlerResult
device_add_capability (DBusConnection
*conn
,
50 DBusMessage
*msg
, dbus_bool_t local_interface
);
51 DBusHandlerResult
device_remove_capability (DBusConnection
*conn
,
52 DBusMessage
*msg
, dbus_bool_t local_interface
);
53 DBusHandlerResult
device_remove_property (DBusConnection
*conn
,
54 DBusMessage
*msg
, dbus_bool_t local_interface
);
55 DBusHandlerResult
device_property_exists (DBusConnection
*conn
,
57 DBusHandlerResult
device_query_capability (DBusConnection
*conn
,
59 DBusHandlerResult
device_lock (DBusConnection
*conn
,
61 DBusHandlerResult
device_unlock (DBusConnection
*conn
,
63 DBusHandlerResult
manager_new_device (DBusConnection
*conn
,
64 DBusMessage
*msg
, dbus_bool_t local_interface
);
65 DBusHandlerResult
manager_commit_to_gdl (DBusConnection
*conn
,
66 DBusMessage
*msg
, dbus_bool_t local_interface
);
67 DBusHandlerResult
manager_remove (DBusConnection
*conn
,
68 DBusMessage
*msg
, dbus_bool_t local_interface
);
69 DBusHandlerResult
merge_properties (DBusConnection
*conn
,
71 DBusHandlerResult
device_matches (DBusConnection
*conn
,
74 void manager_send_signal_device_added (HalDevice
*device
);
75 void manager_send_signal_device_removed (HalDevice
*device
);
76 void manager_send_signal_new_capability (HalDevice
*device
,
77 const char *capability
);
79 void device_send_signal_property_modified (HalDevice
*device
,
83 void device_send_signal_condition (HalDevice
*device
,
84 const char *condition_name
,
85 const char *condition_details
);
87 void device_property_atomic_update_begin (void);
88 void device_property_atomic_update_end (void);
90 gboolean
hald_dbus_init (void);
92 gboolean
hald_dbus_local_server_init (void);
94 DBusHandlerResult
hald_dbus_filter_function (DBusConnection
* connection
, DBusMessage
* message
, void *user_data
);
96 char *hald_dbus_local_server_addr (void);
98 gboolean
device_is_executing_method (HalDevice
*d
, const char *interface_name
, const char *method_name
);
100 #endif /* HAL_DBUS_H */