1 #ifndef _BABELTRACE_CTF_TYPES_H
2 #define _BABELTRACE_CTF_TYPES_H
9 * Copyright 2010 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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:
18 * The above copyright notice and this permission notice shall be included in
19 * all copies or substantial portions of the Software.
22 #include <babeltrace/types.h>
27 * IMPORTANT: All lengths (len) and offsets (start, end) are expressed in bits,
30 * All write primitives, as well as read for dynamically sized entities, can
31 * receive a NULL ptr/dest parameter. In this case, no write is performed, but
32 * the size is returned.
35 uint64_t ctf_uint_read(struct stream_pos
*pos
,
36 const struct type_integer
*integer_type
);
37 int64_t ctf_int_read(struct stream_pos
*pos
,
38 const struct type_integer
*integer_type
);
39 void ctf_uint_write(struct stream_pos
*pos
,
40 const struct type_integer
*integer_type
,
42 void ctf_int_write(struct stream_pos
*pos
,
43 const struct type_integer
*integer_type
,
46 double ctf_double_read(struct stream_pos
*pos
,
47 const struct type_float
*src
);
48 void ctf_double_write(struct stream_pos
*pos
,
49 const struct type_float
*dest
,
51 long double ctf_ldouble_read(struct stream_pos
*pos
,
52 const struct type_float
*src
);
53 void ctf_ldouble_write(struct stream_pos
*pos
,
54 const struct type_float
*dest
,
56 void ctf_float_copy(struct stream_pos
*destp
,
57 struct stream_pos
*srcp
,
58 const struct type_float
*float_type
);
60 void ctf_string_copy(struct stream_pos
*dest
, struct stream_pos
*src
,
61 const struct type_string
*string_type
);
62 void ctf_string_read(char **dest
, struct stream_pos
*src
,
63 const struct type_string
*string_type
);
64 void ctf_string_write(struct stream_pos
*dest
, const char *src
,
65 const struct type_string
*string_type
);
66 void ctf_string_free_temp(char *string
);
68 GArray
*ctf_enum_read(struct stream_pos
*pos
,
69 const struct type_enum
*src
);
70 void ctf_enum_write(struct stream_pos
*pos
,
71 const struct type_enum
*dest
,
73 void ctf_struct_begin(struct stream_pos
*pos
,
74 const struct type_struct
*struct_type
);
75 void ctf_struct_end(struct stream_pos
*pos
,
76 const struct type_struct
*struct_type
);
77 void ctf_variant_begin(struct stream_pos
*pos
,
78 const struct type_variant
*variant_type
);
79 void ctf_variant_end(struct stream_pos
*pos
,
80 const struct type_variant
*variant_type
);
81 void ctf_array_begin(struct stream_pos
*pos
,
82 const struct type_array
*array_type
);
83 void ctf_array_end(struct stream_pos
*pos
,
84 const struct type_array
*array_type
);
85 void ctf_sequence_begin(struct stream_pos
*pos
,
86 const struct type_sequence
*sequence_type
);
87 void ctf_sequence_end(struct stream_pos
*pos
,
88 const struct type_sequence
*sequence_type
);
90 #endif /* _BABELTRACE_CTF_TYPES_H */
This page took 0.034456 seconds and 4 git commands to generate.