blob: 2ba276a380213e9484d9e407b43f81b247e5a46a [file] [log] [blame]
Jon Medhurstaaf37a32013-06-11 12:10:56 +01001/**
Jon Medhurstb1d07442015-05-08 12:04:18 +01002 * Copyright (C) ARM Limited 2010-2015. All rights reserved.
Jon Medhurstaaf37a32013-06-11 12:10:56 +01003 *
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
14struct ImageLinkList;
15
16struct ConfigParameters {
Jon Medhurst96b56152014-10-30 18:01:15 +000017 // 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;
Jon Medhurstaaf37a32013-06-11 12:10:56 +010023 int live_rate;
Jon Medhurstaaf37a32013-06-11 12:10:56 +010024};
25
26class SessionXML {
27public:
Jon Medhurst15ce78d2014-04-10 09:02:02 +010028 SessionXML(const char *str);
Jon Medhurstaaf37a32013-06-11 12:10:56 +010029 ~SessionXML();
30 void parse();
31 ConfigParameters parameters;
32private:
Jon Medhurst15ce78d2014-04-10 09:02:02 +010033 const char *mSessionXML;
Jon Medhurstaaf37a32013-06-11 12:10:56 +010034 void sessionTag(mxml_node_t *tree, mxml_node_t *node);
35 void sessionImage(mxml_node_t *node);
Jon Medhurst34d97692013-12-19 09:23:06 +000036
37 // Intentionally unimplemented
38 SessionXML(const SessionXML &);
39 SessionXML &operator=(const SessionXML &);
Jon Medhurstaaf37a32013-06-11 12:10:56 +010040};
41
42#endif // SESSION_XML_H