Move to kernel style SPDX license identifiers
[lttng-tools.git] / include / lttng / notification / channel.h
index 7708cfd56e915a293007d481f0f36c1dd8980454..95a048fb9da1dca06ca32dfaa59cb9b597eb58e2 100644 (file)
@@ -1,18 +1,8 @@
 /*
- * Copyright (C) 2017 Jérémie Galarneau <jeremie.galarneau@efficios.com>
+ * Copyright (C) 2017 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_NOTIFICATION_CHANNEL_H
@@ -31,6 +21,7 @@ struct lttng_notification_channel;
 
 enum lttng_notification_channel_status {
        LTTNG_NOTIFICATION_CHANNEL_STATUS_NOTIFICATIONS_DROPPED = 1,
+       LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED = 2,
        LTTNG_NOTIFICATION_CHANNEL_STATUS_OK = 0,
        LTTNG_NOTIFICATION_CHANNEL_STATUS_ERROR = -1,
        LTTNG_NOTIFICATION_CHANNEL_STATUS_CLOSED = -2,
@@ -81,10 +72,14 @@ extern struct lttng_notification_channel *lttng_notification_channel_create(
  * Notifications can be dropped if a client consumes the notifications sent
  * through the notification channel too slowly.
  *
- * Returns LTTNG_NOTIFICATION_CHANNEL_STATUS_OK and a notification on success,
- * LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
- * provided, or LTTNG_NOTIFICATION_CHANNEL_STATUS_NOTIFICATIONS_DROPPED if
- * notifications were dropped.
+ * Returns
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_OK and a notification on success,
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
+ *     provided,
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_NOTIFICATIONS_DROPPED if notifications
+ *     were dropped,
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED if a signal was received
+ *     that caused the reception to fail.
  */
 extern enum lttng_notification_channel_status
 lttng_notification_channel_get_next_notification(
@@ -102,9 +97,10 @@ lttng_notification_channel_get_next_notification(
  * lttng_notification_channel_get_next_notification() can be called and
  * is guaranteed to not block.
  *
- * Returns LTTNG_NOTIFICATION_CHANNEL_STATUS_OK on success or
- * LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
- * provided.
+ * Returns
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_OK on success,
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
+ *     provided.
  */
 extern enum lttng_notification_channel_status
 lttng_notification_channel_has_pending_notification(
@@ -120,10 +116,11 @@ lttng_notification_channel_has_pending_notification(
  * An error will be reported if the client tries to subscribe to the same
  * condition multiple times without unsubscribing.
  *
- * Returns LTTNG_NOTIFICATION_CHANNEL_STATUS_OK on success,
- * LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
- * provided, or LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED if the
- * client was already subscribed to the condition through this channel.
+ * Returns
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_OK on success,
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
+ *     provided, or LTTNG_NOTIFICATION_CHANNEL_STATUS_ALREADY_SUBSCRIBED if the
+ *     client was already subscribed to the condition through this channel.
  */
 extern enum lttng_notification_channel_status
 lttng_notification_channel_subscribe(
@@ -139,10 +136,11 @@ lttng_notification_channel_subscribe(
  * An error will be reported if the client tries to unsubscribe to from a
  * conditions' notifications to which it was not previously subscribed.
  *
- * Returns LTTNG_NOTIFICATION_CHANNEL_STATUS_OK on success,
- * LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
- * provided, or LTTNG_NOTIFICATION_CHANNEL_STATUS_UNKNOWN_CONDITION if the
- * client was not already subscribed to the condition through this channel.
+ * Returns
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_OK on success,
+ *   - LTTNG_NOTIFICATION_CHANNEL_STATUS_INVALID if an invalid parameter was
+ *     provided, or LTTNG_NOTIFICATION_CHANNEL_STATUS_UNKNOWN_CONDITION if the
+ *     client was not already subscribed to the condition through this channel.
  */
 extern enum lttng_notification_channel_status
 lttng_notification_channel_unsubscribe(
This page took 0.023432 seconds and 4 git commands to generate.