MythTV  master
mythbinaryplist.h
Go to the documentation of this file.
1 #ifndef PLIST_H
2 #define PLIST_H
3 
4 // Qt
5 #include <QVariant>
6 #include <QXmlStreamWriter>
7 
8 // MythTV
9 #include "mythbaseexp.h"
10 
12 {
13  public:
14  explicit MythBinaryPList(const QByteArray& Data);
15  QVariant GetValue (const QString& Key);
16  QString ToString ();
17  bool ToXML (QIODevice* Device);
18 
19  private:
20  void ParseBinaryPList (const QByteArray& Data);
21  QVariant ParseBinaryNode (uint64_t Num);
22  QVariantMap ParseBinaryDict (uint8_t* Data);
23  QList<QVariant> ParseBinaryArray (uint8_t* Data);
24  static QVariant ParseBinaryString (uint8_t* Data);
25  static QVariant ParseBinaryReal (uint8_t* Data);
26  static QVariant ParseBinaryDate (uint8_t* Data);
27  static QVariant ParseBinaryData (uint8_t* Data);
28  static QVariant ParseBinaryUnicode(uint8_t* Data);
29  static QVariant ParseBinaryUInt (uint8_t** Data);
30  static uint64_t GetBinaryCount (uint8_t** Data);
31  static uint64_t GetBinaryUInt (uint8_t* Data, uint64_t Size);
32  uint8_t* GetBinaryObject (uint64_t Num);
33  bool ToXML (const QVariant& Data, QXmlStreamWriter& Xml);
34  void DictToXML (const QVariant& Data, QXmlStreamWriter& Xml);
35  void ArrayToXML (const QVariant& Data, QXmlStreamWriter& Xml);
36 
37  QVariant m_result;
38  uint8_t* m_data { nullptr };
39  uint8_t* m_offsetTable { nullptr };
40  uint64_t m_rootObj { 0 };
41  uint64_t m_numObjs { 0 };
42  uint8_t m_offsetSize { 0 };
43  uint8_t m_parmSize { 0 };
44 };
45 
46 #endif
mythbaseexp.h
MythBinaryPList
Definition: mythbinaryplist.h:11
Device
A device containing images (ie. USB stick, CD, storage group etc)
Definition: imagemanager.cpp:33
MBASE_PUBLIC
#define MBASE_PUBLIC
Definition: mythbaseexp.h:15
MythBinaryPList::m_result
QVariant m_result
Definition: mythbinaryplist.h:37