SoW-2019-0002: Dynamic Snapshot
[lttng-tools.git] / include / lttng / snapshot.h
index 9bdf775a97c8e36dc7fe3846ec01189e6120e95c..33e9a53f9f8dfbcbd97eeb0084a25979eab8e9d8 100644 (file)
@@ -39,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.
@@ -65,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);
This page took 0.023988 seconds and 5 git commands to generate.