X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Fbabeltrace.h;h=cd910280777577f8f879f35c0f8f1b6ce6c79124;hp=dfe6112d0b9747e5c021fd9ceb1dd3231dcabbec;hb=312c056ae3d374b253fa0cfe5ed576c0b0e5e569;hpb=d2d71d7cf3a7108fad0a2ec8becfa8d99098fc51 diff --git a/include/babeltrace/babeltrace.h b/include/babeltrace/babeltrace.h index dfe6112d..cd910280 100644 --- a/include/babeltrace/babeltrace.h +++ b/include/babeltrace/babeltrace.h @@ -1,10 +1,10 @@ -#ifndef _BABELTRACE_H -#define _BABELTRACE_H +#ifndef BABELTRACE_BABELTRACE_H +#define BABELTRACE_BABELTRACE_H /* - * BabelTrace API + * Babeltrace API * - * Copyright 2010-2011 - Mathieu Desnoyers + * Copyright 2010-2017 EfficiOS Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -15,71 +15,94 @@ * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - */ - -/* Forward declarations */ -struct babeltrace_iter; -struct trace_collection; -struct ctf_stream_event; -struct ctf_stream; - -/* - * babeltrace_iter_create - Allocate a trace collection iterator. - */ -struct babeltrace_iter *babeltrace_iter_create(struct trace_collection *tc); - -/* - * babeltrace_iter_destroy - Free a trace collection iterator. - */ -void babeltrace_iter_destroy(struct babeltrace_iter *iter); - -/* - * babeltrace_iter_next: Move trace collection position to the next event. * - * Returns 0 on success, a negative value on error + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. */ -int babeltrace_iter_next(struct babeltrace_iter *iter); -/* - * babeltrace_iter_get_pos - Get the current trace collection position. - * - * The position returned by this function needs to be freed by - * babeltrace_iter_free_pos after use. - */ -struct babeltrace_iter_pos * - babeltrace_iter_get_pos(struct babeltrace_iter *iter); +/* Core API */ +#include +#include +#include +#include +#include -/* - * babeltrace_iter_free_pos - Free the position. - */ -void babeltrace_iter_free_pos(struct babeltrace_iter_pos *pos); +/* Legacy API (for CTF writer) */ +#include -/* - * babeltrace_iter_seek_pos - Seek the trace collection to the position. - */ -int babeltrace_iter_seek_pos(struct babeltrace_iter *iter, - struct babeltrace_iter_pos *pos); +/* CTF writer API */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -/* - * babeltrace_iter_seek_time: Seek the trace collection to the given timestamp. - * - * Return EOF if timestamp is after the last event of the trace collection. - * Return other negative value for other errors. - * Return 0 for success. - */ -int babeltrace_iter_seek_time(struct babeltrace_iter *iter, - uint64_t timestamp); +/* CTF IR API */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -/* - * babeltrace_iter_read_event: Read the iterator's current event data. - * - * @iter: trace collection iterator (input) - * @stream: stream containing event at current position (output) - * @event: current event (output) - * Return 0 on success, negative error value on error. - */ -int babeltrace_iter_read_event(struct babeltrace_iter *iter, - struct ctf_stream **stream, - struct ctf_stream_event **event); +/* Plugin and plugin development API */ +#include +#include + +/* Graph, component, and notification API */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#endif /* _BABELTRACE_H */ +#endif /* BABELTRACE_BABELTRACE_H */