b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 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 COUNTERS_H |
| 10 | #define COUNTERS_H |
| 11 | |
| 12 | #include "mxml/mxml.h" |
| 13 | |
| 14 | class ConfigurationXML { |
| 15 | public: |
| 16 | static void getDefaultConfigurationXml(const char * & xml, unsigned int & len); |
| 17 | static void getPath(char* path); |
| 18 | static void remove(); |
| 19 | |
| 20 | ConfigurationXML(); |
| 21 | ~ConfigurationXML(); |
| 22 | const char* getConfigurationXML() {return mConfigurationXML;} |
| 23 | void validate(void); |
| 24 | |
| 25 | private: |
| 26 | char* mConfigurationXML; |
| 27 | int mIndex; |
| 28 | |
| 29 | int parse(const char* xmlFile); |
| 30 | int configurationsTag(mxml_node_t *node); |
| 31 | void configurationTag(mxml_node_t *node); |
| 32 | |
| 33 | // Intentionally unimplemented |
| 34 | ConfigurationXML(const ConfigurationXML &); |
| 35 | ConfigurationXML &operator=(const ConfigurationXML &); |
| 36 | }; |
| 37 | |
| 38 | #endif // COUNTERS_H |