Fix: sessiond: list-triggers: don't return internal triggers
[lttng-tools.git] / src / bin / lttng-relayd / viewer-session.h
CommitLineData
7591bab1
MD
1#ifndef _VIEWER_SESSION_H
2#define _VIEWER_SESSION_H
3
4/*
ab5be9fa
MJ
5 * Copyright (C) 2013 Julien Desfossez <jdesfossez@efficios.com>
6 * Copyright (C) 2013 David Goulet <dgoulet@efficios.com>
7 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7591bab1 8 *
ab5be9fa 9 * SPDX-License-Identifier: GPL-2.0-only
7591bab1 10 *
7591bab1
MD
11 */
12
13#include <limits.h>
14#include <inttypes.h>
15#include <pthread.h>
16#include <urcu/list.h>
17#include <urcu/ref.h>
18
19#include <common/hashtable/hashtable.h>
b66a15d1 20#include <common/trace-chunk.h>
7591bab1
MD
21
22#include "session.h"
23
24struct relay_viewer_session {
25 /*
26 * Session list. Updates are protected by the session_list_lock.
27 * Traversals are protected by RCU.
28 * This list limits the design to having the sessions in at most
29 * one viewer session.
30 */
31 struct cds_list_head session_list; /* RCU list. */
32 pthread_mutex_t session_list_lock; /* Protects list updates. */
b66a15d1 33 struct lttng_trace_chunk *current_trace_chunk;
7591bab1
MD
34};
35
36struct relay_viewer_session *viewer_session_create(void);
37void viewer_session_destroy(struct relay_viewer_session *vsession);
38void viewer_session_close(struct relay_viewer_session *vsession);
39
dbd6665b
JG
40enum lttng_viewer_attach_return_code viewer_session_attach(
41 struct relay_viewer_session *vsession,
7591bab1
MD
42 struct relay_session *session);
43int viewer_session_is_attached(struct relay_viewer_session *vsession,
44 struct relay_session *session);
d62023be
JD
45void viewer_session_close_one_session(struct relay_viewer_session *vsession,
46 struct relay_session *session);
b3ab5004
MD
47int viewer_session_set_trace_chunk_copy(struct relay_viewer_session *vsession,
48 struct lttng_trace_chunk *relay_session_trace_chunk);
7591bab1
MD
49
50#endif /* _VIEWER_SESSION_H */
This page took 0.0419 seconds and 4 git commands to generate.