File: trace-xml.h

package info (click to toggle)
trace-cmd 2.6-0.1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,660 kB
  • ctags: 4,276
  • sloc: ansic: 38,878; makefile: 544; python: 538
file content (61 lines) | stat: -rw-r--r-- 2,554 bytes parent folder | download | duplicates (3)
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 <srostedt@redhat.com>
 *
 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 * 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 */