Lines Matching refs:context
16 static int transport_dbus_property_update(struct mbox_context *context, in transport_dbus_property_update() argument
40 rc = sd_bus_emit_properties_changed_strv(context->bus, in transport_dbus_property_update()
50 static int transport_dbus_put_events(struct mbox_context *context, uint8_t mask) in transport_dbus_put_events() argument
52 return transport_dbus_property_update(context, mask); in transport_dbus_put_events()
55 static int transport_dbus_set_events(struct mbox_context *context, in transport_dbus_set_events() argument
58 return transport_dbus_property_update(context, events & mask); in transport_dbus_set_events()
61 static int transport_dbus_clear_events(struct mbox_context *context, in transport_dbus_clear_events() argument
64 return transport_dbus_property_update(context, events & mask); in transport_dbus_clear_events()
76 struct mbox_context *context = userdata; in transport_dbus_reset() local
80 if (!context) { in transport_dbus_reset()
85 rc = context->protocol->reset(context); in transport_dbus_reset()
104 struct mbox_context *context = userdata; in transport_dbus_get_info() local
109 if (!context) { in transport_dbus_get_info()
120 rc = context->protocol->get_info(context, &io); in transport_dbus_get_info()
126 context->transport = &transport_dbus_ops; in transport_dbus_get_info()
128 protocol_events_set(context, context->bmc_events); in transport_dbus_get_info()
159 struct mbox_context *context = userdata; in transport_dbus_get_flash_info() local
164 if (!context) { in transport_dbus_get_flash_info()
169 rc = context->protocol->get_flash_info(context, &io); in transport_dbus_get_flash_info()
193 static int transport_dbus_create_window(struct mbox_context *context, in transport_dbus_create_window() argument
202 if (!context) { in transport_dbus_create_window()
214 rc = context->protocol->create_window(context, &io); in transport_dbus_create_window()
242 struct mbox_context *context = userdata; in transport_dbus_create_read_window() local
244 return transport_dbus_create_window(context, true, m, ret_error); in transport_dbus_create_read_window()
250 struct mbox_context *context = userdata; in transport_dbus_create_write_window() local
252 return transport_dbus_create_window(context, false, m, ret_error); in transport_dbus_create_write_window()
258 struct mbox_context *context = userdata; in transport_dbus_close_window() local
263 if (!context) { in transport_dbus_close_window()
274 rc = context->protocol->close(context, &io); in transport_dbus_close_window()
294 struct mbox_context *context = userdata; in transport_dbus_mark_dirty() local
299 if (!context) { in transport_dbus_mark_dirty()
310 rc = context->protocol->mark_dirty(context, &io); in transport_dbus_mark_dirty()
329 struct mbox_context *context = userdata; in transport_dbus_write_flush() local
333 if (!context) { in transport_dbus_write_flush()
338 rc = context->protocol->flush(context, NULL /* No args in v2 */); in transport_dbus_write_flush()
357 struct mbox_context *context = userdata; in transport_dbus_ack() local
362 if (!context) { in transport_dbus_ack()
373 rc = context->protocol->ack(context, &io); in transport_dbus_ack()
392 struct mbox_context *context = userdata; in transport_dbus_erase() local
397 if (!context) { in transport_dbus_erase()
408 rc = context->protocol->erase(context, &io); in transport_dbus_erase()
432 struct mbox_context *context = userdata; in transport_dbus_get_property() local
439 value = context->bmc_events & BMC_EVENT_FLASH_CTRL_LOST; in transport_dbus_get_property()
441 value = context->bmc_events & BMC_EVENT_DAEMON_READY; in transport_dbus_get_property()
443 value = context->bmc_events & BMC_EVENT_WINDOW_RESET; in transport_dbus_get_property()
445 value = context->bmc_events & BMC_EVENT_PROTOCOL_RESET; in transport_dbus_get_property()
507 int transport_dbus_init(struct mbox_context *context, in transport_dbus_init() argument
512 rc = sd_bus_add_object_vtable(context->bus, NULL, in transport_dbus_init()
516 context); in transport_dbus_init()
521 rc = sd_bus_add_object_vtable(context->bus, NULL, in transport_dbus_init()
524 protocol_v2_vtable, context); in transport_dbus_init()
529 context->transport = &transport_dbus_ops; in transport_dbus_init()
539 void transport_dbus_free(struct mbox_context *context __unused) in transport_dbus_free()