Lines Matching refs:message
71 * @param in_reply_to message to report error on
73 * @param format printf-style format for error message
101 * @param in_reply_to message to report error on
119 * @param in_reply_to message to report error on
139 * @param in_reply_to message to report error on
159 * @param in_reply_to message to report error on
178 * @param in_reply_to message to report error on
197 * @param in_reply_to message to report error on
226 * @param in_reply_to message to report error on
255 * @param in_reply_to message to report error on
274 * @param in_reply_to message to report error on
275 * @param message what you're not allowed to do
320 * @param message Message
321 * @return What to do with the message
325 DBusMessage * message)
331 reply = dbus_message_new_method_return (message);
424 * @param message Message
425 * @return What to do with the message
429 DBusMessage * message)
442 if (!dbus_message_get_args (message, &error,
446 raise_syntax (connection, message,
451 reply = dbus_message_new_method_return (message);
510 * @param message Message
511 * @return What to do with the message
515 DBusMessage * message)
527 if (!dbus_message_get_args (message, &error,
530 raise_syntax (connection, message,
535 reply = dbus_message_new_method_return (message);
570 * @param message Message
571 * @return What to do with the message
574 manager_device_exists (DBusConnection * connection, DBusMessage * message)
584 if (!dbus_message_get_args (message, &error,
587 raise_syntax (connection, message, "Manager.DeviceExists");
598 reply = dbus_message_new_method_return (message);
622 DBusMessage *message;
630 message = dbus_message_new_signal ("/org/freedesktop/Hal/Manager",
634 dbus_message_iter_init_append (message, &iter);
637 if (!dbus_connection_send (dbus_connection, message, NULL))
638 DIE (("error broadcasting message"));
640 dbus_message_unref (message);
655 DBusMessage *message;
663 message = dbus_message_new_signal ("/org/freedesktop/Hal/Manager",
667 dbus_message_iter_init_append (message, &iter);
670 if (!dbus_connection_send (dbus_connection, message, NULL))
671 DIE (("error broadcasting message"));
673 dbus_message_unref (message);
690 DBusMessage *message;
698 message = dbus_message_new_signal ("/org/freedesktop/Hal/Manager",
702 dbus_message_iter_init_append (message, &iter);
706 if (!dbus_connection_send (dbus_connection, message, NULL))
707 DIE (("error broadcasting message"));
709 dbus_message_unref (message);
901 * @param message Message
902 * @return What to do with the message
906 DBusMessage * message)
914 udi = dbus_message_get_path (message);
923 raise_no_such_device (connection, message, udi);
927 reply = dbus_message_new_method_return (message);
967 sender_has_privileges (DBusConnection *connection, DBusMessage *message)
976 user_base_svc = dbus_message_get_sender (message);
987 HAL_WARNING (("Could not get uid for connection: %s %s", error.name, error.message));
996 if (dbus_message_is_method_call (message,
1025 * @param message Message
1026 * @return What to do with the message
1029 device_set_multiple_properties (DBusConnection *connection, DBusMessage *message, dbus_bool_t local_interface)
1037 udi = dbus_message_get_path (message);
1046 raise_no_such_device (connection, message, udi);
1050 if (!local_interface && !sender_has_privileges (connection, message)) {
1051 raise_permission_denied (connection, message, "SetProperty: not privileged");
1055 dbus_message_iter_init (message, &iter);
1060 raise_syntax (connection, message, udi);
1156 reply = dbus_message_new_method_return (message);
1182 * @param message Message
1183 * @return What to do with the message
1186 device_get_property (DBusConnection * connection, DBusMessage * message)
1197 udi = dbus_message_get_path (message);
1206 raise_no_such_device (connection, message, udi);
1211 if (!dbus_message_get_args (message, &error,
1214 raise_syntax (connection, message, "GetProperty");
1220 raise_no_such_property (connection, message, udi, key);
1224 reply = dbus_message_new_method_return (message);
1309 * @param message Message
1310 * @return What to do with the message
1314 DBusMessage * message)
1325 udi = dbus_message_get_path (message);
1334 raise_no_such_device (connection, message, udi);
1339 if (!dbus_message_get_args (message, &error,
1342 raise_syntax (connection, message, "GetPropertyType");
1348 raise_no_such_property (connection, message, udi, key);
1352 reply = dbus_message_new_method_return (message);
1383 * @param message Message
1384 * @return What to do with the message
1387 device_set_property (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
1399 udi = dbus_message_get_path (message);
1401 dbus_message_iter_init (message, &iter);
1404 raise_syntax (connection, message, "SetProperty");
1409 if (!local_interface && !sender_has_privileges (connection, message)) {
1410 raise_permission_denied (connection, message, "SetProperty: not privileged");
1421 raise_no_such_device (connection, message, udi);
1473 raise_property_type_error (connection, message, udi, key);
1477 reply = dbus_message_new_method_return (message);
1512 * @param message Message
1513 * @return What to do with the message
1516 device_add_capability (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
1526 if (!local_interface && !sender_has_privileges (connection, message)) {
1527 raise_permission_denied (connection, message, "AddCapability: not privileged");
1531 udi = dbus_message_get_path (message);
1538 raise_no_such_device (connection, message, udi);
1543 if (!dbus_message_get_args (message, &error,
1546 raise_syntax (connection, message, "AddCapability");
1553 reply = dbus_message_new_method_return (message);
1567 device_string_list_append_prepend (DBusConnection * connection, DBusMessage * message, dbus_bool_t do_prepend)
1579 udi = dbus_message_get_path (message);
1586 raise_no_such_device (connection, message, udi);
1591 if (!dbus_message_get_args (message, &error,
1595 raise_syntax (connection, message, do_prepend ? "StringListPrepend" : "StringListAppend");
1604 raise_property_type_error (connection, message, udi, key);
1608 reply = dbus_message_new_method_return (message);
1621 device_string_list_remove (DBusConnection * connection, DBusMessage * message)
1633 udi = dbus_message_get_path (message);
1640 raise_no_such_device (connection, message, udi);
1645 if (!dbus_message_get_args (message, &error,
1649 raise_syntax (connection, message, "StringListRemove");
1655 raise_property_type_error (connection, message, udi, key);
1659 reply = dbus_message_new_method_return (message);
1683 * @param message Message
1684 * @return What to do with the message
1687 device_remove_property (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
1697 udi = dbus_message_get_path (message);
1699 if (!local_interface && !sender_has_privileges (connection, message)) {
1700 raise_permission_denied (connection, message, "RemoveProperty: not privileged");
1709 raise_no_such_device (connection, message, udi);
1714 if (!dbus_message_get_args (message, &error,
1717 raise_syntax (connection, message, "RemoveProperty");
1722 raise_no_such_property (connection, message, udi, key);
1727 reply = dbus_message_new_method_return (message);
1748 * @param message Message
1749 * @return What to do with the message
1752 device_property_exists (DBusConnection * connection, DBusMessage * message)
1764 udi = dbus_message_get_path (message);
1771 raise_no_such_device (connection, message, udi);
1776 if (!dbus_message_get_args (message, &error,
1779 raise_syntax (connection, message, "RemoveProperty");
1783 reply = dbus_message_new_method_return (message);
1808 * @param message Message
1809 * @return What to do with the message
1813 DBusMessage * message)
1826 udi = dbus_message_get_path (message);
1833 raise_no_such_device (connection, message, udi);
1838 if (!dbus_message_get_args (message, &error,
1841 raise_syntax (connection, message, "QueryCapability");
1845 reply = dbus_message_new_method_return (message);
1884 * @param message Message
1885 * @return What to do with the message
1889 DBusMessage * message)
1901 udi = dbus_message_get_path (message);
1908 raise_no_such_device (connection, message, udi);
1915 raise_device_already_locked (connection, message, d);
1920 if (!dbus_message_get_args (message, &error,
1923 raise_syntax (connection, message, "Lock");
1927 reply = dbus_message_new_method_return (message);
1931 sender = dbus_message_get_sender (message);
1967 * @param message Message
1968 * @return What to do with the message
1972 DBusMessage * message)
1983 udi = dbus_message_get_path (message);
1990 raise_no_such_device (connection, message, udi);
1995 if (!dbus_message_get_args (message, &error,
1997 raise_syntax (connection, message, "Unlock");
2001 reply = dbus_message_new_method_return (message);
2008 raise_device_not_locked (connection, message, d);
2012 sender = dbus_message_get_sender (message);
2022 raise_permission_denied (connection, message, reason);
2057 * @param message Message
2058 * @return What to do with the message
2061 manager_claim_branch (DBusConnection * connection, DBusMessage * message)
2074 if (!dbus_message_get_args (message, &error,
2078 raise_syntax (connection, message, "Manager.ClaimBranch");
2087 raise_no_such_device (connection, message, udi);
2093 raise_branch_already_claimed (connection, message, d);
2097 reply = dbus_message_new_method_return (message);
2101 sender = dbus_message_get_sender (message);
2106 HAL_WARNING (("Could not get uid for connection: %s %s", error.name, error.message));
2109 raise_no_such_device (connection, message, udi);
2141 * @param message Message
2142 * @return What to do with the message
2145 manager_unclaim_branch (DBusConnection * connection, DBusMessage * message)
2157 if (!dbus_message_get_args (message, &error,
2160 raise_syntax (connection, message, "Manager.UnclaimBranch");
2169 raise_no_such_device (connection, message, udi);
2175 raise_branch_not_claimed (connection, message, d);
2179 reply = dbus_message_new_method_return (message);
2191 raise_permission_denied (connection, message, reason);
2263 DBusMessage *message;
2284 /* prepare message */
2285 message = dbus_message_new_signal (pu_iter->udi,
2288 dbus_message_iter_init_append (message, &iter);
2337 if (!dbus_connection_send (dbus_connection, message, NULL))
2338 DIE (("error broadcasting message"));
2341 dbus_message_unref (message);
2360 DBusMessage *message;
2391 message = dbus_message_new_signal (udi,
2395 dbus_message_iter_init_append (message, &iter);
2420 if (!dbus_connection_send (dbus_connection, message, NULL))
2421 DIE (("error broadcasting message"));
2423 dbus_message_unref (message);
2438 * in the D-BUS message. The recipient is supposed to extract the parameters
2452 DBusMessage *message;
2458 message = dbus_message_new_signal (udi,
2461 dbus_message_iter_init_append (message, &iter);
2469 if (!dbus_connection_send (dbus_connection, message, NULL))
2470 DIE (("error broadcasting message"));
2472 dbus_message_unref (message);
2490 service_deleted (DBusMessage *message)
2496 if (!dbus_message_get_args (message, NULL,
2529 device_rescan (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2539 udi = dbus_message_get_path (message);
2541 if (!local_interface && !sender_has_privileges (connection, message)) {
2542 raise_permission_denied (connection, message, "Rescan: not privileged");
2553 raise_no_such_device (connection, message, udi);
2559 reply = dbus_message_new_method_return (message);
2573 device_reprobe (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2583 udi = dbus_message_get_path (message);
2585 if (!local_interface && !sender_has_privileges (connection, message)) {
2586 raise_permission_denied (connection, message, "Reprobe: not privileged");
2597 raise_no_such_device (connection, message, udi);
2603 reply = dbus_message_new_method_return (message);
2618 device_emit_condition (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2631 udi = dbus_message_get_path (message);
2634 raise_permission_denied (connection, message, "EmitCondition: only allowed for helpers");
2641 if (!dbus_message_get_args (message, &error,
2645 raise_syntax (connection, message, "EmitCondition");
2655 raise_no_such_device (connection, message, udi);
2663 reply = dbus_message_new_method_return (message);
2687 device_claim_interface (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2700 udi = dbus_message_get_path (message);
2703 raise_permission_denied (connection, message, "ClaimInterface: only allowed for helpers");
2710 if (!dbus_message_get_args (message, &error,
2714 raise_syntax (connection, message, "ClaimInterface");
2723 raise_no_such_device (connection, message, udi);
2744 reply = dbus_message_new_method_return (message);
2760 addon_is_ready (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2771 udi = dbus_message_get_path (message);
2774 raise_permission_denied (connection, message, "AddonIsReady: only allowed for helpers");
2781 if (!dbus_message_get_args (message, &error,
2783 raise_syntax (connection, message, "AddonIsReady");
2792 raise_no_such_device (connection, message, udi);
2806 reply = dbus_message_new_method_return (message);
2824 manager_new_device (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2836 if (!local_interface && !sender_has_privileges (connection, message)) {
2837 raise_permission_denied (connection, message, "NewDevice: not privileged");
2841 reply = dbus_message_new_method_return (message);
2857 raise_error (connection, message, "org.freedesktop.Hal.NoSpace", "NewDevice: no space for device");
2894 manager_remove (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
2905 if (!local_interface && !sender_has_privileges (connection, message)) {
2906 raise_permission_denied (connection, message, "Remove: not privileged");
2910 if (!dbus_message_get_args (message, &error,
2913 raise_syntax (connection, message, "Remove");
2917 reply = dbus_message_new_method_return (message);
2929 raise_no_such_device (connection, message, udi);
2996 manager_commit_to_gdl (DBusConnection * connection, DBusMessage * message, dbus_bool_t local_interface)
3006 if (!local_interface && !sender_has_privileges (connection, message)) {
3007 raise_permission_denied (connection, message, "CommitToGdl: not privileged");
3011 if (!dbus_message_get_args (message, &error,
3015 raise_syntax (connection, message, "CommitToGdl");
3019 reply = dbus_message_new_method_return (message);
3029 raise_no_such_device (connection, message, tmp_udi);
3040 raise_error (connection, message, "org.freedesktop.Hal.DeviceExists", "CommitToGdl: Device exists: %s", udi);
3084 DBusMessage *message;
3097 /* hald_runner_run_method() assumes ownership of mi->message.. so we don't free it here */
3129 (gpointer) mi->message,
3136 raise_no_such_device (mi->connection, mi->message, mi->udi);
3262 DBusMessage *message;
3271 message = (DBusMessage *) data1;
3284 reply = dbus_message_new_error (message, "org.freedesktop.Hal.Device.UnknownError", "An unknown error occured");
3301 reply = dbus_message_new_error (message, exp_name, exp_detail);
3304 reply = dbus_message_new_error (message, "org.freedesktop.Hal.Device.UnknownError", "An unknown error occured");
3318 reply = dbus_message_new_method_return (message);
3335 dbus_message_unref (message);
3340 DBusMessage *message, const char *execpath)
3359 sender = dbus_message_get_sender (message);
3386 dbus_message_iter_init (message, &iter);
3490 mi->message = message;
3492 mi->member = g_strdup (dbus_message_get_member (message));
3493 mi->interface = g_strdup (dbus_message_get_interface (message));
3496 dbus_message_ref (message);
3525 DBusMessage *message,
3535 path = dbus_message_get_path (message);
3621 raise_no_such_device (connection, message, path);
3845 reply = dbus_message_new_method_return (message);
3893 hald_dbus_filter_handle_methods (DBusConnection *connection, DBusMessage *message,
3898 dbus_message_get_path (message),
3899 dbus_message_get_interface (message),
3900 dbus_message_get_member (message),
3903 if (dbus_message_is_method_call (message,
3906 strcmp (dbus_message_get_path (message),
3908 return manager_get_all_devices (connection, message);
3909 } else if (dbus_message_is_method_call (message,
3912 strcmp (dbus_message_get_path (message),
3914 return manager_device_exists (connection, message);
3915 } else if (dbus_message_is_method_call (message,
3918 strcmp (dbus_message_get_path (message),
3921 message);
3923 (message, "org.freedesktop.Hal.Manager",
3925 && strcmp (dbus_message_get_path (message),
3928 message);
3929 } else if (dbus_message_is_method_call (message,
3932 strcmp (dbus_message_get_path (message),
3934 return manager_claim_branch (connection, message);
3935 } else if (dbus_message_is_method_call (message,
3938 strcmp (dbus_message_get_path (message),
3940 return manager_unclaim_branch (connection, message);
3941 } else if (dbus_message_is_method_call (message,
3944 strcmp (dbus_message_get_path (message),
3946 return manager_new_device (connection, message, local_interface);
3947 } else if (dbus_message_is_method_call (message,
3950 strcmp (dbus_message_get_path (message),
3952 return manager_remove (connection, message, local_interface);
3953 } else if (dbus_message_is_method_call (message,
3956 strcmp (dbus_message_get_path (message),
3958 return manager_commit_to_gdl (connection, message, local_interface);
3959 } else if (dbus_message_is_method_call (message,
3962 return device_get_all_properties (connection, message);
3963 } else if (dbus_message_is_method_call (message,
3966 return device_set_multiple_properties (connection, message, local_interface);
3967 } else if (dbus_message_is_method_call (message,
3970 return device_get_property (connection, message);
3971 } else if (dbus_message_is_method_call (message,
3974 return device_get_property (connection, message);
3975 } else if (dbus_message_is_method_call (message,
3978 return device_get_property (connection, message);
3979 } else if (dbus_message_is_method_call (message,
3982 return device_get_property (connection, message);
3983 } else if (dbus_message_is_method_call (message,
3986 return device_get_property (connection, message);
3987 } else if (dbus_message_is_method_call (message,
3990 return device_get_property (connection, message);
3991 } else if (dbus_message_is_method_call (message,
3994 return device_set_property (connection, message, local_interface);
3995 } else if (dbus_message_is_method_call (message,
3998 return device_set_property (connection, message, local_interface);
3999 } else if (dbus_message_is_method_call (message,
4002 return device_set_property (connection, message, local_interface);
4003 } else if (dbus_message_is_method_call (message,
4006 return device_set_property (connection, message, local_interface);
4007 } else if (dbus_message_is_method_call (message,
4010 return device_set_property (connection, message, local_interface);
4011 } else if (dbus_message_is_method_call (message,
4014 return device_remove_property (connection, message, local_interface);
4015 } else if (dbus_message_is_method_call (message,
4018 return device_get_property_type (connection, message);
4019 } else if (dbus_message_is_method_call (message,
4022 return device_property_exists (connection, message);
4023 } else if (dbus_message_is_method_call (message,
4026 return device_add_capability (connection, message, local_interface);
4027 } else if (dbus_message_is_method_call (message,
4030 return device_query_capability (connection, message);
4031 } else if (dbus_message_is_method_call (message,
4034 return device_lock (connection, message);
4035 } else if (dbus_message_is_method_call (message,
4038 return device_unlock (connection, message);
4039 } else if (dbus_message_is_method_call (message,
4042 return device_string_list_append_prepend (connection, message, FALSE);
4043 } else if (dbus_message_is_method_call (message,
4046 return device_string_list_append_prepend (connection, message, TRUE);
4047 } else if (dbus_message_is_method_call (message,
4050 return device_string_list_remove (connection, message);
4051 } else if (dbus_message_is_method_call (message,
4054 return device_rescan (connection, message, local_interface);
4055 } else if (dbus_message_is_method_call (message,
4058 return device_reprobe (connection, message, local_interface);
4059 } else if (dbus_message_is_method_call (message,
4062 return device_emit_condition (connection, message, local_interface);
4063 } else if (dbus_message_is_method_call (message,
4066 return device_claim_interface (connection, message, local_interface);
4068 } else if (dbus_message_is_method_call (message,
4071 return device_release_interface (connection, message, local_interface);
4073 } else if (dbus_message_is_method_call (message,
4076 return addon_is_ready (connection, message, local_interface);
4077 } else if (dbus_message_is_method_call (message,
4080 return do_introspect (connection, message, local_interface);
4090 udi = dbus_message_get_path (message);
4091 interface = dbus_message_get_interface (message);
4092 method = dbus_message_get_member (message);
4093 signature = dbus_message_get_signature (message);
4115 dbus_message_ref (message);
4117 /* send a copy of the message */
4118 copy = dbus_message_copy (message);
4125 /*HAL_INFO (("connection=%x message=%x", connection, message));*/
4128 (void *) message,
4174 message, execpath);
4185 return osspec_filter_function (connection, message, user_data);
4193 * @param message Message
4195 * @return What to do with the message
4199 DBusMessage * message, void *user_data)
4201 if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") &&
4202 strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
4204 /* this is a local message; e.g. from libdbus in this process */
4206 HAL_INFO (("Got disconnected from the system message bus; "
4213 } else if (dbus_message_is_signal (message,
4218 service_deleted (message);
4220 return hald_dbus_filter_handle_methods (connection, message, user_data, FALSE);
4229 DBusMessage *message,
4233 dbus_message_get_destination (message),
4234 dbus_message_get_path (message),
4235 dbus_message_get_interface (message),
4236 dbus_message_get_member (message)));*/
4238 if (dbus_message_is_method_call (message, "org.freedesktop.DBus", "AddMatch")) {
4242 reply = dbus_message_new_method_return (message);
4249 } else if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") &&
4250 strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
4272 } else if (dbus_message_get_type (message) == DBUS_MESSAGE_TYPE_SIGNAL) {
4275 /* it's a signal, just forward it onto the system message bus */
4276 copy = dbus_message_copy (message);
4282 return hald_dbus_filter_handle_methods (connection, message, user_data, TRUE);
4369 HAL_ERROR (("dbus_bus_get(): %s", dbus_error.message));
4380 dbus_error.message));