00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KMBOX_MBOXENTRY_H
00021 #define KMBOX_MBOXENTRY_H
00022
00023 #include "kmbox_export.h"
00024
00025 #include <QtCore/QList>
00026 #include <QtCore/QMetaType>
00027 #include <QtCore/QPair>
00028 #include <QtCore/QSharedDataPointer>
00029
00030 namespace KMBox {
00031
00038 class KMBOX_EXPORT MBoxEntry
00039 {
00040 public:
00044 typedef QList<MBoxEntry> List;
00045
00049 typedef QPair<MBoxEntry, MBoxEntry> Pair;
00050
00054 MBoxEntry();
00055
00061 explicit MBoxEntry( quint64 offset );
00062
00066 MBoxEntry( const MBoxEntry &other );
00067
00071 ~MBoxEntry();
00072
00076 MBoxEntry &operator=( const MBoxEntry &other );
00077
00081 bool operator==( const MBoxEntry &other ) const;
00082
00086 bool operator!=( const MBoxEntry &other ) const;
00087
00091 bool isValid() const;
00092
00097 quint64 messageOffset() const;
00098
00103 quint64 messageSize() const;
00104
00109 quint64 separatorSize() const;
00110
00111 private:
00112
00113 friend class MBox;
00114
00115 class Private;
00116 QSharedDataPointer<Private> d;
00117
00118 };
00119
00120 }
00121
00122 Q_DECLARE_TYPEINFO( KMBox::MBoxEntry, Q_MOVABLE_TYPE );
00123
00124 #endif // KMBOX_MBOXENTRY_H