cbba50b0ee26e6e3604ad35035720e0f66ff5401
1 #ifndef _BABELTRACE_FORMAT_H
2 #define _BABELTRACE_FORMAT_H
9 * Copyright 2010, 2011 - 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 /* Parent trace descriptor */
28 struct trace_descriptor
{
34 uint64_t (*uint_read
)(struct stream_pos
*pos
,
35 const struct declaration_integer
*integer_declaration
);
36 int64_t (*int_read
)(struct stream_pos
*pos
,
37 const struct declaration_integer
*integer_declaration
);
38 void (*uint_write
)(struct stream_pos
*pos
,
39 const struct declaration_integer
*integer_declaration
,
41 void (*int_write
)(struct stream_pos
*pos
,
42 const struct declaration_integer
*integer_declaration
,
45 void (*float_copy
)(struct stream_pos
*destp
,
46 struct stream_pos
*srcp
,
47 const struct declaration_float
*float_declaration
);
48 double (*double_read
)(struct stream_pos
*pos
,
49 const struct declaration_float
*float_declaration
);
50 void (*double_write
)(struct stream_pos
*pos
,
51 const struct declaration_float
*float_declaration
,
53 long double (*ldouble_read
)(struct stream_pos
*pos
,
54 const struct declaration_float
*float_declaration
);
55 void (*ldouble_write
)(struct stream_pos
*pos
,
56 const struct declaration_float
*float_declaration
,
59 void (*string_copy
)(struct stream_pos
*dest
, struct stream_pos
*src
,
60 const struct declaration_string
*string_declaration
);
61 void (*string_read
)(char **dest
, struct stream_pos
*src
,
62 const struct declaration_string
*string_declaration
);
63 void (*string_write
)(struct stream_pos
*dest
, const char *src
,
64 const struct declaration_string
*string_declaration
);
65 void (*string_free_temp
)(char *string
);
68 * enum_read returns a GArray of GQuark. Must be released with
71 GArray
*(*enum_read
)(struct stream_pos
*pos
,
72 const struct declaration_enum
*src
);
73 void (*enum_write
)(struct stream_pos
*pos
,
74 const struct declaration_enum
*dest
,
76 void (*struct_begin
)(struct stream_pos
*pos
,
77 const struct declaration_struct
*struct_declaration
);
78 void (*struct_end
)(struct stream_pos
*pos
,
79 const struct declaration_struct
*struct_declaration
);
80 void (*variant_begin
)(struct stream_pos
*pos
,
81 const struct declaration_variant
*variant_declaration
);
82 void (*variant_end
)(struct stream_pos
*pos
,
83 const struct declaration_variant
*variant_declaration
);
84 void (*array_begin
)(struct stream_pos
*pos
,
85 const struct declaration_array
*array_declaration
);
86 void (*array_end
)(struct stream_pos
*pos
,
87 const struct declaration_array
*array_declaration
);
88 void (*sequence_begin
)(struct stream_pos
*pos
,
89 const struct declaration_sequence
*sequence_declaration
);
90 void (*sequence_end
)(struct stream_pos
*pos
,
91 const struct declaration_sequence
*sequence_declaration
);
92 struct trace_descriptor
*(*open_trace
)(const char *path
, int flags
);
93 void (*close_trace
)(struct trace_descriptor
*descriptor
);
96 struct format
*bt_lookup_format(GQuark qname
);
97 void bt_fprintf_format_list(FILE *fp
);
98 int bt_register_format(struct format
*format
);
100 /* TBD: format unregistration */
102 #endif /* _BABELTRACE_FORMAT_H */
This page took 0.031612 seconds and 4 git commands to generate.