-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfigxmlfile.h
33 lines (26 loc) · 937 Bytes
/
configxmlfile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef CONFIGXMLFILE_H
#define CONFIGXMLFILE_H
#include <QString>
#include <QMap>
#include <QtXml>
#include <QDomDocument>
#include "configfile.h"
class ConfigXmlFile : public ConfigFile
{
public:
//ConfigXmlFile();
ConfigXmlFile(QString fileName);
~ConfigXmlFile();
// These 2 functions work only for the case of MessagingServer_Config.xml and UserServer_Config.xml
// for setting Config elements attributes, in case of change in configs these need to be rewritten
// these just get the elements under parent <Root> tag
QString SetConfigElement(QString name, QMap<QString,QString> attributes, QString value="");
QString GetConfigElement(QString name, QMap<QString,QString> & attributes, QString & value);
void UpdateFile();
private:
QString GetDomElement(QString name, QDomElement& element);
public:
QDomDocument m_DomDocument;
QDomElement m_DocElem;
};
#endif // CONFIGXMLFILE_H