qtmobility/src/versit/qversitdocument.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    45 #include "qmobilityglobal.h"
    45 #include "qmobilityglobal.h"
    46 
    46 
    47 #include <QList>
    47 #include <QList>
    48 #include <QSharedDataPointer>
    48 #include <QSharedDataPointer>
    49 #include <QVariant>
    49 #include <QVariant>
       
    50 #include <QDebug>
    50 
    51 
    51 QT_BEGIN_NAMESPACE
    52 QT_BEGIN_NAMESPACE
    52 class QTextCodec;
    53 class QTextCodec;
    53 QT_END_NAMESPACE
    54 QT_END_NAMESPACE
    54 
    55 
    58 class QVersitProperty;
    59 class QVersitProperty;
    59 
    60 
    60 class Q_VERSIT_EXPORT QVersitDocument
    61 class Q_VERSIT_EXPORT QVersitDocument
    61 {
    62 {
    62 public:
    63 public:
       
    64     enum VersitType {
       
    65         InvalidType,
       
    66         VCard21Type,   // vCard version 2.1
       
    67         VCard30Type    // vCard version 3.0 (RFC 2426)
       
    68     };
       
    69 
    63     QVersitDocument();
    70     QVersitDocument();
    64     QVersitDocument(const QVersitDocument& other);
    71     QVersitDocument(const QVersitDocument& other);
       
    72     QVersitDocument(VersitType type);
    65     ~QVersitDocument();
    73     ~QVersitDocument();
    66 
    74 
    67     QVersitDocument& operator=(const QVersitDocument& other);
    75     QVersitDocument& operator=(const QVersitDocument& other);
    68     bool operator==(const QVersitDocument& other) const;
    76     bool operator==(const QVersitDocument& other) const;
    69     bool operator!=(const QVersitDocument& other) const;
    77     bool operator!=(const QVersitDocument& other) const;
    70 
       
    71     /*! Versit document type */
       
    72     enum VersitType {
       
    73         InvalidType,
       
    74         VCard21Type,   // vCard version 2.1
       
    75         VCard30Type    // vCard version 3.0 (RFC 2426)
       
    76     };
       
    77 
    78 
    78     // metadata about the versit document itself.
    79     // metadata about the versit document itself.
    79     void setType(VersitType type);
    80     void setType(VersitType type);
    80     VersitType type() const;
    81     VersitType type() const;
    81 
    82 
    90 private:
    91 private:
    91 
    92 
    92     QSharedDataPointer<QVersitDocumentPrivate> d;
    93     QSharedDataPointer<QVersitDocumentPrivate> d;
    93 };
    94 };
    94 
    95 
       
    96 Q_VERSIT_EXPORT uint qHash(const QVersitDocument& key);
       
    97 #ifndef QT_NO_DEBUG_STREAM
       
    98 Q_VERSIT_EXPORT QDebug operator<<(QDebug dbg, const QVersitDocument& property);
       
    99 #endif
       
   100 
    95 QTM_END_NAMESPACE
   101 QTM_END_NAMESPACE
    96 
   102 
    97 Q_DECLARE_METATYPE(QTM_PREPEND_NAMESPACE(QVersitDocument))
   103 Q_DECLARE_METATYPE(QTM_PREPEND_NAMESPACE(QVersitDocument))
    98 
   104 
    99 #endif // QVERSITDOCUMENT_H
   105 #endif // QVERSITDOCUMENT_H