sbus_codegen_tests_generated.c revision 66277b21179d95f6e96abed01a20ccbccf27ce99
/* The following definitions are auto-generated from sbus_codegen_tests.xml */
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_meta.h"
#include "sbus_codegen_tests_generated.h"
/* invokes a handler with a 'bu' DBus signature */
/* invokes a handler with a 's' DBus signature */
/* invokes a handler with a 'u' DBus signature */
/* invokes a handler with a 'ybnqiuxtdsoayanaqaiauaxatadasao' DBus signature */
static int invoke_ybnqiuxtdsoayanaqaiauaxatadasao_method(struct sbus_request *dbus_req, void *function_ptr);
/* arguments for com.planetexpress.Ship.MoveUniverse */
const struct sbus_arg_meta com_planetexpress_Ship_MoveUniverse__in[] = {
{ "smoothly", "b" },
{ "speed_factor", "u" },
{ NULL, }
};
/* arguments for com.planetexpress.Ship.MoveUniverse */
const struct sbus_arg_meta com_planetexpress_Ship_MoveUniverse__out[] = {
{ "where_we_crashed", "s" },
{ NULL, }
};
int com_planetexpress_Ship_MoveUniverse_finish(struct sbus_request *req, const char *arg_where_we_crashed)
{
return sbus_request_return_and_finish(req,
}
/* arguments for com.planetexpress.Ship.Crash */
const struct sbus_arg_meta com_planetexpress_Ship_crash_now__in[] = {
{ "where", "s" },
{ NULL, }
};
{
return sbus_request_return_and_finish(req,
}
/* methods for com.planetexpress.Ship */
const struct sbus_method_meta com_planetexpress_Ship__methods[] = {
{
"MoveUniverse", /* name */
},
{
"Crash", /* name */
NULL, /* no out_args */
},
{
"Land", /* name */
NULL, /* no in_args */
NULL, /* no out_args */
NULL, /* no invoker */
},
{ NULL, }
};
/* arguments for com.planetexpress.Ship.BecameSentient */
const struct sbus_arg_meta com_planetexpress_Ship_BecameSentient__args[] = {
{ "gender", "s" },
{ NULL, }
};
/* signals for com.planetexpress.Ship */
const struct sbus_signal_meta com_planetexpress_Ship__signals[] = {
{
"BecameSentient", /* name */
},
{ NULL, }
};
/* property info for com.planetexpress.Ship */
const struct sbus_property_meta com_planetexpress_Ship__properties[] = {
{
"Color", /* name */
"s", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{ NULL, }
};
/* invokes GetAll for the 'com.planetexpress.Ship' interface */
{
int ret;
const struct sbus_property_meta *property;
const char * s_prop_val;
const char * s_out_val;
&iter_dict);
if (s_handler) {
}
}
}
/* interface info for com.planetexpress.Ship */
const struct sbus_interface_meta com_planetexpress_Ship_meta = {
"com.planetexpress.Ship", /* name */
invoke_com_planetexpress_Ship_get_all, /* GetAll invoker */
};
/* arguments for com.planetexpress.Pilot.Blink */
const struct sbus_arg_meta test_pilot_Blink__in[] = {
{ "duration", "u" },
{ NULL, }
};
/* arguments for com.planetexpress.Pilot.Blink */
const struct sbus_arg_meta test_pilot_Blink__out[] = {
{ "crashed", "b" },
{ NULL, }
};
{
return sbus_request_return_and_finish(req,
}
/* arguments for com.planetexpress.Pilot.Eject */
const struct sbus_arg_meta test_pilot_Eject__in[] = {
{ "byte", "y" },
{ "boolean", "b" },
{ "int16", "n" },
{ "uint16", "q" },
{ "int32", "i" },
{ "uint32", "u" },
{ "int64", "x" },
{ "uint64", "t" },
{ "double", "d" },
{ "string", "s" },
{ "object_path", "o" },
{ "byte_array", "ay" },
{ "int16_array", "an" },
{ "uint16_array", "aq" },
{ "int32_array", "ai" },
{ "uint32_array", "au" },
{ "int64_array", "ax" },
{ "uint64_array", "at" },
{ "double_array", "ad" },
{ "string_array", "as" },
{ "object_path_array", "ao" },
{ NULL, }
};
/* arguments for com.planetexpress.Pilot.Eject */
const struct sbus_arg_meta test_pilot_Eject__out[] = {
{ "byte", "y" },
{ "boolean", "b" },
{ "int16", "n" },
{ "uint16", "q" },
{ "int32", "i" },
{ "uint32", "u" },
{ "int64", "x" },
{ "uint64", "t" },
{ "double", "d" },
{ "string", "s" },
{ "object_path", "o" },
{ "byte_array", "ay" },
{ "int16_array", "an" },
{ "uint16_array", "aq" },
{ "int32_array", "ai" },
{ "uint32_array", "au" },
{ "int64_array", "ax" },
{ "uint64_array", "at" },
{ "double_array", "ad" },
{ "string_array", "as" },
{ "object_path_array", "ao" },
{ NULL, }
};
int test_pilot_Eject_finish(struct sbus_request *req, uint8_t arg_byte, bool arg_boolean, int16_t arg_int16, uint16_t arg_uint16, int32_t arg_int32, uint32_t arg_uint32, int64_t arg_int64, uint64_t arg_uint64, double arg_double, const char *arg_string, const char *arg_object_path, uint8_t arg_byte_array[], int len_byte_array, int16_t arg_int16_array[], int len_int16_array, uint16_t arg_uint16_array[], int len_uint16_array, int32_t arg_int32_array[], int len_int32_array, uint32_t arg_uint32_array[], int len_uint32_array, int64_t arg_int64_array[], int len_int64_array, uint64_t arg_uint64_array[], int len_uint64_array, double arg_double_array[], int len_double_array, const char *arg_string_array[], int len_string_array, const char *arg_object_path_array[], int len_object_path_array)
{
return sbus_request_return_and_finish(req,
}
/* methods for com.planetexpress.Pilot */
const struct sbus_method_meta test_pilot__methods[] = {
{
"Blink", /* name */
},
{
"Eject", /* name */
},
{ NULL, }
};
/* property info for com.planetexpress.Pilot */
const struct sbus_property_meta test_pilot__properties[] = {
{
"FullName", /* name */
"s", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"byte", /* name */
"y", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"boolean", /* name */
"b", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"int16", /* name */
"n", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"uint16", /* name */
"q", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"int32", /* name */
"i", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"uint32", /* name */
"u", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"int64", /* name */
"x", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"uint64", /* name */
"t", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"double", /* name */
"d", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"string", /* name */
"s", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"object_path", /* name */
"o", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"null_string", /* name */
"s", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"null_path", /* name */
"o", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"byte_array", /* name */
"ay", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"int16_array", /* name */
"an", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"uint16_array", /* name */
"aq", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"int32_array", /* name */
"ai", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"uint32_array", /* name */
"au", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"int64_array", /* name */
"ax", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"uint64_array", /* name */
"at", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"double_array", /* name */
"ad", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"string_array", /* name */
"as", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{
"object_path_array", /* name */
"ao", /* type */
0, /* not writable */
NULL, /* no invoker */
},
{ NULL, }
};
/* invokes GetAll for the 'com.planetexpress.Pilot' interface */
{
int ret;
const struct sbus_property_meta *property;
int aq_prop_len;
bool b_prop_val;
double d_prop_val;
double d_out_val;
const char * *ao_prop_val;
int ao_prop_len;
const char * *ao_out_val;
const char * *as_prop_val;
int as_prop_len;
const char * *as_out_val;
const char * o_prop_val;
const char * o_out_val;
int ay_prop_len;
const char * s_prop_val;
const char * s_out_val;
int ax_prop_len;
int au_prop_len;
int an_prop_len;
double *ad_prop_val;
int ad_prop_len;
double *ad_out_val;
int ai_prop_len;
int at_prop_len;
&iter_dict);
if (s_handler) {
}
}
if (y_handler) {
}
}
if (b_handler) {
}
}
if (n_handler) {
}
}
if (q_handler) {
}
}
if (i_handler) {
}
}
if (u_handler) {
}
}
if (x_handler) {
}
}
if (t_handler) {
}
}
if (d_handler) {
}
}
if (s_handler) {
}
}
if (o_handler) {
}
}
if (s_handler) {
}
}
if (o_handler) {
}
}
if (ay_handler) {
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 (an_handler) {
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 (aq_handler) {
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 (ai_handler) {
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 (au_handler) {
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 (ax_handler) {
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 (at_handler) {
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 (ad_handler) {
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 (as_handler) {
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 (ao_handler) {
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 *));
}
}
}
/* interface info for com.planetexpress.Pilot */
const struct sbus_interface_meta test_pilot_meta = {
"com.planetexpress.Pilot", /* name */
NULL, /* no signals */
invoke_test_pilot_get_all, /* GetAll invoker */
};
/* invokes a handler with a 'bu' DBus signature */
{
return EOK; /* request handled */
}
arg_1);
}
/* invokes a handler with a 's' DBus signature */
{
const char * arg_0;
return EOK; /* request handled */
}
arg_0);
}
/* invokes a handler with a 'u' DBus signature */
{
return EOK; /* request handled */
}
arg_0);
}
/* invokes a handler with a 'ybnqiuxtdsoayanaqaiauaxatadasao' DBus signature */
static int invoke_ybnqiuxtdsoayanaqaiauaxatadasao_method(struct sbus_request *dbus_req, void *function_ptr)
{
double arg_8;
const char * arg_9;
const char * arg_10;
int len_11;
int len_12;
int len_13;
int len_14;
int len_15;
int len_16;
int len_17;
double *arg_18;
int len_18;
const char * *arg_19;
int len_19;
const char * *arg_20;
int len_20;
int (*handler)(struct sbus_request *, void *, uint8_t, bool, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, double, const char *, const char *, uint8_t[], int, int16_t[], int, uint16_t[], int, int32_t[], int, uint32_t[], int, int64_t[], int, uint64_t[], int, double[], int, const char *[], int, const char *[], int) = function_ptr;
return EOK; /* request handled */
}
len_20);
}
/* invokes a getter with an array of 'uint16_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_UINT16, (uint8_t*)out_val, prop_len, sizeof(uint16_t));
}
/* invokes a getter with a 'dbus_bool_t' DBus type */
{
bool prop_val;
}
/* invokes a getter with a 'double' DBus type */
{
double prop_val;
double out_val;
}
/* invokes a getter with an array of 'const char *' DBus type */
{
const char * *prop_val;
int prop_len;
const char * *out_val;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_OBJECT_PATH, (uint8_t*)out_val, prop_len, sizeof(const char *));
}
/* invokes a getter with a 'int32_t' DBus type */
{
}
/* invokes a getter with an array of 'const char *' DBus type */
{
const char * *prop_val;
int prop_len;
const char * *out_val;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_STRING, (uint8_t*)out_val, prop_len, sizeof(const char *));
}
/* invokes a getter with a 'const char *' DBus type */
{
const char * prop_val;
const char * out_val;
}
/* invokes a getter with a 'int16_t' DBus type */
{
}
/* invokes a getter with a 'uint16_t' DBus type */
{
}
/* invokes a getter with an array of 'uint8_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_BYTE, (uint8_t*)out_val, prop_len, sizeof(uint8_t));
}
/* invokes a getter with a 'const char *' DBus type */
{
const char * prop_val;
const char * out_val;
}
/* invokes a getter with a 'uint32_t' DBus type */
{
}
/* invokes a getter with a 'uint64_t' DBus type */
{
}
/* invokes a getter with an array of 'int64_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_INT64, (uint8_t*)out_val, prop_len, sizeof(int64_t));
}
/* invokes a getter with a 'uint8_t' DBus type */
{
}
/* invokes a getter with a 'int64_t' DBus type */
{
}
/* invokes a getter with an array of 'uint32_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_UINT32, (uint8_t*)out_val, prop_len, sizeof(uint32_t));
}
/* invokes a getter with an array of 'int16_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_INT16, (uint8_t*)out_val, prop_len, sizeof(int16_t));
}
/* invokes a getter with an array of 'double' DBus type */
{
double *prop_val;
int prop_len;
double *out_val;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_DOUBLE, (uint8_t*)out_val, prop_len, sizeof(double));
}
/* invokes a getter with an array of 'int32_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_INT32, (uint8_t*)out_val, prop_len, sizeof(int32_t));
}
/* invokes a getter with an array of 'uint64_t' DBus type */
{
int prop_len;
return sbus_request_return_array_as_variant(dbus_req, DBUS_TYPE_UINT64, (uint8_t*)out_val, prop_len, sizeof(uint64_t));
}