X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Flttng%2Fsnapshot.h;h=33e9a53f9f8dfbcbd97eeb0084a25979eab8e9d8;hb=d3a684eebfe788a7527368d65d7f020bdd1e61d9;hp=90c712aa624b873387d41c0c1fb06f4ca8b3905b;hpb=eef7781fe985ee2a635de32d1c62b845947ea0b7;p=lttng-tools.git diff --git a/include/lttng/snapshot.h b/include/lttng/snapshot.h index 90c712aa6..33e9a53f9 100644 --- a/include/lttng/snapshot.h +++ b/include/lttng/snapshot.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2013 - David Goulet + * Copyright (C) 2013 David Goulet * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License, version 2.1 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: LGPL-2.1-only * - * This library is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License - * for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef LTTNG_SNAPSHOT_H @@ -49,15 +39,15 @@ void lttng_snapshot_output_destroy(struct lttng_snapshot_output *output); */ /* Return snapshot ID. */ -uint32_t lttng_snapshot_output_get_id(struct lttng_snapshot_output *output); +uint32_t lttng_snapshot_output_get_id(const struct lttng_snapshot_output *output); /* Return maximum size of a snapshot. */ -uint64_t lttng_snapshot_output_get_maxsize(struct lttng_snapshot_output *output); +uint64_t lttng_snapshot_output_get_maxsize(const struct lttng_snapshot_output *output); /* Return snapshot name. */ -const char *lttng_snapshot_output_get_name(struct lttng_snapshot_output *output); +const char *lttng_snapshot_output_get_name(const struct lttng_snapshot_output *output); /* Return snapshot control URL in a text format. */ -const char *lttng_snapshot_output_get_ctrl_url(struct lttng_snapshot_output *output); +const char *lttng_snapshot_output_get_ctrl_url(const struct lttng_snapshot_output *output); /* Return snapshot data URL in a text format. */ -const char *lttng_snapshot_output_get_data_url(struct lttng_snapshot_output *output); +const char *lttng_snapshot_output_get_data_url(const struct lttng_snapshot_output *output); /* * Snapshot output setter family functions. @@ -75,6 +65,36 @@ int lttng_snapshot_output_set_size(uint64_t size, /* Set the snapshot name. */ int lttng_snapshot_output_set_name(const char *name, struct lttng_snapshot_output *output); + +/* + * Set the output destination to be a path on the local filesystem. + * + * The path must be absolute. It can optionally begin with `file://`. + */ +int lttng_snapshot_output_set_local_path(const char *path, + struct lttng_snapshot_output *output); + +/* + * Set the output destination to be the network from a combined control/data + * URL. + * + * `url` must start with `net://` or `net6://`. + */ +int lttng_snapshot_output_set_network_url(const char *url, + struct lttng_snapshot_output *output); + +/* + * Set the output destination to be the network using separate URLs for control + * and data. + * + * `ctrl_url` and `data_url` must start with `tcp://` or `tcp6://`. + */ +int lttng_snapshot_output_set_network_urls( + const char *ctrl_url, const char *data_url, + struct lttng_snapshot_output *output); + +// Deprecated? + /* Set the control URL. Local and remote URL are supported. */ int lttng_snapshot_output_set_ctrl_url(const char *url, struct lttng_snapshot_output *output);