const struct lttng_session_descriptor *descriptor,
const char **name);
+/*
+ * Get a session descriptor's trace format descriptor.
+ *
+ * The 'trace_format_descriptor' parameter is used as an output parameter and will point to
+ * the session descriptor's trace format descriptor on success
+ * (LTTNG_SESSION_DESCRIPTOR_STATUS_OK). Its content of is left unspecified
+ * for other return codes. The pointer returned through 'trace_format_descriptor' is only
+ * guaranteed to remain valid until the next method call on the session
+ * descriptor.
+ *
+ * Returns LTTNG_SESSION_DESCRIPTOR_STATUS_OK on success,
+ * LTTNG_SESSION_DESCRIPTOR_STATUS_INVALID if 'descriptor' or 'trace_format_descriptor' are
+ * NULL.
+ */
+LTTNG_EXPORT extern enum lttng_session_descriptor_status
+lttng_session_descriptor_get_trace_format_descriptor(
+ const struct lttng_session_descriptor *session_descriptor,
+ const struct lttng_trace_format_descriptor **trace_format_descriptor);
+
+/*
+ * Set a session descriptor's trace format descriptor.
+ *
+ * The trace format descriptor is copied internally.
+ *
+ * Returns LTTNG_SESSION_DESCRIPTOR_STATUS_OK on success,
+ * LTTNG_SESSION_DESCRIPTOR_STATUS_INVALID if 'descriptor' or 'trace_format_descriptor' are
+ * NULL.
+ */
+LTTNG_EXPORT extern enum lttng_session_descriptor_status
+lttng_session_descriptor_set_trace_format_descriptor(
+ struct lttng_session_descriptor *session_descriptor,
+ const struct lttng_trace_format_descriptor *trace_format_descriptor);
+
/*
* Destroy a local lttng_session object.
*