API: get/set trace format descriptor for session descriptor
[lttng-tools.git] / include / lttng / session-descriptor.h
index cbbf10d9e850da396e63bb457d4c303891f00ebb..16c8b484f497c5beb367afcbc1da3fc945b5f56e 100644 (file)
@@ -234,6 +234,39 @@ lttng_session_descriptor_get_session_name(
                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.
  *
This page took 0.031444 seconds and 5 git commands to generate.