X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Ftypes.h;h=6bfd703d4bad08eb8dcac12671175a44752cd184;hp=059c371dea37cd2323b74a1d29d256ef338997d0;hb=312623540c466defab45503fbe0ce7ec79dcce85;hpb=b1a2f5806630289aa0b85edbb7f7c581cfa26178 diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h index 059c371d..6bfd703d 100644 --- a/include/babeltrace/types.h +++ b/include/babeltrace/types.h @@ -31,6 +31,7 @@ /* Preallocate this many fields for structures */ #define DEFAULT_NR_STRUCT_FIELDS 8 +struct ctf_stream; struct stream_pos; struct format; struct definition; @@ -102,6 +103,7 @@ struct definition { int index; /* Position of the definition in its container */ GQuark name; /* Field name in its container (or 0 if unset) */ int ref; /* number of references to the definition */ + GQuark path; }; typedef int (*rw_dispatch)(struct stream_pos *pos, @@ -111,6 +113,8 @@ typedef int (*rw_dispatch)(struct stream_pos *pos, struct stream_pos { /* read/write dispatch table. Specific to plugin used for stream. */ rw_dispatch *rw_table; /* rw dispatch table */ + int (*event_cb)(struct stream_pos *pos, + struct ctf_stream *stream_class); }; static inline @@ -359,6 +363,14 @@ void set_dynamic_definition_scope(struct definition *definition, const char *root_name); void free_definition_scope(struct definition_scope *scope); +GQuark new_definition_path(struct definition_scope *parent_scope, GQuark field_name); + +static inline +int compare_definition_path(struct definition *definition, GQuark path) +{ + return definition->path == path; +} + void declaration_ref(struct declaration *declaration); void declaration_unref(struct declaration *declaration); @@ -493,4 +505,4 @@ int sequence_rw(struct stream_pos *pos, struct definition *definition); */ void append_scope_path(const char *path, GArray *q); -#endif /* _BABELTRACE_declarationS_H */ +#endif /* _BABELTRACE_TYPES_H */