1 /**
2 * Copyright (C) ARM Limited 2010-2012. 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 */
9 #ifndef SESSION_XML_H
10 #define SESSION_XML_H
12 #include "mxml/mxml.h"
13 #include "SessionData.h"
15 struct ConfigParameters {
16 char* title; // status title
17 char uuid[64]; // universal unique identifier
18 char* target_path; // target path of where to write to disk
19 char* output_path; // host path of where to write to disk
20 char buffer_mode[64]; // buffer mode, "streaming", "low", "normal", "high" defines oneshot and buffer size
21 char sample_rate[64]; // capture mode, "high", "normal", or "low"
22 int duration; // length of profile in seconds
23 bool call_stack_unwinding; // whether stack unwinding is performed
24 struct ImageLinkList *images; // linked list of image strings
25 };
27 class SessionXML {
28 public:
29 SessionXML(const char* str);
30 ~SessionXML();
31 void parse();
32 ConfigParameters parameters;
33 private:
34 char* mSessionXML;
35 char* mPath;
36 void sessionTag(mxml_node_t *tree, mxml_node_t *node);
37 void sessionImage(mxml_node_t *node);
38 };
40 #endif // SESSION_XML_H