rosterxml.h 948 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef ROSTERXML_H
  2. #define ROSTERXML_H
  3. #include <QObject>
  4. #include <QDomDocument>
  5. #include <QTextStream>
  6. #include <QFile>
  7. #include <QDebug>
  8. #include "rosteritemmodel.h"
  9. class RosterXml : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit RosterXml(QObject *parent = 0);
  14. bool createRosterXML( QString &xmlFileRoster );
  15. bool saveRosterXml();
  16. void addMuc( RosterItemModel *itemRoster );
  17. void removeMuc( QString &jidRoom );
  18. void addContact(RosterItemModel *itemRoster);
  19. QList<RosterItemModel *> getListMuc();
  20. signals:
  21. public slots:
  22. private:
  23. void routineAddTextNode(QDomElement &rootNode, QString &nodeName, QString &textInfo);
  24. bool itemExists(const QString &bareJid) const;
  25. void changeGroup( QString &bareJid, QString &newGroup );
  26. QDomDocument rosterXMLDoc;
  27. QDomElement rootRoster;
  28. QString nameTagMuc;
  29. QString rosterXmlFile;
  30. //QDomElement nodeMuc;
  31. };
  32. #endif // ROSTERXML_H