2 * Copyright (C) 2013 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26 * The lttng_save_session_attr object is opaque to the user. Use the helper
27 * functions below to use them.
29 struct lttng_save_session_attr
;
32 * Return a newly allocated save session attribute object or NULL on error.
34 struct lttng_save_session_attr
*lttng_save_session_attr_create(void);
37 * Free a given save session attribute object.
39 void lttng_save_session_attr_destroy(struct lttng_save_session_attr
*output
);
43 * Save session attribute getter family functions.
46 /* Return session name. NULL indicated all sessions must be saved. */
47 const char *lttng_save_session_attr_get_session_name(
48 struct lttng_save_session_attr
*attr
);
50 * Return destination URL. A NULL value indicates the default session
51 * configuration location. The URL format used is documented in lttng(1).
52 * NULL indicates that the default session configuration path is used.
54 const char *lttng_save_session_attr_get_output_url(
55 struct lttng_save_session_attr
*attr
);
57 * Return the configuration overwrite attribute. This attribute indicates
58 * whether or not existing configuration files must be overwritten.
60 int lttng_save_session_attr_get_overwrite(
61 struct lttng_save_session_attr
*attr
);
64 * Save session attribute setter family functions.
66 * For every set* call, 0 is returned on success or else -LTTNG_ERR_INVALID is
67 * returned indicating that at least one given parameter is invalid.
71 * Set the name of the session to save. A NULL name means all sessions
72 * known to the session daemon will be saved.
74 int lttng_save_session_attr_set_session_name(
75 struct lttng_save_session_attr
*attr
, const char *session_name
);
77 * Set the URL of the session configuration to save. A NULL value indicates the
78 * use of the default location being the session one. The URL's format is is
79 * documented in lttng(1).
81 int lttng_save_session_attr_set_output_url(
82 struct lttng_save_session_attr
*attr
, const char *url
);
84 * Set the overwrite attribute. If set to true, files of the same name as the
85 * current session configuration URL will be overwritten.
87 int lttng_save_session_attr_set_overwrite(
88 struct lttng_save_session_attr
*attr
, int overwrite
);
91 * Save session configuration(s).
93 * The lttng_save_session_attr object must not be NULL. No ownership of the
94 * object is kept by the function; it must be released by the caller.
96 * Returns 0 on success or a negative LTTNG_ERR value on error.
98 int lttng_save_session(struct lttng_save_session_attr
*attr
);
104 #endif /* LTTNG_SAVE_H */
This page took 0.034029 seconds and 5 git commands to generate.