+/*
+ * List the registered domain(s) of a session.
+ *
+ * Return the size (number of entries) of the "lttng_domain" array. Caller
+ * must free(3).
+ */
+extern int lttng_list_domains(const char *session_name,
+ struct lttng_domain **domains);
+
+/*
+ * List the channel(s) of a session.
+ *
+ * Return the size (number of entries) of the "lttng_channel" array. Caller
+ * must free(3).
+ */
+extern int lttng_list_channels(struct lttng_handle *handle,
+ struct lttng_channel **channels);
+
+/*
+ * List the event(s) of a session channel.
+ *
+ * Return the size (number of entries) 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 the available tracepoints of a specific lttng domain.
+ *
+ * Return the size (number of entries) of the "lttng_event" array.
+ * Caller must free(3).
+ */
+extern int lttng_list_tracepoints(struct lttng_handle *handle,
+ struct lttng_event **events);
+
+/*
+ * List the available tracepoints fields of a specific lttng domain.
+ *
+ * Return the size (number of entries) of the "lttng_event_field" array.
+ * Caller must free(3).
+ */
+extern int lttng_list_tracepoint_fields(struct lttng_handle *handle,
+ struct lttng_event_field **fields);
+
+/*
+ * Check if a session daemon is alive.
+ *
+ * Return 1 if alive or 0 if not. On error returns a negative value.
+ */
+extern int lttng_session_daemon_alive(void);
+
+/*
+ * Set the tracing group for the *current* flow of execution.
+ *
+ * On success, returns 0, on error, returns -1 (null name) or -ENOMEM.
+ */
+extern int lttng_set_tracing_group(const char *name);
+
+/*
+ * Return a human-readable error message for an lttng-tools error code.
+ *
+ * Parameter MUST be a negative value or else you'll get a generic message.
+ */
+extern const char *lttng_strerror(int code);
+
+/*
+ * This call registers an "outside consumer" for a session and an lttng domain.
+ * No consumer will be spawned and all fds/commands will go through the socket
+ * path given (socket_path).
+ *
+ * NOTE: At the moment, if you use the liblttng-kconsumer, you can only use the
+ * command socket. The error socket is not supported yet for roaming consumers.
+ */
+extern int lttng_register_consumer(struct lttng_handle *handle,
+ const char *socket_path);
+
+/*
+ * Start tracing for *all* registered traces (kernel and user-space).
+ */
+extern int lttng_start_tracing(const char *session_name);
+
+/*
+ * Stop tracing for *all* registered traces (kernel and user-space).
+ *
+ * This call will wait for data availability for each domain of the session so
+ * this can take an abritrary amount of time. However, when returning you have
+ * the guarantee that the data is ready to be read and analyse. Use the
+ * _no_wait call below to avoid this behavior.
+ */
+extern int lttng_stop_tracing(const char *session_name);
+
+/*
+ * Behave exactly like lttng_stop_tracing but does not wait for data
+ * availability.
+ */
+extern int lttng_stop_tracing_no_wait(const char *session_name);
+
+/*
+ * Add context to event(s) for a specific channel (or for all).
+ *
+ * If event_name is NULL, the context is applied to all events of the channel.
+ * If channel_name is NULL, a lookup of the event's channel is done.
+ * If both are NULL, the context is applied to all events of all channels.
+ */
+extern int lttng_add_context(struct lttng_handle *handle,
+ struct lttng_event_context *ctx, const char *event_name,
+ const char *channel_name);
+
+/*
+ * Create or enable an event (or events) for a channel.
+ *
+ * If the event you are trying to enable does not exist, it will be created,
+ * else it is enabled.
+ * If event_name is NULL, all events are enabled.
+ * If channel_name is NULL, the default channel is used (channel0).
+ */
+extern int lttng_enable_event(struct lttng_handle *handle,
+ struct lttng_event *ev, const char *channel_name);
+
+/*
+ * Create or enable an event with a specific filter.
+ *
+ * If the event you are trying to enable does not exist, it will be created,
+ * else it is enabled.
+ * If event_name is NULL, all events are enabled with that filter.
+ * If channel_name is NULL, the default channel is used (channel0) and created
+ * if not found.
+ */
+extern int lttng_enable_event_with_filter(struct lttng_handle *handle,
+ struct lttng_event *event, const char *channel_name,
+ const char *filter_expression);
+
+/*
+ * Create or enable a channel.
+ * The channel name cannot be NULL.
+ */
+extern int lttng_enable_channel(struct lttng_handle *handle,
+ struct lttng_channel *chan);
+
+/*
+ * Disable event(s) of a channel and domain.
+ *
+ * If event_name is NULL, all events are disabled.
+ * If channel_name is NULL, the default channel is used (channel0).
+ */
+extern int lttng_disable_event(struct lttng_handle *handle,
+ const char *name, const char *channel_name);
+
+/*
+ * Disable channel.
+ *
+ * The channel name cannot be NULL.
+ */
+extern int lttng_disable_channel(struct lttng_handle *handle,
+ const char *name);
+
+/*
+ * Calibrate LTTng overhead.
+ */
+extern int lttng_calibrate(struct lttng_handle *handle,
+ struct lttng_calibrate *calibrate);
+
+/*
+ * Set the default channel attributes for a specific domain and an allocated
+ * lttng_channel_attr pointer.
+ *
+ * If either or both of the arguments are NULL, nothing happens.
+ */
+extern void lttng_channel_set_default_attr(struct lttng_domain *domain,
+ struct lttng_channel_attr *attr);
+
+/*
+ * Set URL for a consumer for a session and domain.
+ *
+ * Both data and control URL must be defined. If both URLs are the same, only
+ * the control URL is used even for network streaming.
+ *
+ * Default port are 5342 and 5343 respectively for control and data which uses
+ * the TCP protocol.
+ */
+extern int lttng_set_consumer_url(struct lttng_handle *handle,
+ const char *control_url, const char *data_url);
+
+/*
+ * Enable the consumer for a session and domain.
+ */
+extern int lttng_enable_consumer(struct lttng_handle *handle);
+
+/*
+ * Disable consumer for a session and domain.
+ */
+extern int lttng_disable_consumer(struct lttng_handle *handle);
+
+/*
+ * Check session daemon health for a specific component.
+ *
+ * Return 0 if health is OK or 1 if BAD. A returned value of -1 indicate that
+ * the control library was not able to connect to the session daemon health
+ * socket.
+ *
+ * Any other positive value is an lttcomm error which can be translate with
+ * lttng_strerror().
+ */
+extern int lttng_health_check(enum lttng_health_component c);
+
+/*
+ * For a given session name, this call checks if the data is ready to be read
+ * or is still being extracted by the consumer(s) (pending) hence not ready to
+ * be used by any readers.
+ *
+ * Return 0 if there is _no_ data pending in the buffers thus having a
+ * guarantee that the data can be read safely. Else, return 1 if there is still
+ * traced data is pending. On error, a negative value is returned and readable
+ * by lttng_strerror().
+ */
+extern int lttng_data_pending(const char *session_name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LTTNG_H */