1 /*************************************************************************** 2 * CVSID: $Id$ 3 * 4 * hal_dbus.h : D-BUS interface of HAL daemon 5 * 6 * Copyright (C) 2003 David Zeuthen, <david@fubar.dk> 7 * 8 * Licensed under the Academic Free License version 2.1 9 * 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. 14 * 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. 19 * 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 23 * 24 **************************************************************************/ 25 26 #ifndef HAL_DBUS_H 27 #define HAL_DBUS_H 28 29 #include <dbus/dbus.h> 30 31 #include "device.h" 32 33 DBusHandlerResult manager_get_all_devices (DBusConnection *conn, 34 DBusMessage *msg); 35 DBusHandlerResult manager_find_device_string_match (DBusConnection *conn, 36 DBusMessage *msg); 37 DBusHandlerResult manager_find_device_by_capability (DBusConnection *conn, 38 DBusMessage *msg); 39 DBusHandlerResult manager_device_exists (DBusConnection *conn, 40 DBusMessage *msg); 41 DBusHandlerResult device_get_all_properties (DBusConnection *conn, 42 DBusMessage *msg); 43 DBusHandlerResult device_get_property (DBusConnection *conn, 44 DBusMessage *msg); 45 DBusHandlerResult device_get_property_type (DBusConnection *conn, 46 DBusMessage *msg); 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, 56 DBusMessage *msg); 57 DBusHandlerResult device_query_capability (DBusConnection *conn, 58 DBusMessage *msg); 59 DBusHandlerResult device_lock (DBusConnection *conn, 60 DBusMessage *msg); 61 DBusHandlerResult device_unlock (DBusConnection *conn, 62 DBusMessage *msg); 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, 70 DBusMessage *msg); 71 DBusHandlerResult device_matches (DBusConnection *conn, 72 DBusMessage *msg); 73 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); 78 79 void device_send_signal_property_modified (HalDevice *device, 80 const char *key, 81 dbus_bool_t removed, 82 dbus_bool_t added); 83 void device_send_signal_condition (HalDevice *device, 84 const char *condition_name, 85 const char *condition_details); 86 87 void device_property_atomic_update_begin (void); 88 void device_property_atomic_update_end (void); 89 90 gboolean hald_dbus_init (void); 91 92 gboolean hald_dbus_local_server_init (void); 93 94 DBusHandlerResult hald_dbus_filter_function (DBusConnection * connection, DBusMessage * message, void *user_data); 95 96 char *hald_dbus_local_server_addr (void); 97 98 gboolean device_is_executing_method (HalDevice *d, const char *interface_name, const char *method_name); 99 100 #endif /* HAL_DBUS_H */ 101