-struct relay_viewer_session {
- struct cds_list_head sessions_head;
-};
-
-static inline void session_viewer_attach(struct relay_session *session)
-{
- uatomic_inc(&session->viewer_refcount);
-}
-
-static inline void session_viewer_detach(struct relay_session *session)
-{
- uatomic_add(&session->viewer_refcount, -1);
-}
-
-struct relay_session *session_find_by_id(struct lttng_ht *ht, uint64_t id);
-struct relay_session *session_create(void);
-int session_delete(struct lttng_ht *ht, struct relay_session *session);
-
-/*
- * Direct destroy without reading the refcount.
- */
-void session_destroy(struct relay_session *session);
-
-/*
- * Destroy the session if the refcount is down to 0.
- */
-void session_try_destroy(struct lttng_ht *ht, struct relay_session *session);
-
-/*
- * Decrement the viewer refcount and destroy it if down to 0.
- */
-void session_viewer_try_destroy(struct lttng_ht *ht,
- struct relay_session *session);
+struct relay_session *session_create(const char *session_name,
+ const char *hostname, const char *base_path,
+ uint32_t live_timer,
+ bool snapshot,
+ const lttng_uuid sessiond_uuid,
+ const uint64_t *id_sessiond,
+ const uint64_t *current_chunk_id,
+ const time_t *creation_time,
+ uint32_t major,
+ uint32_t minor,
+ bool session_name_contains_creation_timestamp);
+struct relay_session *session_get_by_id(uint64_t id);
+bool session_get(struct relay_session *session);
+void session_put(struct relay_session *session);
+
+int session_close(struct relay_session *session);
+int session_abort(struct relay_session *session);
+
+void print_sessions(void);