X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=include%2Flttng%2Ftracker.h;h=fd715d799ed53dca68a7c74d0c15a13d8dafddf1;hp=1da12f82be6909bbbf183e449a26fe9647b44530;hb=ab5be9fa2eb5ba9600a82cd18fd3cfcbac69169a;hpb=e283e4a062cc16b5839a8a479e12498789320b5e diff --git a/include/lttng/tracker.h b/include/lttng/tracker.h index 1da12f82b..fd715d799 100644 --- a/include/lttng/tracker.h +++ b/include/lttng/tracker.h @@ -1,18 +1,8 @@ /* - * Copyright (C) 2019 - Jonathan Rajotte-Julien + * Copyright (C) 2019 Jonathan Rajotte-Julien * - * 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_TRACKER_H @@ -20,6 +10,7 @@ #include #include +#include #ifdef __cplusplus extern "C" { @@ -49,8 +40,14 @@ enum lttng_tracker_id_status { LTTNG_TRACKER_ID_STATUS_UNSET = 1, }; -struct lttng_handle; +/* + * A tracker id. + */ struct lttng_tracker_id; + +/* + * A collection of tracker id. + */ struct lttng_tracker_ids; /* @@ -101,18 +98,18 @@ extern enum lttng_tracker_id_status lttng_tracker_id_set_all( struct lttng_tracker_id *id); /* - * Destroys (frees) a tracker id. + * Destroy a tracker id. */ extern void lttng_tracker_id_destroy(struct lttng_tracker_id *id); /* - * Returns the type of the tracker id. + * Get the type of a tracker id. */ extern enum lttng_tracker_id_type lttng_tracker_id_get_type( const struct lttng_tracker_id *id); /* - * Returns the value of the tracker id. + * Get the value of a tracker id. * * Returns LTTNG_TRACKER_ID_OK on success, * LTTNG_TRACKER_ID_STATUS_INVALID when the tracker is not of type @@ -123,7 +120,7 @@ extern enum lttng_tracker_id_status lttng_tracker_id_get_value( const struct lttng_tracker_id *id, int *value); /* - * Returns the string representation of the tracker id. + * Get the string representation of the tracker id. * * Returns LTTNG_TRACKER_ID_OK on success, * LTTNG_TRACKER_ID_STATUS_INVALID when the tracker is not of type @@ -157,13 +154,10 @@ extern int lttng_untrack_id(struct lttng_handle *handle, const struct lttng_tracker_id *id); /* - * List IDs in the tracker. + * List IDs of a tracker. * - * tracker_type is the type of tracker. - * ids is set to an allocated lttng_tracker_ids representing IDs - * currently tracked. - * On success, caller is responsible for freeing ids - * using lttng_tracker_ids_destroy. + * On success, ids is allocated. + * The ids collection must be freed by the caller with lttng_destroy_ids(). * * Returns 0 on success, else a negative LTTng error code. */