MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

file-transfer-channel-creation-properties.h

00001 
00023 #ifndef _TelepathyQt4_file_transfer_channel_creation_properties_h_HEADER_GUARD_
00024 #define _TelepathyQt4_file_transfer_channel_creation_properties_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/Constants>
00031 #include <TelepathyQt4/Global>
00032 
00033 #include <QDateTime>
00034 #include <QMetaType>
00035 #include <QSharedDataPointer>
00036 #include <QString>
00037 
00038 namespace Tp
00039 {
00040 
00041 class TELEPATHY_QT4_EXPORT FileTransferChannelCreationProperties
00042 {
00043 public:
00044     FileTransferChannelCreationProperties();
00045     FileTransferChannelCreationProperties(const QString &suggestedFileName,
00046             const QString &contentType, qulonglong size);
00047     FileTransferChannelCreationProperties(const QString &path,
00048             const QString &contentType);
00049     FileTransferChannelCreationProperties(
00050             const FileTransferChannelCreationProperties &other);
00051     ~FileTransferChannelCreationProperties();
00052 
00053     bool isValid() const { return mPriv.constData() != 0; }
00054 
00055     FileTransferChannelCreationProperties &operator=(
00056             const FileTransferChannelCreationProperties &other);
00057     bool operator==(const FileTransferChannelCreationProperties &other) const;
00058 
00059     FileTransferChannelCreationProperties &setContentHash(
00060             FileHashType contentHashType, const QString &contentHash);
00061     FileTransferChannelCreationProperties &setDescription(
00062             const QString &description);
00063     FileTransferChannelCreationProperties &setLastModificationTime(
00064             const QDateTime &lastModificationTime);
00065     FileTransferChannelCreationProperties &setUri(const QString &uri);
00066 
00067     /* mandatory parameters */
00068     QString suggestedFileName() const;
00069     QString contentType() const;
00070     qulonglong size() const;
00071 
00072     /* optional parameters */
00073     bool hasContentHash() const;
00074     FileHashType contentHashType() const;
00075     QString contentHash() const;
00076 
00077     bool hasDescription() const;
00078     QString description() const;
00079 
00080     bool hasLastModificationTime() const;
00081     QDateTime lastModificationTime() const;
00082 
00083     bool hasUri() const;
00084     QString uri() const;
00085 
00086 private:
00087     struct Private;
00088     friend struct Private;
00089     QSharedDataPointer<Private> mPriv;
00090 };
00091 
00092 } // Tp
00093 
00094 Q_DECLARE_METATYPE(Tp::FileTransferChannelCreationProperties);
00095 
00096 #endif

Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5