aboutsummaryrefslogtreecommitdiffstats
path: root/trace-xml.h
diff options
context:
space:
mode:
Diffstat (limited to 'trace-xml.h')
-rw-r--r--trace-xml.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/trace-xml.h b/trace-xml.h
new file mode 100644
index 0000000..d1f62b0
--- /dev/null
+++ b/trace-xml.h
@@ -0,0 +1,62 @@
1/*
2 * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@redhat.com>
3 *
4 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation;
8 * version 2.1 of the License (not later!)
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 */
21#ifndef __TRACE_XML_H
22#define __TRACE_XML_H
23
24struct tracecmd_xml_handle;
25struct tacecmd_xml_system;
26struct tacecmd_xml_system_node;
27
28struct tracecmd_xml_handle *tracecmd_xml_create(const char *name, const char *version);
29struct tracecmd_xml_handle *tracecmd_xml_open(const char *name);
30void tracecmd_xml_close(struct tracecmd_xml_handle *handle);
31
32int tracecmd_xml_start_system(struct tracecmd_xml_handle *handle,
33 const char *system);
34void tracecmd_xml_end_system(struct tracecmd_xml_handle *handle);
35
36int tracecmd_xml_start_sub_system(struct tracecmd_xml_handle *handle,
37 const char *subsystem);
38void tracecmd_xml_end_sub_system(struct tracecmd_xml_handle *handle);
39
40int tracecmd_xml_write_element(struct tracecmd_xml_handle *handle,
41 const char *obj,
42 const char *fmt, ...);
43
44struct tracecmd_xml_handle *tracecmd_xml_open(const char *file);
45
46struct tracecmd_xml_system *
47tracecmd_xml_find_system(struct tracecmd_xml_handle *handle,
48 const char *system);
49void tracecmd_xml_free_system(struct tracecmd_xml_system *system);
50struct tracecmd_xml_system_node *
51tracecmd_xml_system_node(struct tracecmd_xml_system *system);
52const char *tracecmd_xml_node_type(struct tracecmd_xml_system_node *tnode);
53struct tracecmd_xml_system_node *
54tracecmd_xml_node_child(struct tracecmd_xml_system_node *tnode);
55struct tracecmd_xml_system_node *
56tracecmd_xml_node_next(struct tracecmd_xml_system_node *tnode);
57const char *tracecmd_xml_node_value(struct tracecmd_xml_handle *handle,
58 struct tracecmd_xml_system_node *tnode);
59int tracecmd_xml_system_exists(struct tracecmd_xml_handle *handle,
60 const char *system);
61
62#endif /* __TRACE_XML_H */