Update readme
[babeltrace.git] / include / babeltrace / ctf / metadata.h
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 {
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;
37 };
38
39 struct ctf_stream {
40 struct declaration_scope *scope; /* parent is trace scope */
41 GArray *events_by_id; /* Array of struct ctf_event indexed by id */
42 GHashTable *event_quark_to_id; /* GQuark to numeric id */
43
44 uint64_t stream_id;
45 struct declaration_struct *event_header;
46 struct declaration_struct *event_context;
47 struct declaration_struct *packet_context;
48 };
49
50 struct ctf_event {
51 struct declaration_scope *scope; /* parent is stream scope */
52 GQuark name;
53 uint64_t id; /* Numeric identifier within the stream */
54 uint64_t stream_id;
55 struct declaration_struct *context;
56 struct declaration_struct *fields;
57 };
58
59 #endif /* _BABELTRACE_CTF_METADATA_H */
This page took 0.030669 seconds and 5 git commands to generate.