Lines Matching refs:call
139 sd_bus_message *call,
145 assert_return(call, -EINVAL);
146 assert_return(call->sealed, -EPERM);
147 assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL);
148 assert_return(call->bus, -EINVAL);
149 assert_return(!bus_pid_changed(call->bus), -ECHILD);
151 if (!BUS_IS_OPEN(call->bus->state))
154 if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
157 r = sd_bus_message_new_method_return(call, &m);
171 return sd_bus_send(call->bus, m, NULL);
175 sd_bus_message *call,
181 assert_return(call, -EINVAL);
182 assert_return(call->sealed, -EPERM);
183 assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL);
185 assert_return(call->bus, -EINVAL);
186 assert_return(!bus_pid_changed(call->bus), -ECHILD);
188 if (!BUS_IS_OPEN(call->bus->state))
191 if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
194 r = sd_bus_message_new_method_error(call, &m, e);
198 return sd_bus_send(call->bus, m, NULL);
202 sd_bus_message *call,
210 assert_return(call, -EINVAL);
211 assert_return(call->sealed, -EPERM);
212 assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL);
213 assert_return(call->bus, -EINVAL);
214 assert_return(!bus_pid_changed(call->bus), -ECHILD);
216 if (!BUS_IS_OPEN(call->bus->state))
219 if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
226 return sd_bus_reply_method_error(call, &error);
230 sd_bus_message *call,
236 assert_return(call, -EINVAL);
237 assert_return(call->sealed, -EPERM);
238 assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL);
239 assert_return(call->bus, -EINVAL);
240 assert_return(!bus_pid_changed(call->bus), -ECHILD);
242 if (!BUS_IS_OPEN(call->bus->state))
245 if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
249 return sd_bus_reply_method_error(call, p);
253 return sd_bus_reply_method_error(call, &berror);
257 sd_bus_message *call,
265 assert_return(call, -EINVAL);
266 assert_return(call->sealed, -EPERM);
267 assert_return(call->header->type == SD_BUS_MESSAGE_METHOD_CALL, -EINVAL);
268 assert_return(call->bus, -EINVAL);
269 assert_return(!bus_pid_changed(call->bus), -ECHILD);
271 if (!BUS_IS_OPEN(call->bus->state))
274 if (call->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED)
281 return sd_bus_reply_method_error(call, &berror);
511 _public_ int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds) {
514 assert_return(call, -EINVAL);
515 assert_return(call->sealed, -EPERM);
516 assert_return(call->bus, -EINVAL);
517 assert_return(!bus_pid_changed(call->bus), -ECHILD);
519 if (!BUS_IS_OPEN(call->bus->state))
522 c = sd_bus_message_get_creds(call);
532 /* We couldn't read anything from the call, let's try
535 if (call->sender)
542 return sd_bus_get_name_creds(call->bus, call->sender, mask, creds);
549 return sd_bus_get_owner_creds(call->bus, mask, creds);
555 _public_ int sd_bus_query_sender_privilege(sd_bus_message *call, int capability) {
561 assert_return(call, -EINVAL);
562 assert_return(call->sealed, -EPERM);
563 assert_return(call->bus, -EINVAL);
564 assert_return(!bus_pid_changed(call->bus), -ECHILD);
566 if (!BUS_IS_OPEN(call->bus->state))
571 r = sd_bus_query_sender_creds(call, SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID|SD_BUS_CREDS_EFFECTIVE_CAPS, &creds);
591 r = sd_bus_query_sender_creds(call, SD_BUS_CREDS_UID|SD_BUS_CREDS_EUID, &creds);