Add functions to open trace from the traceset
[lttv.git] / lttv / lttv / traceset.h
... / ...
CommitLineData
1/* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2003-2004 Michel Dagenais
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
16 * MA 02111-1307, USA.
17 */
18
19#ifndef TRACESET_H
20#define TRACESET_H
21
22#include <lttv/attribute.h>
23#include <lttv/hook.h>
24#include <ltt/ltt.h>
25
26/* A traceset is a set of traces to be analyzed together. */
27
28typedef struct _LttvTraceset LttvTraceset;
29
30typedef struct _LttvTrace LttvTrace;
31
32struct bt_context;
33
34/* Tracesets may be added to, removed from and their content listed. */
35
36LttvTraceset *lttv_traceset_new();
37
38char * lttv_traceset_name(LttvTraceset * s);
39
40#ifdef BABEL_CLEANUP
41LttvTrace *lttv_trace_new(LttTrace *t);
42#endif
43
44LttvTraceset *lttv_traceset_copy(LttvTraceset *s_orig);
45
46LttvTraceset *lttv_traceset_load(const gchar *filename);
47
48struct bt_context *lttv_traceset_get_context(LttvTraceset *s);
49
50
51gint lttv_traceset_save(LttvTraceset *s);
52
53void lttv_traceset_destroy(LttvTraceset *s);
54
55void lttv_trace_destroy(LttvTrace *t);
56
57void lttv_traceset_add(LttvTraceset *s, LttvTrace *t);
58
59/*
60 * lttv_traceset_add_path : Add all traces recursively to a traceset
61 *
62 * ts is the traceset in which will be contained the traces
63 *
64 * path is a path to a trace(s). It cannot be NULL and it is not parse
65 * recursively.
66 * todo mdenis: implement algorithm to go through all folders recursively to
67 * find all traces in the path
68 *
69 * @return 0 on success, -1 on failure
70 */
71int lttv_traceset_add_path(LttvTraceset *ts, const char *path);
72
73unsigned lttv_traceset_number(LttvTraceset *s);
74
75LttvTrace *lttv_traceset_get(LttvTraceset *s, unsigned i);
76
77void lttv_traceset_remove(LttvTraceset *s, unsigned i);
78
79/* An attributes table is attached to the set and to each trace in the set. */
80
81LttvAttribute *lttv_traceset_attribute(LttvTraceset *s);
82
83LttvAttribute *lttv_trace_attribute(LttvTrace *t);
84
85#ifdef BABEL_CLEANUP
86LttTrace *lttv_trace(LttvTrace *t);
87#endif
88
89guint lttv_trace_get_ref_number(LttvTrace * t);
90
91guint lttv_trace_ref(LttvTrace * t);
92
93guint lttv_trace_unref(LttvTrace * t);
94
95#endif // TRACESET_H
96
This page took 0.022088 seconds and 4 git commands to generate.