summaryrefslogtreecommitdiffstats
path: root/src/tests/sbus_codegen_tests_generated.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/sbus_codegen_tests_generated.h')
-rw-r--r--src/tests/sbus_codegen_tests_generated.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/tests/sbus_codegen_tests_generated.h b/src/tests/sbus_codegen_tests_generated.h
index f41eca74b..23091a7bf 100644
--- a/src/tests/sbus_codegen_tests_generated.h
+++ b/src/tests/sbus_codegen_tests_generated.h
@@ -15,32 +15,56 @@
#define COM_PLANETEXPRESS_SHIP "com.planetexpress.Ship"
#define COM_PLANETEXPRESS_SHIP_MOVEUNIVERSE "MoveUniverse"
#define COM_PLANETEXPRESS_SHIP_CRASH_NOW "Crash"
+#define COM_PLANETEXPRESS_SHIP_LAND "Land"
#define COM_PLANETEXPRESS_SHIP_BECAMESENTIENT "BecameSentient"
#define COM_PLANETEXPRESS_SHIP_COLOR "Color"
/* constants for com.planetexpress.Pilot */
#define TEST_PILOT "com.planetexpress.Pilot"
+#define TEST_PILOT_BLINK "Blink"
#define TEST_PILOT_FULLNAME "FullName"
/* ------------------------------------------------------------------------
- * DBus Vtable handler structures
+ * DBus handlers
*
* These structures are filled in by implementors of the different
* dbus interfaces to handle method calls.
*
* Handler functions of type sbus_msg_handler_fn accept raw messages,
- * other handlers will be typed appropriately. If a handler that is
+ * other handlers are typed appropriately. If a handler that is
* set to NULL is invoked it will result in a
* org.freedesktop.DBus.Error.NotSupported error for the caller.
+ *
+ * Handlers have a matching xxx_finish() function (unless the method has
+ * accepts raw messages). These finish functions the
+ * sbus_request_return_and_finish() with the appropriate arguments to
+ * construct a valid reply. Once a finish function has been called, the
+ * @dbus_req it was called with is freed and no longer valid.
*/
/* vtable for com.planetexpress.Ship */
struct com_planetexpress_Ship {
struct sbus_vtable vtable; /* derive from sbus_vtable */
- sbus_msg_handler_fn MoveUniverse;
- sbus_msg_handler_fn crash_now;
+ int (*MoveUniverse)(struct sbus_request *req, void *data, bool arg_smoothly, uint32_t arg_speed_factor);
+ int (*crash_now)(struct sbus_request *req, void *data, const char *arg_where);
+ sbus_msg_handler_fn Land;
};
+/* finish function for MoveUniverse */
+int com_planetexpress_Ship_MoveUniverse_finish(struct sbus_request *req, const char *arg_where_we_crashed);
+
+/* finish function for Crash */
+int com_planetexpress_Ship_crash_now_finish(struct sbus_request *req);
+
+/* vtable for com.planetexpress.Pilot */
+struct test_pilot {
+ struct sbus_vtable vtable; /* derive from sbus_vtable */
+ int (*Blink)(struct sbus_request *req, void *data, uint32_t arg_duration);
+};
+
+/* finish function for Blink */
+int test_pilot_Blink_finish(struct sbus_request *req, bool arg_crashed);
+
/* ------------------------------------------------------------------------
* DBus Interface Metadata
*