Commit | Line | Data |
---|---|---|
c054553d MD |
1 | #ifndef _BABELTRACE_CTF_METADATA_H |
2 | #define _BABELTRACE_CTF_METADATA_H | |
3 | ||
4 | /* | |
5 | * BabelTrace | |
6 | * | |
7 | * CTF Metadata Header | |
8 | * | |
9 | * Copyright 2011 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
10 | * | |
11 | * Permission is hereby granted, free of charge, to any person obtaining a copy | |
12 | * of this software and associated documentation files (the "Software"), to deal | |
13 | * in the Software without restriction, including without limitation the rights | |
14 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
15 | * copies of the Software, and to permit persons to whom the Software is | |
16 | * furnished to do so, subject to the following conditions: | |
17 | * | |
18 | * The above copyright notice and this permission notice shall be included in | |
19 | * all copies or substantial portions of the Software. | |
20 | */ | |
21 | ||
22 | #include <babeltrace/types.h> | |
23 | #include <glib.h> | |
24 | ||
25 | struct ctf_trace; | |
26 | struct ctf_stream; | |
27 | struct ctf_event; | |
28 | ||
29 | struct ctf_trace { | |
fe21b943 MD |
30 | struct declaration_scope *scope; /* root scope */ |
31 | GArray *streams; /* Array of struct ctf_stream */ | |
32 | ||
33 | uint64_t major; | |
34 | uint64_t minor; | |
35 | uint8_t uuid[16]; | |
36 | uint64_t word_size; | |
c054553d MD |
37 | }; |
38 | ||
39 | struct ctf_stream { | |
fe21b943 | 40 | struct declaration_scope *scope; /* parent is trace scope */ |
c054553d MD |
41 | GArray *events_by_id; /* Array of struct ctf_event indexed by id */ |
42 | GHashTable *event_quark_to_id; /* GQuark to numeric id */ | |
fe21b943 MD |
43 | |
44 | uint64_t stream_id; | |
45 | struct declaration_struct *event_header; | |
46 | struct declaration_struct *event_context; | |
47 | struct declaration_struct *packet_context; | |
c054553d MD |
48 | }; |
49 | ||
50 | ||
51 | struct ctf_event { | |
fe21b943 MD |
52 | struct declaration_scope *scope; /* parent is stream scope */ |
53 | GQuark name; | |
54 | uint64_t id; /* Numeric identifier within the stream */ | |
55 | uint64_t stream_id; | |
56 | struct declaration_struct *context; | |
57 | struct declaration_struct *fields; | |
c054553d MD |
58 | }; |
59 | ||
60 | #endif /* _BABELTRACE_CTF_METADATA_H */ |