Commit | Line | Data |
---|---|---|
5b74c7b1 DG |
1 | /* |
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 | ||
22 | /* Global session list */ | |
23 | struct ltt_session_list { | |
24 | struct cds_list_head head; | |
25 | }; | |
26 | ||
27 | /* ltt-session - This data structure contains information needed | |
28 | * to identify a tracing session for both LTTng and UST. | |
29 | */ | |
30 | struct ltt_session { | |
31 | char *name; | |
32 | struct cds_list_head list; | |
33 | uuid_t uuid; | |
34 | struct cds_list_head ust_traces; | |
35 | struct cds_list_head lttng_traces; | |
36 | pid_t ust_consumer; | |
37 | pid_t lttng_consumer; | |
38 | }; | |
39 | ||
40 | /* Prototypes */ | |
41 | int create_session(char *name, uuid_t *session_id); | |
42 | int destroy_session(uuid_t *uuid); | |
43 | void get_lttng_session(struct lttng_session *lt); | |
44 | struct ltt_session *find_session_by_uuid(uuid_t session_id); | |
45 | struct ltt_session *find_session_by_name(char *name); | |
46 | unsigned int get_session_count(void); | |
47 | ||
48 | #endif /* _LTT_SESSION_H */ |