-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtrace-xml.h
61 lines (53 loc) · 2.49 KB
/
trace-xml.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <[email protected]>
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License (not later!)
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, see <http://www.gnu.org/licenses>
*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#ifndef __TRACE_XML_H
#define __TRACE_XML_H
struct tracecmd_xml_handle;
struct tacecmd_xml_system;
struct tacecmd_xml_system_node;
struct tracecmd_xml_handle *tracecmd_xml_create(const char *name, const char *version);
struct tracecmd_xml_handle *tracecmd_xml_open(const char *name);
void tracecmd_xml_close(struct tracecmd_xml_handle *handle);
int tracecmd_xml_start_system(struct tracecmd_xml_handle *handle,
const char *system);
void tracecmd_xml_end_system(struct tracecmd_xml_handle *handle);
int tracecmd_xml_start_sub_system(struct tracecmd_xml_handle *handle,
const char *subsystem);
void tracecmd_xml_end_sub_system(struct tracecmd_xml_handle *handle);
int tracecmd_xml_write_element(struct tracecmd_xml_handle *handle,
const char *obj,
const char *fmt, ...);
struct tracecmd_xml_handle *tracecmd_xml_open(const char *file);
struct tracecmd_xml_system *
tracecmd_xml_find_system(struct tracecmd_xml_handle *handle,
const char *system);
void tracecmd_xml_free_system(struct tracecmd_xml_system *system);
struct tracecmd_xml_system_node *
tracecmd_xml_system_node(struct tracecmd_xml_system *system);
const char *tracecmd_xml_node_type(struct tracecmd_xml_system_node *tnode);
struct tracecmd_xml_system_node *
tracecmd_xml_node_child(struct tracecmd_xml_system_node *tnode);
struct tracecmd_xml_system_node *
tracecmd_xml_node_next(struct tracecmd_xml_system_node *tnode);
const char *tracecmd_xml_node_value(struct tracecmd_xml_handle *handle,
struct tracecmd_xml_system_node *tnode);
int tracecmd_xml_system_exists(struct tracecmd_xml_handle *handle,
const char *system);
#endif /* __TRACE_XML_H */