b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter/* The following declarations are auto-generated from sbus_codegen_tests.xml */
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter#ifndef __SBUS_CODEGEN_TESTS_XML__
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter#define __SBUS_CODEGEN_TESTS_XML__
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter#include "sbus/sssd_dbus.h"
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter/* ------------------------------------------------------------------------
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter * DBus Constants
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter *
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter * Various constants of interface and method names mostly for use by clients
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter */
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter/* constants for com.planetexpress.Ship */
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define COM_PLANETEXPRESS_SHIP "com.planetexpress.Ship"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define COM_PLANETEXPRESS_SHIP_MOVEUNIVERSE "MoveUniverse"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define COM_PLANETEXPRESS_SHIP_CRASH_NOW "Crash"
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter#define COM_PLANETEXPRESS_SHIP_LAND "Land"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define COM_PLANETEXPRESS_SHIP_BECAMESENTIENT "BecameSentient"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define COM_PLANETEXPRESS_SHIP_COLOR "Color"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter/* constants for com.planetexpress.Pilot */
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define TEST_PILOT "com.planetexpress.Pilot"
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter#define TEST_PILOT_BLINK "Blink"
1203e462650f035b0df2304075d60b9a99e36715Stef Walter#define TEST_PILOT_EJECT "Eject"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter#define TEST_PILOT_FULLNAME "FullName"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_BYTE "byte"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_BOOLEAN "boolean"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_INT16 "int16"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_UINT16 "uint16"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_INT32 "int32"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_UINT32 "uint32"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_INT64 "int64"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_UINT64 "uint64"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_DOUBLE "double"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_STRING "string"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_OBJECT_PATH "object_path"
58229439447d5617913a5a2e173b78105c694842Pavel Březina#define TEST_PILOT_NULL_STRING "null_string"
5de968e80ade1c02d1907834dcff95e9fc9ad10aJakub Hrozek#define TEST_PILOT_NULL_PATH "null_path"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_BYTE_ARRAY "byte_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_INT16_ARRAY "int16_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_UINT16_ARRAY "uint16_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_INT32_ARRAY "int32_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_UINT32_ARRAY "uint32_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_INT64_ARRAY "int64_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_UINT64_ARRAY "uint64_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_DOUBLE_ARRAY "double_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_STRING_ARRAY "string_array"
90e04eae7e54ec892a6f239783df94dab5d1ed9aJakub Hrozek#define TEST_PILOT_OBJECT_PATH_ARRAY "object_path_array"
c2cc119de8eac712c040b3993f41c967ff2278deStef Walter
ac744223411099a862a747e7168a30255c003bf7Pavel Březina/* constants for com.planetexpress.Special */
ac744223411099a862a747e7168a30255c003bf7Pavel Březina#define TEST_SPECIAL "com.planetexpress.Special"
ac744223411099a862a747e7168a30255c003bf7Pavel Březina#define TEST_SPECIAL_ARRAY_DICT_SAS "array_dict_sas"
ac744223411099a862a747e7168a30255c003bf7Pavel Březina
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter/* ------------------------------------------------------------------------
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * DBus handlers
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter *
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter * These structures are filled in by implementors of the different
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter * dbus interfaces to handle method calls.
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter *
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter * Handler functions of type sbus_msg_handler_fn accept raw messages,
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * other handlers are typed appropriately. If a handler that is
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter * set to NULL is invoked it will result in a
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter * org.freedesktop.DBus.Error.NotSupported error for the caller.
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter *
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * Handlers have a matching xxx_finish() function (unless the method has
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * accepts raw messages). These finish functions the
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * sbus_request_return_and_finish() with the appropriate arguments to
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * construct a valid reply. Once a finish function has been called, the
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter * @dbus_req it was called with is freed and no longer valid.
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter */
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter/* vtable for com.planetexpress.Ship */
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walterstruct com_planetexpress_Ship {
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter struct sbus_vtable vtable; /* derive from sbus_vtable */
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter int (*MoveUniverse)(struct sbus_request *req, void *data, bool arg_smoothly, uint32_t arg_speed_factor);
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter int (*crash_now)(struct sbus_request *req, void *data, const char *arg_where);
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter sbus_msg_handler_fn Land;
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_Color)(struct sbus_request *, void *data, const char **);
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter};
fcd8093c58638dc7c4f9cddfc97f273b94ce2eadStef Walter
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter/* finish function for MoveUniverse */
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walterint com_planetexpress_Ship_MoveUniverse_finish(struct sbus_request *req, const char *arg_where_we_crashed);
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter/* finish function for Crash */
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walterint com_planetexpress_Ship_crash_now_finish(struct sbus_request *req);
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter/* vtable for com.planetexpress.Pilot */
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walterstruct test_pilot {
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter struct sbus_vtable vtable; /* derive from sbus_vtable */
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter int (*Blink)(struct sbus_request *req, void *data, uint32_t arg_duration);
1203e462650f035b0df2304075d60b9a99e36715Stef Walter int (*Eject)(struct sbus_request *req, void *data, 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);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_FullName)(struct sbus_request *, void *data, const char **);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_byte)(struct sbus_request *, void *data, uint8_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_boolean)(struct sbus_request *, void *data, bool*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_int16)(struct sbus_request *, void *data, int16_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_uint16)(struct sbus_request *, void *data, uint16_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_int32)(struct sbus_request *, void *data, int32_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_uint32)(struct sbus_request *, void *data, uint32_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_int64)(struct sbus_request *, void *data, int64_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_uint64)(struct sbus_request *, void *data, uint64_t*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_double)(struct sbus_request *, void *data, double*);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_string)(struct sbus_request *, void *data, const char **);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_object_path)(struct sbus_request *, void *data, const char **);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_null_string)(struct sbus_request *, void *data, const char **);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_null_path)(struct sbus_request *, void *data, const char **);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_byte_array)(struct sbus_request *, void *data, uint8_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_int16_array)(struct sbus_request *, void *data, int16_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_uint16_array)(struct sbus_request *, void *data, uint16_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_int32_array)(struct sbus_request *, void *data, int32_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_uint32_array)(struct sbus_request *, void *data, uint32_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_int64_array)(struct sbus_request *, void *data, int64_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_uint64_array)(struct sbus_request *, void *data, uint64_t**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_double_array)(struct sbus_request *, void *data, double**, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_string_array)(struct sbus_request *, void *data, const char ***, int *);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_object_path_array)(struct sbus_request *, void *data, const char ***, int *);
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter};
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter/* finish function for Blink */
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walterint test_pilot_Blink_finish(struct sbus_request *req, bool arg_crashed);
dff909d473f43a6bd0f0286fa2d279c0ebe945c6Stef Walter
1203e462650f035b0df2304075d60b9a99e36715Stef Walter/* finish function for Eject */
1203e462650f035b0df2304075d60b9a99e36715Stef Walterint 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);
1203e462650f035b0df2304075d60b9a99e36715Stef Walter
ac744223411099a862a747e7168a30255c003bf7Pavel Březina/* vtable for com.planetexpress.Special */
ac744223411099a862a747e7168a30255c003bf7Pavel Březinastruct test_special {
ac744223411099a862a747e7168a30255c003bf7Pavel Březina struct sbus_vtable vtable; /* derive from sbus_vtable */
ac744223411099a862a747e7168a30255c003bf7Pavel Březina void (*get_array_dict_sas)(struct sbus_request *, void *data, hash_table_t **);
ac744223411099a862a747e7168a30255c003bf7Pavel Březina};
ac744223411099a862a747e7168a30255c003bf7Pavel Březina
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter/* ------------------------------------------------------------------------
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter * DBus Interface Metadata
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter *
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter * These structure definitions are filled in with the information about
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter * the interfaces, methods, properties and so on.
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter *
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter * The actual definitions are found in the accompanying C file next
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter * to this header.
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter */
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter/* interface info for com.planetexpress.Ship */
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walterextern const struct sbus_interface_meta com_planetexpress_Ship_meta;
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter/* interface info for com.planetexpress.Pilot */
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walterextern const struct sbus_interface_meta test_pilot_meta;
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter
ac744223411099a862a747e7168a30255c003bf7Pavel Březina/* interface info for com.planetexpress.Special */
ac744223411099a862a747e7168a30255c003bf7Pavel Březinaextern const struct sbus_interface_meta test_special_meta;
ac744223411099a862a747e7168a30255c003bf7Pavel Březina
b699c4d7f85a5404be1d1ee9450331aea869b886Stef Walter#endif /* __SBUS_CODEGEN_TESTS_XML__ */