gator: Version 5.20
[firefly-linux-kernel-4.4.55.git] / tools / gator / daemon / SessionXML.h
1 /**
2  * Copyright (C) ARM Limited 2010-2014. All rights reserved.
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
9 #ifndef SESSION_XML_H
10 #define SESSION_XML_H
11
12 #include "mxml/mxml.h"
13
14 struct ImageLinkList;
15
16 struct ConfigParameters {
17         // buffer mode, "streaming", "low", "normal", "high" defines oneshot and buffer size
18         char buffer_mode[64];
19         // capture mode, "high", "normal", or "low"
20         char sample_rate[64];
21         // whether stack unwinding is performed
22         bool call_stack_unwinding;
23         int live_rate;
24 };
25
26 class SessionXML {
27 public:
28         SessionXML(const char *str);
29         ~SessionXML();
30         void parse();
31         ConfigParameters parameters;
32 private:
33         const char *mSessionXML;
34         void sessionTag(mxml_node_t *tree, mxml_node_t *node);
35         void sessionImage(mxml_node_t *node);
36
37         // Intentionally unimplemented
38         SessionXML(const SessionXML &);
39         SessionXML &operator=(const SessionXML &);
40 };
41
42 #endif // SESSION_XML_H