diff options
Diffstat (limited to 'trace-xml.h')
-rw-r--r-- | trace-xml.h | 62 |
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 | |||
24 | struct tracecmd_xml_handle; | ||
25 | struct tacecmd_xml_system; | ||
26 | struct tacecmd_xml_system_node; | ||
27 | |||
28 | struct tracecmd_xml_handle *tracecmd_xml_create(const char *name, const char *version); | ||
29 | struct tracecmd_xml_handle *tracecmd_xml_open(const char *name); | ||
30 | void tracecmd_xml_close(struct tracecmd_xml_handle *handle); | ||
31 | |||
32 | int tracecmd_xml_start_system(struct tracecmd_xml_handle *handle, | ||
33 | const char *system); | ||
34 | void tracecmd_xml_end_system(struct tracecmd_xml_handle *handle); | ||
35 | |||
36 | int tracecmd_xml_start_sub_system(struct tracecmd_xml_handle *handle, | ||
37 | const char *subsystem); | ||
38 | void tracecmd_xml_end_sub_system(struct tracecmd_xml_handle *handle); | ||
39 | |||
40 | int tracecmd_xml_write_element(struct tracecmd_xml_handle *handle, | ||
41 | const char *obj, | ||
42 | const char *fmt, ...); | ||
43 | |||
44 | struct tracecmd_xml_handle *tracecmd_xml_open(const char *file); | ||
45 | |||
46 | struct tracecmd_xml_system * | ||
47 | tracecmd_xml_find_system(struct tracecmd_xml_handle *handle, | ||
48 | const char *system); | ||
49 | void tracecmd_xml_free_system(struct tracecmd_xml_system *system); | ||
50 | struct tracecmd_xml_system_node * | ||
51 | tracecmd_xml_system_node(struct tracecmd_xml_system *system); | ||
52 | const char *tracecmd_xml_node_type(struct tracecmd_xml_system_node *tnode); | ||
53 | struct tracecmd_xml_system_node * | ||
54 | tracecmd_xml_node_child(struct tracecmd_xml_system_node *tnode); | ||
55 | struct tracecmd_xml_system_node * | ||
56 | tracecmd_xml_node_next(struct tracecmd_xml_system_node *tnode); | ||
57 | const char *tracecmd_xml_node_value(struct tracecmd_xml_handle *handle, | ||
58 | struct tracecmd_xml_system_node *tnode); | ||
59 | int tracecmd_xml_system_exists(struct tracecmd_xml_handle *handle, | ||
60 | const char *system); | ||
61 | |||
62 | #endif /* __TRACE_XML_H */ | ||