+/*
+ * Get the type of a rotation schedule object.
+ */
+extern enum lttng_rotation_schedule_type lttng_rotation_schedule_get_type(
+ const struct lttng_rotation_schedule *schedule);
+
+/*
+ * Return a newly allocated size-based session rotation schedule or NULL on
+ * error.
+ */
+extern struct lttng_rotation_schedule *
+lttng_rotation_schedule_size_threshold_create(void);
+
+/*
+ * Get a session rotation schedule's size threshold.
+ *
+ * Returns LTTNG_ROTATION_STATUS_OK on success.
+ * LTTNG_ROTATION_STATUS_UNAVAILABLE is returned if the value is unset.
+ */
+extern enum lttng_rotation_status
+lttng_rotation_schedule_size_threshold_get_threshold(
+ const struct lttng_rotation_schedule *schedule,
+ uint64_t *size_threshold_bytes);
+
+/*
+ * Set a session rotation schedule's size threshold.
+ */
+extern enum lttng_rotation_status
+lttng_rotation_schedule_size_threshold_set_threshold(
+ struct lttng_rotation_schedule *schedule,
+ uint64_t size_threshold_bytes);
+
+/*
+ * Return a newly allocated periodic session rotation schedule or NULL on
+ * error.
+ */
+extern struct lttng_rotation_schedule *
+lttng_rotation_schedule_periodic_create(void);
+
+/*
+ * Get a time-based session rotation schedule's period.
+ *
+ * Returns LTTNG_ROTATION_STATUS_OK on success.
+ * LTTNG_ROTATION_STATUS_UNAVAILABLE is returned if the value is unset.
+ */
+extern enum lttng_rotation_status lttng_rotation_schedule_periodic_get_period(
+ const struct lttng_rotation_schedule *schedule,
+ uint64_t *period_us);
+
+/*
+ * Set a time-based session rotation schedule's period.
+ */
+extern enum lttng_rotation_status lttng_rotation_schedule_periodic_set_period(
+ struct lttng_rotation_schedule *schedule,
+ uint64_t period_us);
+
+/*
+ * Destroy a rotation schedule.
+ */
+extern void lttng_rotation_schedule_destroy(
+ struct lttng_rotation_schedule *schedule);
+
+/*
+ * Destroy a set of rotation schedules. Pointers to any schedule contained
+ * in this set become invalid after this call.
+ */
+extern void lttng_rotation_schedules_destroy(
+ struct lttng_rotation_schedules *schedules);
+
+/*
+ * Get the number of schedules in a schedule set.
+ */
+extern enum lttng_rotation_status lttng_rotation_schedules_get_count(
+ const struct lttng_rotation_schedules *schedules,
+ unsigned int *count);
+
+/*
+ * Get a schedule from the set at a given index.
+ *
+ * Note that the set maintains the ownership of the returned schedule.
+ * It must not be destroyed by the user, nor should it be held beyond
+ * the lifetime of the schedules set.
+ *
+ * Returns a rotation schedule, or NULL on error.
+ */
+extern const struct lttng_rotation_schedule *
+lttng_rotation_schedules_get_at_index(
+ const struct lttng_rotation_schedules *schedules,
+ unsigned int index);
+
+/*
+ * Add a session rotation schedule to a session.
+ *
+ * Note that the current implementation currently limits the rotation schedules
+ * associated to a given session to one per type.
+ *
+ * Returns LTTNG_ROTATION_STATUS_OK on success,
+ * LTTNG_ROTATION_STATUS_SCHEDULE_ALREADY_SET if a rotation of the same type
+ * is already set.
+ */
+extern enum lttng_rotation_status lttng_session_add_rotation_schedule(
+ const char *session_name,
+ const struct lttng_rotation_schedule *schedule);
+
+/*
+ * Remove a session rotation schedule from a session.
+ *
+ * Returns LTTNG_ROTATION_STATUS_OK on success,
+ * LTTNG_ROTATION_STATUS_SCHEDULE_INVALID if the provided schedule is
+ * not set.
+ */
+extern enum lttng_rotation_status lttng_session_remove_rotation_schedule(
+ const char *session_name,
+ const struct lttng_rotation_schedule *schedule);
+
+/*
+ * Get the rotation schedules associated with a given session.
+ *
+ * Returns LTTNG_OK on success, or a negative lttng error code on error.
+ */
+extern int lttng_session_list_rotation_schedules(
+ const char *session_name,
+ struct lttng_rotation_schedules **schedules);
+