typedef void (*action_destroy_cb)(struct lttng_action *action);
typedef int (*action_serialize_cb)(struct lttng_action *action,
struct lttng_dynamic_buffer *buf);
+typedef ssize_t (*action_create_from_buffer_cb)(
+ const struct lttng_buffer_view *view,
+ struct lttng_action **action);
struct lttng_action {
enum lttng_action_type type;
int8_t action_type;
} LTTNG_PACKED;
+LTTNG_HIDDEN
+void lttng_action_init(struct lttng_action *action,
+ enum lttng_action_type type,
+ action_validate_cb validate,
+ action_serialize_cb serialize,
+ action_destroy_cb destroy);
+
LTTNG_HIDDEN
bool lttng_action_validate(struct lttng_action *action);