diff options
author | Pavel Březina <pbrezina@redhat.com> | 2015-01-20 21:44:20 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-01-23 21:29:47 +0100 |
commit | 66277b21179d95f6e96abed01a20ccbccf27ce99 (patch) | |
tree | 0ba0c91f1e8f67325c217428d44b3dae695aed57 | |
parent | b742179ac0790068380618ab72a06af18544f09c (diff) | |
download | sssd-66277b21179d95f6e96abed01a20ccbccf27ce99.tar.gz sssd-66277b21179d95f6e96abed01a20ccbccf27ce99.tar.xz sssd-66277b21179d95f6e96abed01a20ccbccf27ce99.zip |
sbus: unify naming of handler data variable
We used three different names to express handler data:
- pvt
- instace_data
- handler_data
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
-rw-r--r-- | src/responder/ifp/ifp_iface_generated.c | 52 | ||||
-rwxr-xr-x | src/sbus/sbus_codegen | 6 | ||||
-rw-r--r-- | src/sbus/sssd_dbus.h | 6 | ||||
-rw-r--r-- | src/sbus/sssd_dbus_interface.c | 14 | ||||
-rw-r--r-- | src/sbus/sssd_dbus_properties.c | 4 | ||||
-rw-r--r-- | src/tests/sbus_codegen_tests_generated.c | 100 | ||||
-rw-r--r-- | src/tests/sbus_tests.c | 2 |
7 files changed, 92 insertions, 92 deletions
diff --git a/src/responder/ifp/ifp_iface_generated.c b/src/responder/ifp/ifp_iface_generated.c index 62a21e911..5d7dd3908 100644 --- a/src/responder/ifp/ifp_iface_generated.c +++ b/src/responder/ifp/ifp_iface_generated.c @@ -446,7 +446,7 @@ static int invoke_infopipe_component_get_all(struct sbus_request *dbus_req, void if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "name", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -457,7 +457,7 @@ static int invoke_infopipe_component_get_all(struct sbus_request *dbus_req, void if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { u_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (u_handler) { - (u_handler)(dbus_req, dbus_req->intf->instance_data, &u_prop_val); + (u_handler)(dbus_req, dbus_req->intf->handler_data, &u_prop_val); u_out_val = u_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "debug_level", DBUS_TYPE_UINT32, &u_out_val); if (ret != EOK) return ret; @@ -468,7 +468,7 @@ static int invoke_infopipe_component_get_all(struct sbus_request *dbus_req, void if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { b_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (b_handler) { - (b_handler)(dbus_req, dbus_req->intf->instance_data, &b_prop_val); + (b_handler)(dbus_req, dbus_req->intf->handler_data, &b_prop_val); b_out_val = b_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "enabled", DBUS_TYPE_BOOLEAN, &b_out_val); if (ret != EOK) return ret; @@ -479,7 +479,7 @@ static int invoke_infopipe_component_get_all(struct sbus_request *dbus_req, void if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "type", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -490,7 +490,7 @@ static int invoke_infopipe_component_get_all(struct sbus_request *dbus_req, void if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { as_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (as_handler) { - (as_handler)(dbus_req, dbus_req->intf->instance_data, &as_prop_val, &as_prop_len); + (as_handler)(dbus_req, dbus_req->intf->handler_data, &as_prop_val, &as_prop_len); as_out_val = as_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "providers", DBUS_TYPE_STRING, (uint8_t*)as_out_val, as_prop_len, sizeof(const char *)); if (ret != EOK) return ret; @@ -686,7 +686,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "name", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -697,7 +697,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "provider", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -708,7 +708,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { as_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (as_handler) { - (as_handler)(dbus_req, dbus_req->intf->instance_data, &as_prop_val, &as_prop_len); + (as_handler)(dbus_req, dbus_req->intf->handler_data, &as_prop_val, &as_prop_len); as_out_val = as_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "primary_servers", DBUS_TYPE_STRING, (uint8_t*)as_out_val, as_prop_len, sizeof(const char *)); if (ret != EOK) return ret; @@ -719,7 +719,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { as_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (as_handler) { - (as_handler)(dbus_req, dbus_req->intf->instance_data, &as_prop_val, &as_prop_len); + (as_handler)(dbus_req, dbus_req->intf->handler_data, &as_prop_val, &as_prop_len); as_out_val = as_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "backup_servers", DBUS_TYPE_STRING, (uint8_t*)as_out_val, as_prop_len, sizeof(const char *)); if (ret != EOK) return ret; @@ -730,7 +730,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { u_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (u_handler) { - (u_handler)(dbus_req, dbus_req->intf->instance_data, &u_prop_val); + (u_handler)(dbus_req, dbus_req->intf->handler_data, &u_prop_val); u_out_val = u_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "min_id", DBUS_TYPE_UINT32, &u_out_val); if (ret != EOK) return ret; @@ -741,7 +741,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { u_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (u_handler) { - (u_handler)(dbus_req, dbus_req->intf->instance_data, &u_prop_val); + (u_handler)(dbus_req, dbus_req->intf->handler_data, &u_prop_val); u_out_val = u_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "max_id", DBUS_TYPE_UINT32, &u_out_val); if (ret != EOK) return ret; @@ -752,7 +752,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "realm", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -763,7 +763,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "forest", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -774,7 +774,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "login_format", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -785,7 +785,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "fully_qualified_name_format", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -796,7 +796,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { b_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (b_handler) { - (b_handler)(dbus_req, dbus_req->intf->instance_data, &b_prop_val); + (b_handler)(dbus_req, dbus_req->intf->handler_data, &b_prop_val); b_out_val = b_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "enumerable", DBUS_TYPE_BOOLEAN, &b_out_val); if (ret != EOK) return ret; @@ -807,7 +807,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { b_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (b_handler) { - (b_handler)(dbus_req, dbus_req->intf->instance_data, &b_prop_val); + (b_handler)(dbus_req, dbus_req->intf->handler_data, &b_prop_val); b_out_val = b_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "use_fully_qualified_names", DBUS_TYPE_BOOLEAN, &b_out_val); if (ret != EOK) return ret; @@ -818,7 +818,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { b_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (b_handler) { - (b_handler)(dbus_req, dbus_req->intf->instance_data, &b_prop_val); + (b_handler)(dbus_req, dbus_req->intf->handler_data, &b_prop_val); b_out_val = b_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "subdomain", DBUS_TYPE_BOOLEAN, &b_out_val); if (ret != EOK) return ret; @@ -829,7 +829,7 @@ static int invoke_infopipe_domain_get_all(struct sbus_request *dbus_req, void *f if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { o_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (o_handler) { - (o_handler)(dbus_req, dbus_req->intf->instance_data, &o_prop_val); + (o_handler)(dbus_req, dbus_req->intf->handler_data, &o_prop_val); o_out_val = o_prop_val == NULL ? "/" : o_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "parent_domain", DBUS_TYPE_OBJECT_PATH, &o_out_val); if (ret != EOK) return ret; @@ -863,7 +863,7 @@ static int invoke_s_method(struct sbus_request *dbus_req, void *function_ptr) return EOK; /* request handled */ } - return (handler)(dbus_req, dbus_req->intf->instance_data, + return (handler)(dbus_req, dbus_req->intf->handler_data, arg_0); } @@ -879,7 +879,7 @@ static int invoke_u_method(struct sbus_request *dbus_req, void *function_ptr) return EOK; /* request handled */ } - return (handler)(dbus_req, dbus_req->intf->instance_data, + return (handler)(dbus_req, dbus_req->intf->handler_data, arg_0); } @@ -891,7 +891,7 @@ static int invoke_get_s(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val == NULL ? "" : prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_STRING, &out_val); @@ -905,7 +905,7 @@ static int invoke_get_b(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, bool *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_BOOLEAN, &out_val); @@ -919,7 +919,7 @@ static int invoke_get_u(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint32_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_UINT32, &out_val); @@ -934,7 +934,7 @@ static int invoke_get_as(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_STRING, (uint8_t*)out_val, prop_len, sizeof(const char *)); @@ -948,7 +948,7 @@ static int invoke_get_o(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val == NULL ? "/" : prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_OBJECT_PATH, &out_val); diff --git a/src/sbus/sbus_codegen b/src/sbus/sbus_codegen index b4e63f33e..4ab7a5498 100755 --- a/src/sbus/sbus_codegen +++ b/src/sbus/sbus_codegen @@ -282,7 +282,7 @@ def source_method_invoker(signature, args): out(" }") out("") - out(" return (handler)(dbus_req, dbus_req->intf->instance_data", new_line=False) + out(" return (handler)(dbus_req, dbus_req->intf->handler_data", new_line=False) for i in range(0, len(args)): arg = args[i] out(",\n arg_%d", i, new_line=False) @@ -323,7 +323,7 @@ def source_getter_invoker(prop): out(" = function_ptr;") out("") - out(" (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val", new_line=False) + out(" (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val", new_line=False) if prop.is_array: out(", &prop_len", new_line=False) out(");") @@ -380,7 +380,7 @@ def source_getall_invoker(iface, prop_invokers): out(" if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) {") out(" %s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get);", prop.type) out(" if (%s_handler) {", prop.type) - out(" (%s_handler)(dbus_req, dbus_req->intf->instance_data, &%s_prop_val", prop.type, prop.type, new_line=False) + out(" (%s_handler)(dbus_req, dbus_req->intf->handler_data, &%s_prop_val", prop.type, prop.type, new_line=False) if prop.is_array: out(", &%s_prop_len", prop.type, new_line=False) out(");") diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h index 0d021f8fd..87cffe284 100644 --- a/src/sbus/sssd_dbus.h +++ b/src/sbus/sssd_dbus.h @@ -55,7 +55,7 @@ struct sbus_request; #endif /* DBUS_ERROR_INIT */ typedef int (*sbus_msg_handler_fn)(struct sbus_request *dbus_req, - void *instance_data); + void *handler_data); /* * sbus_conn_destructor_fn @@ -110,7 +110,7 @@ struct sbus_vtable { struct sbus_interface { const char *path; struct sbus_vtable *vtable; - void *instance_data; + void *handler_data; }; /* Server Functions */ @@ -168,7 +168,7 @@ void sbus_disconnect(struct sbus_connection *conn); int sbus_conn_register_iface(struct sbus_connection *conn, struct sbus_vtable *iface_vtable, const char *object_path, - void *pvt); + void *handler_data); errno_t sbus_conn_reregister_paths(struct sbus_connection *conn); diff --git a/src/sbus/sssd_dbus_interface.c b/src/sbus/sssd_dbus_interface.c index 0a652ba4d..a528e3cc9 100644 --- a/src/sbus/sssd_dbus_interface.c +++ b/src/sbus/sssd_dbus_interface.c @@ -430,7 +430,7 @@ static struct sbus_interface * sbus_new_interface(TALLOC_CTX *mem_ctx, const char *object_path, struct sbus_vtable *iface_vtable, - void *instance_data) + void *handler_data) { struct sbus_interface *intf; @@ -448,7 +448,7 @@ sbus_new_interface(TALLOC_CTX *mem_ctx, } intf->vtable = iface_vtable; - intf->instance_data = instance_data; + intf->handler_data = handler_data; return intf; } @@ -513,7 +513,7 @@ errno_t sbus_conn_register_iface(struct sbus_connection *conn, struct sbus_vtable *iface_vtable, const char *object_path, - void *pvt) + void *handler_data) { struct sbus_interface *iface = NULL; bool path_known; @@ -523,7 +523,7 @@ sbus_conn_register_iface(struct sbus_connection *conn, return EINVAL; } - iface = sbus_new_interface(conn, object_path, iface_vtable, pvt); + iface = sbus_new_interface(conn, object_path, iface_vtable, handler_data); if (iface == NULL) { return ENOMEM; } @@ -599,7 +599,7 @@ sbus_message_handler_got_caller_id(struct tevent_req *req); static DBusHandlerResult sbus_message_handler(DBusConnection *dbus_conn, DBusMessage *message, - void *user_data) + void *handler_data) { struct tevent_req *req; struct sbus_connection *conn; @@ -611,7 +611,7 @@ sbus_message_handler(DBusConnection *dbus_conn, const char *path; const char *sender; - conn = talloc_get_type(user_data, struct sbus_connection); + conn = talloc_get_type(handler_data, struct sbus_connection); /* header information */ iface_name = dbus_message_get_interface(message); @@ -688,7 +688,7 @@ sbus_message_handler_got_caller_id(struct tevent_req *req) handler = VTABLE_FUNC(sbus_req->intf->vtable, method->vtable_offset); invoker = method->invoker; - pvt = sbus_req->intf->instance_data; + pvt = sbus_req->intf->handler_data; sbus_request_invoke_or_finish(sbus_req, handler, pvt, invoker); return; diff --git a/src/sbus/sssd_dbus_properties.c b/src/sbus/sssd_dbus_properties.c index bdaef4591..060da584e 100644 --- a/src/sbus/sssd_dbus_properties.c +++ b/src/sbus/sssd_dbus_properties.c @@ -203,7 +203,7 @@ static int sbus_properties_get(struct sbus_request *sbus_req, void *pvt) } return sbus_properties_invoke(sbus_req, iface, handler_fn, - iface->instance_data, prop->invoker_get); + iface->handler_data, prop->invoker_get); fail: return sbus_request_fail_and_finish(sbus_req, error); @@ -277,7 +277,7 @@ static int sbus_properties_set(struct sbus_request *sbus_req, void *pvt) } return sbus_properties_invoke(sbus_req, iface, handler_fn, - iface->instance_data, prop->invoker_set); + iface->handler_data, prop->invoker_set); fail: return sbus_request_fail_and_finish(sbus_req, error); diff --git a/src/tests/sbus_codegen_tests_generated.c b/src/tests/sbus_codegen_tests_generated.c index 502d6ce8a..be5c264b7 100644 --- a/src/tests/sbus_codegen_tests_generated.c +++ b/src/tests/sbus_codegen_tests_generated.c @@ -155,7 +155,7 @@ static int invoke_com_planetexpress_Ship_get_all(struct sbus_request *dbus_req, if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "Color", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -617,7 +617,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "FullName", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -628,7 +628,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { y_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (y_handler) { - (y_handler)(dbus_req, dbus_req->intf->instance_data, &y_prop_val); + (y_handler)(dbus_req, dbus_req->intf->handler_data, &y_prop_val); y_out_val = y_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "byte", DBUS_TYPE_BYTE, &y_out_val); if (ret != EOK) return ret; @@ -639,7 +639,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { b_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (b_handler) { - (b_handler)(dbus_req, dbus_req->intf->instance_data, &b_prop_val); + (b_handler)(dbus_req, dbus_req->intf->handler_data, &b_prop_val); b_out_val = b_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "boolean", DBUS_TYPE_BOOLEAN, &b_out_val); if (ret != EOK) return ret; @@ -650,7 +650,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { n_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (n_handler) { - (n_handler)(dbus_req, dbus_req->intf->instance_data, &n_prop_val); + (n_handler)(dbus_req, dbus_req->intf->handler_data, &n_prop_val); n_out_val = n_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "int16", DBUS_TYPE_INT16, &n_out_val); if (ret != EOK) return ret; @@ -661,7 +661,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { q_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (q_handler) { - (q_handler)(dbus_req, dbus_req->intf->instance_data, &q_prop_val); + (q_handler)(dbus_req, dbus_req->intf->handler_data, &q_prop_val); q_out_val = q_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "uint16", DBUS_TYPE_UINT16, &q_out_val); if (ret != EOK) return ret; @@ -672,7 +672,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { i_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (i_handler) { - (i_handler)(dbus_req, dbus_req->intf->instance_data, &i_prop_val); + (i_handler)(dbus_req, dbus_req->intf->handler_data, &i_prop_val); i_out_val = i_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "int32", DBUS_TYPE_INT32, &i_out_val); if (ret != EOK) return ret; @@ -683,7 +683,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { u_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (u_handler) { - (u_handler)(dbus_req, dbus_req->intf->instance_data, &u_prop_val); + (u_handler)(dbus_req, dbus_req->intf->handler_data, &u_prop_val); u_out_val = u_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "uint32", DBUS_TYPE_UINT32, &u_out_val); if (ret != EOK) return ret; @@ -694,7 +694,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { x_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (x_handler) { - (x_handler)(dbus_req, dbus_req->intf->instance_data, &x_prop_val); + (x_handler)(dbus_req, dbus_req->intf->handler_data, &x_prop_val); x_out_val = x_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "int64", DBUS_TYPE_INT64, &x_out_val); if (ret != EOK) return ret; @@ -705,7 +705,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { t_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (t_handler) { - (t_handler)(dbus_req, dbus_req->intf->instance_data, &t_prop_val); + (t_handler)(dbus_req, dbus_req->intf->handler_data, &t_prop_val); t_out_val = t_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "uint64", DBUS_TYPE_UINT64, &t_out_val); if (ret != EOK) return ret; @@ -716,7 +716,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { d_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (d_handler) { - (d_handler)(dbus_req, dbus_req->intf->instance_data, &d_prop_val); + (d_handler)(dbus_req, dbus_req->intf->handler_data, &d_prop_val); d_out_val = d_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "double", DBUS_TYPE_DOUBLE, &d_out_val); if (ret != EOK) return ret; @@ -727,7 +727,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "string", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -738,7 +738,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { o_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (o_handler) { - (o_handler)(dbus_req, dbus_req->intf->instance_data, &o_prop_val); + (o_handler)(dbus_req, dbus_req->intf->handler_data, &o_prop_val); o_out_val = o_prop_val == NULL ? "/" : o_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "object_path", DBUS_TYPE_OBJECT_PATH, &o_out_val); if (ret != EOK) return ret; @@ -749,7 +749,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { s_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (s_handler) { - (s_handler)(dbus_req, dbus_req->intf->instance_data, &s_prop_val); + (s_handler)(dbus_req, dbus_req->intf->handler_data, &s_prop_val); s_out_val = s_prop_val == NULL ? "" : s_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "null_string", DBUS_TYPE_STRING, &s_out_val); if (ret != EOK) return ret; @@ -760,7 +760,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { o_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (o_handler) { - (o_handler)(dbus_req, dbus_req->intf->instance_data, &o_prop_val); + (o_handler)(dbus_req, dbus_req->intf->handler_data, &o_prop_val); o_out_val = o_prop_val == NULL ? "/" : o_prop_val; ret = sbus_add_variant_to_dict(&iter_dict, "null_path", DBUS_TYPE_OBJECT_PATH, &o_out_val); if (ret != EOK) return ret; @@ -771,7 +771,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { ay_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (ay_handler) { - (ay_handler)(dbus_req, dbus_req->intf->instance_data, &ay_prop_val, &ay_prop_len); + (ay_handler)(dbus_req, dbus_req->intf->handler_data, &ay_prop_val, &ay_prop_len); ay_out_val = ay_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "byte_array", DBUS_TYPE_BYTE, (uint8_t*)ay_out_val, ay_prop_len, sizeof(uint8_t)); if (ret != EOK) return ret; @@ -782,7 +782,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { an_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (an_handler) { - (an_handler)(dbus_req, dbus_req->intf->instance_data, &an_prop_val, &an_prop_len); + (an_handler)(dbus_req, dbus_req->intf->handler_data, &an_prop_val, &an_prop_len); an_out_val = an_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "int16_array", DBUS_TYPE_INT16, (uint8_t*)an_out_val, an_prop_len, sizeof(int16_t)); if (ret != EOK) return ret; @@ -793,7 +793,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { aq_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (aq_handler) { - (aq_handler)(dbus_req, dbus_req->intf->instance_data, &aq_prop_val, &aq_prop_len); + (aq_handler)(dbus_req, dbus_req->intf->handler_data, &aq_prop_val, &aq_prop_len); aq_out_val = aq_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "uint16_array", DBUS_TYPE_UINT16, (uint8_t*)aq_out_val, aq_prop_len, sizeof(uint16_t)); if (ret != EOK) return ret; @@ -804,7 +804,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { ai_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (ai_handler) { - (ai_handler)(dbus_req, dbus_req->intf->instance_data, &ai_prop_val, &ai_prop_len); + (ai_handler)(dbus_req, dbus_req->intf->handler_data, &ai_prop_val, &ai_prop_len); ai_out_val = ai_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "int32_array", DBUS_TYPE_INT32, (uint8_t*)ai_out_val, ai_prop_len, sizeof(int32_t)); if (ret != EOK) return ret; @@ -815,7 +815,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { au_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (au_handler) { - (au_handler)(dbus_req, dbus_req->intf->instance_data, &au_prop_val, &au_prop_len); + (au_handler)(dbus_req, dbus_req->intf->handler_data, &au_prop_val, &au_prop_len); au_out_val = au_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "uint32_array", DBUS_TYPE_UINT32, (uint8_t*)au_out_val, au_prop_len, sizeof(uint32_t)); if (ret != EOK) return ret; @@ -826,7 +826,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { ax_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (ax_handler) { - (ax_handler)(dbus_req, dbus_req->intf->instance_data, &ax_prop_val, &ax_prop_len); + (ax_handler)(dbus_req, dbus_req->intf->handler_data, &ax_prop_val, &ax_prop_len); ax_out_val = ax_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "int64_array", DBUS_TYPE_INT64, (uint8_t*)ax_out_val, ax_prop_len, sizeof(int64_t)); if (ret != EOK) return ret; @@ -837,7 +837,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { at_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (at_handler) { - (at_handler)(dbus_req, dbus_req->intf->instance_data, &at_prop_val, &at_prop_len); + (at_handler)(dbus_req, dbus_req->intf->handler_data, &at_prop_val, &at_prop_len); at_out_val = at_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "uint64_array", DBUS_TYPE_UINT64, (uint8_t*)at_out_val, at_prop_len, sizeof(uint64_t)); if (ret != EOK) return ret; @@ -848,7 +848,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { ad_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (ad_handler) { - (ad_handler)(dbus_req, dbus_req->intf->instance_data, &ad_prop_val, &ad_prop_len); + (ad_handler)(dbus_req, dbus_req->intf->handler_data, &ad_prop_val, &ad_prop_len); ad_out_val = ad_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "double_array", DBUS_TYPE_DOUBLE, (uint8_t*)ad_out_val, ad_prop_len, sizeof(double)); if (ret != EOK) return ret; @@ -859,7 +859,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { as_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (as_handler) { - (as_handler)(dbus_req, dbus_req->intf->instance_data, &as_prop_val, &as_prop_len); + (as_handler)(dbus_req, dbus_req->intf->handler_data, &as_prop_val, &as_prop_len); as_out_val = as_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "string_array", DBUS_TYPE_STRING, (uint8_t*)as_out_val, as_prop_len, sizeof(const char *)); if (ret != EOK) return ret; @@ -870,7 +870,7 @@ static int invoke_test_pilot_get_all(struct sbus_request *dbus_req, void *functi if (property != NULL && property->flags & SBUS_PROPERTY_READABLE) { ao_handler = VTABLE_FUNC(intf->vtable, property->vtable_offset_get); if (ao_handler) { - (ao_handler)(dbus_req, dbus_req->intf->instance_data, &ao_prop_val, &ao_prop_len); + (ao_handler)(dbus_req, dbus_req->intf->handler_data, &ao_prop_val, &ao_prop_len); ao_out_val = ao_prop_val; ret = sbus_add_array_as_variant_to_dict(&iter_dict, "object_path_array", DBUS_TYPE_OBJECT_PATH, (uint8_t*)ao_out_val, ao_prop_len, sizeof(const char *)); if (ret != EOK) return ret; @@ -906,7 +906,7 @@ static int invoke_bu_method(struct sbus_request *dbus_req, void *function_ptr) return EOK; /* request handled */ } - return (handler)(dbus_req, dbus_req->intf->instance_data, + return (handler)(dbus_req, dbus_req->intf->handler_data, arg_0, arg_1); } @@ -923,7 +923,7 @@ static int invoke_s_method(struct sbus_request *dbus_req, void *function_ptr) return EOK; /* request handled */ } - return (handler)(dbus_req, dbus_req->intf->instance_data, + return (handler)(dbus_req, dbus_req->intf->handler_data, arg_0); } @@ -939,7 +939,7 @@ static int invoke_u_method(struct sbus_request *dbus_req, void *function_ptr) return EOK; /* request handled */ } - return (handler)(dbus_req, dbus_req->intf->instance_data, + return (handler)(dbus_req, dbus_req->intf->handler_data, arg_0); } @@ -1005,7 +1005,7 @@ static int invoke_ybnqiuxtdsoayanaqaiauaxatadasao_method(struct sbus_request *db return EOK; /* request handled */ } - return (handler)(dbus_req, dbus_req->intf->instance_data, + return (handler)(dbus_req, dbus_req->intf->handler_data, arg_0, arg_1, arg_2, @@ -1048,7 +1048,7 @@ static int invoke_get_aq(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint16_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_UINT16, (uint8_t*)out_val, prop_len, sizeof(uint16_t)); @@ -1062,7 +1062,7 @@ static int invoke_get_b(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, bool *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_BOOLEAN, &out_val); @@ -1076,7 +1076,7 @@ static int invoke_get_d(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, double *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_DOUBLE, &out_val); @@ -1091,7 +1091,7 @@ static int invoke_get_ao(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_OBJECT_PATH, (uint8_t*)out_val, prop_len, sizeof(const char *)); @@ -1105,7 +1105,7 @@ static int invoke_get_i(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, int32_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_INT32, &out_val); @@ -1120,7 +1120,7 @@ static int invoke_get_as(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_STRING, (uint8_t*)out_val, prop_len, sizeof(const char *)); @@ -1134,7 +1134,7 @@ static int invoke_get_o(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val == NULL ? "/" : prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_OBJECT_PATH, &out_val); @@ -1148,7 +1148,7 @@ static int invoke_get_n(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, int16_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_INT16, &out_val); @@ -1162,7 +1162,7 @@ static int invoke_get_q(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint16_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_UINT16, &out_val); @@ -1177,7 +1177,7 @@ static int invoke_get_ay(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint8_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_BYTE, (uint8_t*)out_val, prop_len, sizeof(uint8_t)); @@ -1191,7 +1191,7 @@ static int invoke_get_s(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, const char * *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val == NULL ? "" : prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_STRING, &out_val); @@ -1205,7 +1205,7 @@ static int invoke_get_u(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint32_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_UINT32, &out_val); @@ -1219,7 +1219,7 @@ static int invoke_get_t(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint64_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_UINT64, &out_val); @@ -1234,7 +1234,7 @@ static int invoke_get_ax(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, int64_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_INT64, (uint8_t*)out_val, prop_len, sizeof(int64_t)); @@ -1248,7 +1248,7 @@ static int invoke_get_y(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint8_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_BYTE, &out_val); @@ -1262,7 +1262,7 @@ static int invoke_get_x(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, int64_t *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val); out_val = prop_val; return sbus_request_return_as_variant(dbus_req, DBUS_TYPE_INT64, &out_val); @@ -1277,7 +1277,7 @@ static int invoke_get_au(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint32_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_UINT32, (uint8_t*)out_val, prop_len, sizeof(uint32_t)); @@ -1292,7 +1292,7 @@ static int invoke_get_an(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, int16_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_INT16, (uint8_t*)out_val, prop_len, sizeof(int16_t)); @@ -1307,7 +1307,7 @@ static int invoke_get_ad(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, double * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_DOUBLE, (uint8_t*)out_val, prop_len, sizeof(double)); @@ -1322,7 +1322,7 @@ static int invoke_get_ai(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, int32_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_INT32, (uint8_t*)out_val, prop_len, sizeof(int32_t)); @@ -1337,7 +1337,7 @@ static int invoke_get_at(struct sbus_request *dbus_req, void *function_ptr) void (*handler)(struct sbus_request *, void *data, uint64_t * *, int *) = function_ptr; - (handler)(dbus_req, dbus_req->intf->instance_data, &prop_val, &prop_len); + (handler)(dbus_req, dbus_req->intf->handler_data, &prop_val, &prop_len); out_val = prop_val; return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_UINT64, (uint8_t*)out_val, prop_len, sizeof(uint64_t)); diff --git a/src/tests/sbus_tests.c b/src/tests/sbus_tests.c index 9dda916e3..47d0556cf 100644 --- a/src/tests/sbus_tests.c +++ b/src/tests/sbus_tests.c @@ -116,7 +116,7 @@ static int blink_handler(struct sbus_request *req, void *data) ck_assert(req->intf->vtable->meta == &pilot_meta); ck_assert(data != NULL); - ck_assert(data == req->intf->instance_data); + ck_assert(data == req->intf->handler_data); ck_assert_str_eq(req->intf->path, req->path); |