+/*
+ * Basic session information.
+ *
+ * This is an 'output data' meaning that it only comes *from* the session
+ * daemon *to* the lttng client. It's basically a 'human' representation of
+ * tracing entities (here a session).
+ */
+struct lttng_session {
+ char name[NAME_MAX];
+ /* The path where traces are written */
+ char path[PATH_MAX];
+};
+
+/*
+ * Handle used as a context for commands.
+ */
+struct lttng_handle {
+ char session_name[NAME_MAX];
+ struct lttng_domain domain;
+};
+
+/*
+ * Public LTTng control API
+ *
+ * For functions having a lttng domain type as parameter, if a bad value is
+ * given, NO default is applied and an error is returned.
+ *
+ * On success, all functions of the API return 0 or the size of the allocated
+ * array.
+ *
+ * On error, a negative value is returned being a specific lttng-tools error
+ * code which can be humanly interpreted with lttng_get_readable_code(err).
+ */
+
+/*
+ * Create an handle used as a context for every request made to the library.
+ *
+ * This handle contains the session name and lttng domain on which the command
+ * will be executed on.
+ */
+extern struct lttng_handle *lttng_create_handle(const char *session_name,
+ struct lttng_domain *domain);
+
+/*
+ * Destroy an handle. This will simply free(3) the data pointer returned by
+ * lttng_create_handle() and rendering it unsuable.
+ */
+extern void lttng_destroy_handle(struct lttng_handle *handle);
+
+/*
+ * Create tracing session using a name and a path where trace will be written.
+ */
+extern int lttng_create_session(const char *name, const char *path);
+
+/*
+ * Destroy tracing session.
+ *
+ * The session will not be useable anymore, tracing will stopped for all
+ * registered trace and tracing buffers will be flushed.
+ */
+extern int lttng_destroy_session(struct lttng_handle *handle);
+
+/*
+ * List all tracing sessions.
+ *
+ * Return the size of the "lttng_session" array. Caller must free(3).
+ */
+extern int lttng_list_sessions(struct lttng_session **sessions);
+
+/*
+ * List registered domain(s) of a session.
+ *
+ * Return the size of the "lttng_domain" array. Caller must free(3).
+ */
+extern int lttng_list_domains(struct lttng_handle *handle,
+ struct lttng_domain **domains);
+
+/*
+ * List channel(s) of a session.
+ *
+ * Return the size of the "lttng_channel" array. Caller must free(3).
+ */
+extern int lttng_list_channels(struct lttng_handle *handle,
+ struct lttng_channel **channels);
+
+/*
+ * List event(s) of a session channel.
+ *
+ * Return the size of the "lttng_event" array. Caller must free(3).
+ */
+extern int lttng_list_events(struct lttng_handle *handle,
+ const char *channel_name, struct lttng_event **events);
+
+/*
+ * List available tracepoints of a specific lttng domain.
+ *
+ * Return the size of the "lttng_event" array. Caller must free(3).
+ */
+extern int lttng_list_tracepoints(struct lttng_handle *handle,
+ struct lttng_event **events);
+
+/*
+ * Check if a session daemon is alive.
+ */
+extern int lttng_session_daemon_alive(void);
+
+/*
+ * Set tracing group for the *current* flow of execution.
+ */