scope-exit: Clarify scope_exit noexcept requirement
[lttng-tools.git] / include / lttng / session-descriptor.h
index 32799684d29fdbef82507ef7f9db0ab541b22616..a67a4bf1c65550b407552f5301aab7267c739131 100644 (file)
@@ -1,23 +1,15 @@
 /*
- * Copyright (C) 2019 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2019 Jérémie Galarneau <jeremie.galarneau@efficios.com>
  *
- * 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_SESSION_DESCRIPTOR_H
 #define LTTNG_SESSION_DESCRIPTOR_H
 
+#include <lttng/lttng-export.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -66,12 +58,12 @@ struct lttng_session_descriptor;
  * Where CREATION_TIME is time of the creation of the session on the session
  * daemon in the form "yyyymmdd-hhmmss".
  *
- * Network output locations can also be auto-genated by leaving the
+ * Network output locations can also be auto-generated by leaving the
  * 'control_url' and 'data_url' output parameters unspecified. In such cases,
  * the session daemon will create a default output targeting a relay daemon
  * at net://127.0.0.1, using the default 'control' and 'data' ports.
  *
- * The format of the 'control_url' and 'data_url' paramaters is:
+ * The format of the 'control_url' and 'data_url' parameters is:
  *   NETPROTO://(HOST | IPADDR)[:CTRLPORT[:DATAPORT]][/TRACEPATH]
  *
  * NETPROTO: Network protocol, amongst:
@@ -113,7 +105,7 @@ enum lttng_session_descriptor_status {
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
+LTTNG_EXPORT extern struct lttng_session_descriptor *
 lttng_session_descriptor_create(const char *name);
 
 /*
@@ -122,11 +114,11 @@ lttng_session_descriptor_create(const char *name);
  * The 'name' parameter can be left NULL to auto-generate a session name.
  *
  * The 'path' must either be an absolute path or it can be left NULL to
- * use the default local outout destination.
+ * use the default local output destination.
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
+LTTNG_EXPORT extern struct lttng_session_descriptor *
 lttng_session_descriptor_local_create(const char *name, const char *path);
 
 /*
@@ -139,9 +131,8 @@ lttng_session_descriptor_local_create(const char *name, const char *path);
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
-lttng_session_descriptor_network_create(const char *name,
-               const char *control_url, const char *data_url);
+LTTNG_EXPORT extern struct lttng_session_descriptor *lttng_session_descriptor_network_create(
+       const char *name, const char *control_url, const char *data_url);
 
 /*
  * Create a snapshot session descriptor without a default output.
@@ -150,7 +141,7 @@ lttng_session_descriptor_network_create(const char *name,
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
+LTTNG_EXPORT extern struct lttng_session_descriptor *
 lttng_session_descriptor_snapshot_create(const char *name);
 
 /*
@@ -163,9 +154,8 @@ lttng_session_descriptor_snapshot_create(const char *name);
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
-lttng_session_descriptor_snapshot_local_create(const char *name,
-               const char *path);
+LTTNG_EXPORT extern struct lttng_session_descriptor *
+lttng_session_descriptor_snapshot_local_create(const char *name, const char *path);
 
 /*
  * Create a snapshot session descriptor with a remote output destination.
@@ -178,9 +168,10 @@ lttng_session_descriptor_snapshot_local_create(const char *name,
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
+LTTNG_EXPORT extern struct lttng_session_descriptor *
 lttng_session_descriptor_snapshot_network_create(const char *name,
-               const char *control_url, const char *data_url);
+                                                const char *control_url,
+                                                const char *data_url);
 
 /*
  * Create a live session descriptor without an output.
@@ -195,9 +186,8 @@ lttng_session_descriptor_snapshot_network_create(const char *name,
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
-lttng_session_descriptor_live_create(
-               const char *name, unsigned long long live_timer_interval_us);
+LTTNG_EXPORT extern struct lttng_session_descriptor *
+lttng_session_descriptor_live_create(const char *name, unsigned long long live_timer_interval_us);
 
 /*
  * Create a live session descriptor with a remote output destination.
@@ -215,11 +205,11 @@ lttng_session_descriptor_live_create(
  *
  * Returns an lttng_session_descriptor instance on success, NULL on error.
  */
-extern struct lttng_session_descriptor *
-lttng_session_descriptor_live_network_create(
-               const char *name,
-               const char *control_url, const char *data_url,
-               unsigned long long live_timer_interval_us);
+LTTNG_EXPORT extern struct lttng_session_descriptor *
+lttng_session_descriptor_live_network_create(const char *name,
+                                            const char *control_url,
+                                            const char *data_url,
+                                            unsigned long long live_timer_interval_us);
 
 /*
  * Get a session descriptor's session name.
@@ -236,10 +226,9 @@ lttng_session_descriptor_live_network_create(
  * NULL, and LTTNG_SESSION_DESCRIPTOR_STATUS_UNSET if the descriptor's
  * name parameter is unset.
  */
-extern enum lttng_session_descriptor_status
-lttng_session_descriptor_get_session_name(
-               const struct lttng_session_descriptor *descriptor,
-               const char **name);
+LTTNG_EXPORT extern enum lttng_session_descriptor_status
+lttng_session_descriptor_get_session_name(const struct lttng_session_descriptor *descriptor,
+                                         const char **name);
 
 /*
  * Destroy a local lttng_session object.
@@ -247,8 +236,8 @@ lttng_session_descriptor_get_session_name(
  * This does not destroy the session on the session daemon; it releases
  * the resources allocated by the descriptor object.
  */
-extern void lttng_session_descriptor_destroy(
-               struct lttng_session_descriptor *descriptor);
+LTTNG_EXPORT extern void
+lttng_session_descriptor_destroy(struct lttng_session_descriptor *descriptor);
 
 #ifdef __cplusplus
 }
This page took 0.026547 seconds and 4 git commands to generate.