#include <lttng/constant.h>
#include <common/macros.h>
+#include <lttng/session.h>
#ifdef __cplusplus
extern "C" {
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;
/*
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
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
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.
*/
/*
* Get the number of tracker id in a tracker id list.
+ *
+ * Return LTTNG_TRACKER_ID_STATUS on sucess,
+ * LTTNG_TRACKER_ID_STATUS_INVALID when passed invalid parameters.
*/
-extern int lttng_tracker_ids_get_count(const struct lttng_tracker_ids *ids);
+extern enum lttng_tracker_id_status lttng_tracker_ids_get_count(
+ const struct lttng_tracker_ids *ids, unsigned int *count);
/*
* Destroy a tracker id list.