Add lttng-share header and change data type
[lttng-tools.git] / ltt-sessiond / session.h
CommitLineData
91d76f53 1/*
5b74c7b1
DG
2 * Copyright (C) 2011 - David Goulet <david.goulet@polymtl.ca>
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */
18
19#ifndef _LTT_SESSION_H
20#define _LTT_SESSION_H
21
5b97ec60 22#include <lttng/lttng.h>
d4a2a84a
DG
23#include <uuid/uuid.h>
24
5e16da05
MD
25/*
26 * FIXME: create a cmd_context structure to pass this kind of
27 * information around as parameter. Will facilitate multithreaded design
28 * later.
29 */
471d1693
DG
30extern struct ltt_session *current_session;
31
5b74c7b1
DG
32/* Global session list */
33struct ltt_session_list {
34 struct cds_list_head head;
35};
36
37/* ltt-session - This data structure contains information needed
38 * to identify a tracing session for both LTTng and UST.
39 */
40struct ltt_session {
41 char *name;
42 struct cds_list_head list;
43 uuid_t uuid;
44 struct cds_list_head ust_traces;
1657e9bb
DG
45 struct cds_list_head kernel_traces;
46 unsigned int ust_trace_count;
47 unsigned int kern_trace_count;
5b74c7b1 48 pid_t ust_consumer;
1657e9bb 49 pid_t kernel_consumer;
5b74c7b1
DG
50};
51
52/* Prototypes */
53int create_session(char *name, uuid_t *session_id);
54int destroy_session(uuid_t *uuid);
55void get_lttng_session(struct lttng_session *lt);
56struct ltt_session *find_session_by_uuid(uuid_t session_id);
57struct ltt_session *find_session_by_name(char *name);
58unsigned int get_session_count(void);
59
60#endif /* _LTT_SESSION_H */
This page took 0.024609 seconds and 4 git commands to generate.