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
);
63 * Return the omit name configuration attribute. This attribute indicates
64 * whether or not the saved sessions' names should be omitted.
66 int lttng_save_session_attr_get_omit_name(
67 struct lttng_save_session_attr
*attr
);
69 * Return the omit output configuration attribute. This attribute indicates
70 * whether or not the saved sessions' output configuration should be omitted.
72 int lttng_save_session_attr_get_omit_output(
73 struct lttng_save_session_attr
*attr
);
76 * Save session attribute setter family functions.
78 * For every set* call, 0 is returned on success or else -LTTNG_ERR_INVALID is
79 * returned indicating that at least one given parameter is invalid.
83 * Set the name of the session to save. A NULL name means all sessions
84 * known to the session daemon will be saved.
86 int lttng_save_session_attr_set_session_name(
87 struct lttng_save_session_attr
*attr
, const char *session_name
);
89 * Set the URL of the session configuration to save. A NULL value indicates the
90 * use of the default location being the session one. The URL's format is is
91 * documented in lttng(1).
93 int lttng_save_session_attr_set_output_url(
94 struct lttng_save_session_attr
*attr
, const char *url
);
96 * Set the overwrite attribute. If set to true, files of the same name as the
97 * current session configuration URL will be overwritten.
99 int lttng_save_session_attr_set_overwrite(
100 struct lttng_save_session_attr
*attr
, int overwrite
);
102 * Set the omit name attribute. If set to true, the sessions' names are omitted
103 * from the resulting session configuration file.
105 int lttng_save_session_attr_set_omit_name(
106 struct lttng_save_session_attr
*attr
, int omit_name
);
108 * Set the omit output attribute. If set to true, the sessions' output
109 * configurations are omitted from the resulting session configuration file.
111 int lttng_save_session_attr_set_omit_output(
112 struct lttng_save_session_attr
*attr
, int omit_output
);
115 * Save session configuration(s).
117 * The lttng_save_session_attr object must not be NULL. No ownership of the
118 * object is kept by the function; it must be released by the caller.
120 * Returns 0 on success or a negative LTTNG_ERR value on error.
122 int lttng_save_session(struct lttng_save_session_attr
*attr
);
128 #endif /* LTTNG_SAVE_H */
This page took 0.051394 seconds and 4 git commands to generate.