Update readme
[babeltrace.git] / include / babeltrace / ctf / metadata.h
CommitLineData
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
25struct ctf_trace;
26struct ctf_stream;
27struct ctf_event;
28
29struct 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
39struct 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
c054553d 50struct ctf_event {
fe21b943
MD
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;
c054553d
MD
57};
58
59#endif /* _BABELTRACE_CTF_METADATA_H */
This page took 0.024153 seconds and 4 git commands to generate.