blob: e146094a4d1751c260e356075fd36b322b1db849 [file] [log] [blame]
Jon Medhurstaaf37a32013-06-11 12:10:56 +01001/**
Jon Medhurst15ce78d2014-04-10 09:02:02 +01002 * Copyright (C) ARM Limited 2010-2014. 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 {
17 char buffer_mode[64]; // buffer mode, "streaming", "low", "normal", "high" defines oneshot and buffer size
18 char sample_rate[64]; // capture mode, "high", "normal", or "low"
19 int duration; // length of profile in seconds
20 bool call_stack_unwinding; // whether stack unwinding is performed
21 int live_rate;
22 struct ImageLinkList *images; // linked list of image strings
23};
24
25class SessionXML {
26public:
Jon Medhurst15ce78d2014-04-10 09:02:02 +010027 SessionXML(const char *str);
Jon Medhurstaaf37a32013-06-11 12:10:56 +010028 ~SessionXML();
29 void parse();
30 ConfigParameters parameters;
31private:
Jon Medhurst15ce78d2014-04-10 09:02:02 +010032 const char *mSessionXML;
33 const char *mPath;
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