-/*
- * 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).
- */
-#define LTTNG_SESSION_PADDING1 16
-struct lttng_session {
- char name[NAME_MAX];
- /* The path where traces are written */
- char path[PATH_MAX];
- uint32_t enabled; /* enabled/started: 1, disabled/stopped: 0 */
-
- char padding[LTTNG_SESSION_PADDING1];
-};
-
-/*
- * Handle used as a context for commands.
- */
-#define LTTNG_HANDLE_PADDING1 16
-struct lttng_handle {
- char session_name[NAME_MAX];
- struct lttng_domain domain;
-
- char padding[LTTNG_HANDLE_PADDING1];
-};
-
-/*
- * Public LTTng control API
- *
- * For functions having an 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 (in bytes).
- *
- * On error, a negative value is returned being a specific lttng-tools error
- * code which can be humanly interpreted with lttng_strerror(err).
- *
- * Exceptions to this are noted below.
- */
-
-/*
- * Create a 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.
- * The returned pointer will be NULL in case of malloc() error.
- */
-extern struct lttng_handle *lttng_create_handle(const char *session_name,
- struct lttng_domain *domain);
-
-/*
- * Destroy a handle. This will simply free(3) the data pointer returned by
- * lttng_create_handle(), rendering it unusable.
- */
-extern void lttng_destroy_handle(struct lttng_handle *handle);
-
-/*
- * Create a tracing session using a name and a path where the trace will be
- * written.
- */
-extern int lttng_create_session(const char *name, const char *path);
-
-/*
- * Destroy a tracing session.
- *
- * The session will not be usable anymore, tracing will be stopped for all
- * registered traces, and the tracing buffers will be flushed.
- */
-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(3).
- */
-extern int lttng_list_sessions(struct lttng_session **sessions);
-
-/*
- * 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);
-