Commit | Line | Data |
---|---|---|
e4195791 MD |
1 | #ifndef _BABELTRACE_CTF_EVENTS_INTERNAL_H |
2 | #define _BABELTRACE_CTF_EVENTS_INTERNAL_H | |
3 | ||
4 | /* | |
5 | * BabelTrace | |
6 | * | |
7 | * CTF events API (internal) | |
8 | * | |
9 | * Copyright 2011-2012 EfficiOS Inc. and Linux Foundation | |
10 | * | |
11 | * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> | |
12 | * Julien Desfossez <julien.desfossez@efficios.com> | |
13 | * | |
14 | * Permission is hereby granted, free of charge, to any person obtaining | |
15 | * a copy of this software and associated documentation files (the | |
16 | * "Software"), to deal in the Software without restriction, including | |
17 | * without limitation the rights to use, copy, modify, merge, publish, | |
18 | * distribute, sublicense, and/or sell copies of the Software, and to | |
19 | * permit persons to whom the Software is furnished to do so, subject to | |
20 | * the following conditions: | |
21 | * | |
22 | * The above copyright notice and this permission notice shall be | |
23 | * included in all copies or substantial portions of the Software. | |
24 | */ | |
25 | ||
26 | #include <babeltrace/iterator-internal.h> | |
634d474b MD |
27 | #include <babeltrace/ctf/callbacks.h> |
28 | #include <babeltrace/ctf/callbacks-internal.h> | |
8a4722b0 | 29 | #include <babeltrace/ctf-ir/metadata.h> |
634d474b | 30 | #include <glib.h> |
e4195791 | 31 | |
9e88d150 | 32 | struct ctf_stream_definition; |
04ae3991 | 33 | |
c50d2a7a JD |
34 | /* |
35 | * These structures are public mappings to internal ctf_event structures. | |
36 | */ | |
37 | struct bt_ctf_event { | |
38 | struct ctf_event_definition *parent; | |
39 | }; | |
40 | ||
41 | struct bt_ctf_event_decl { | |
e003ab50 | 42 | struct ctf_event_declaration parent; |
64c2c249 JD |
43 | GPtrArray *context_decl; |
44 | GPtrArray *fields_decl; | |
45 | GPtrArray *packet_header_decl; | |
46 | GPtrArray *event_context_decl; | |
47 | GPtrArray *event_header_decl; | |
48 | GPtrArray *packet_context_decl; | |
c50d2a7a JD |
49 | }; |
50 | ||
e4195791 MD |
51 | struct bt_ctf_iter { |
52 | struct bt_iter parent; | |
c50d2a7a | 53 | struct bt_ctf_event current_ctf_event; /* last read event */ |
634d474b MD |
54 | GArray *callbacks; /* Array of struct bt_stream_callbacks */ |
55 | struct bt_callback_chain main_callbacks; /* For all events */ | |
56 | /* | |
57 | * Flag indicating if dependency graph needs to be recalculated. | |
58 | * Set by bt_iter_add_callback(), and checked (and | |
59 | * cleared) by upon entry into bt_iter_read_event(). | |
60 | * bt_iter_read_event() is responsible for calling dep | |
61 | * graph calculation if it sees this flag set. | |
62 | */ | |
63 | int recalculate_dep_graph; | |
64 | /* | |
65 | * Array of pointers to struct bt_dependencies, for garbage | |
66 | * collection. We're not using a linked list here because each | |
67 | * struct bt_dependencies can belong to more than one | |
68 | * bt_iter. | |
69 | */ | |
70 | GPtrArray *dep_gc; | |
f60efc0e | 71 | uint64_t events_lost; |
e4195791 MD |
72 | }; |
73 | ||
74 | #endif /*_BABELTRACE_CTF_EVENTS_INTERNAL_H */ |