+ * Public LTTng control API
+ */
+
+/*
+ * Create a tracing session using a name and an optional URL.
+ *
+ * If _url_ is NULL, no consumer is created for the session. The name can't be
+ * NULL here.
+ *
+ * Return 0 on success else a negative LTTng error code.
+ */
+extern int lttng_create_session(const char *name, const char *url);
+
+/*
+ * Create a tracing session that will exclusively be used for snapshot meaning
+ * the session will be in no output mode and every channel enabled for that
+ * session will be set in overwrite mode and in mmap output since splice is not
+ * supported.
+ *
+ * Name can't be NULL. If an url is given, it will be used to create a default
+ * snapshot output using it as a destination. If NULL, no output will be
+ * defined and an add-output call will be needed.
+ *
+ * Return 0 on success else a negative LTTng error code.
+ */
+extern int lttng_create_session_snapshot(const char *name,
+ const char *snapshot_url);
+
+/*
+ * Create a session exclusively used for live reading.
+ *
+ * In this mode, the switch-timer parameter is forced for each UST channel, a
+ * live-switch-timer is enabled for kernel channels, manually setting
+ * switch-timer is forbidden. Synchronization beacons are sent to the relayd,
+ * indexes are sent and metadata is checked for each packet.
+ *
+ * Name can't be NULL. If no URL is given, the default is to send the data to
+ * net://127.0.0.1. The timer_interval is in usec and by default set to 1000000
+ * (1 second).
+ *
+ * Return 0 on success else a negative LTTng error code.
+ */
+extern int lttng_create_session_live(const char *name, const char *url,
+ unsigned int timer_interval);
+
+/*
+ * Create an handle used as a context for every request made to the library.
+ *
+ * This handle contains the session name and domain on which the command will
+ * be executed. A domain is basically a tracer like the kernel or user space.
+ *
+ * Return an newly allocated handle that should be freed using
+ * lttng_destroy_handle. On error, NULL is returned.
+ */
+extern struct lttng_handle *lttng_create_handle(const char *session_name,
+ struct lttng_domain *domain);
+
+/*
+ * Destroy an handle that has been previously created with lttng_create_handle.
+ *
+ * It free the given pointer making it unusable.
+ */
+extern void lttng_destroy_handle(struct lttng_handle *handle);
+
+/*
+ * Destroy a tracing session.
+ *
+ * The session will not be usable, tracing will be stopped thus buffers will be
+ * flushed.
+ *
+ * The name can't be NULL here.
+ *
+ * Return 0 on success else a negative LTTng error code.
+ */
+extern int lttng_destroy_session(const char *name);
+
+/*
+ * List all the tracing sessions.
+ *
+ * Return the size (number of entries) of the "lttng_session" array. Caller
+ * must free sessions. On error, a negative LTTng error code is returned.