Lines Matching refs:message

182 int bus_session_method_terminate(sd_bus_message *message, void *userdata, sd_bus_error *error) {
186 assert(message);
190 message,
207 return sd_bus_reply_method_return(message, NULL);
210 int bus_session_method_activate(sd_bus_message *message, void *userdata, sd_bus_error *error) {
214 assert(message);
221 return sd_bus_reply_method_return(message, NULL);
224 int bus_session_method_lock(sd_bus_message *message, void *userdata, sd_bus_error *error) {
228 assert(message);
232 message,
245 r = session_send_lock(s, strstr(sd_bus_message_get_member(message), "Lock"));
249 return sd_bus_reply_method_return(message, NULL);
252 static int method_set_idle_hint(sd_bus_message *message, void *userdata, sd_bus_error *error) {
258 assert(message);
261 r = sd_bus_message_read(message, "b", &b);
265 r = sd_bus_query_sender_creds(message, SD_BUS_CREDS_EUID, &creds);
278 return sd_bus_reply_method_return(message, NULL);
281 int bus_session_method_kill(sd_bus_message *message, void *userdata, sd_bus_error *error) {
288 assert(message);
291 r = sd_bus_message_read(message, "si", &swho, &signo);
307 message,
324 return sd_bus_reply_method_return(message, NULL);
327 static int method_take_control(sd_bus_message *message, void *userdata, sd_bus_error *error) {
333 assert(message);
336 r = sd_bus_message_read(message, "b", &force);
340 r = sd_bus_query_sender_creds(message, SD_BUS_CREDS_EUID, &creds);
351 r = session_set_controller(s, sd_bus_message_get_sender(message), force);
355 return sd_bus_reply_method_return(message, NULL);
358 static int method_release_control(sd_bus_message *message, void *userdata, sd_bus_error *error) {
361 assert(message);
364 if (!session_is_controller(s, sd_bus_message_get_sender(message)))
369 return sd_bus_reply_method_return(message, NULL);
372 static int method_take_device(sd_bus_message *message, void *userdata, sd_bus_error *error) {
379 assert(message);
382 r = sd_bus_message_read(message, "uu", &major, &minor);
386 if (!session_is_controller(s, sd_bus_message_get_sender(message)))
403 r = sd_bus_reply_method_return(message, "hb", sd->fd, !sd->active);
410 static int method_release_device(sd_bus_message *message, void *userdata, sd_bus_error *error) {
417 assert(message);
420 r = sd_bus_message_read(message, "uu", &major, &minor);
424 if (!session_is_controller(s, sd_bus_message_get_sender(message)))
433 return sd_bus_reply_method_return(message, NULL);
436 static int method_pause_device_complete(sd_bus_message *message, void *userdata, sd_bus_error *error) {
443 assert(message);
446 r = sd_bus_message_read(message, "uu", &major, &minor);
450 if (!session_is_controller(s, sd_bus_message_get_sender(message)))
460 return sd_bus_reply_method_return(message, NULL);
523 sd_bus_message *message;
526 message = sd_bus_get_current_message(bus);
527 if (!message)
530 r = sd_bus_query_sender_creds(message, SD_BUS_CREDS_SESSION|SD_BUS_CREDS_AUGMENT, &creds);
575 sd_bus_message *message;
597 message = sd_bus_get_current_message(bus);
598 if (message) {
602 r = sd_bus_query_sender_creds(message, SD_BUS_CREDS_SESSION|SD_BUS_CREDS_AUGMENT, &creds);