| Home · All Classes · All Namespaces · Modules · Functions · Files

file-transfer-channel-creation-properties.h
1
23 #ifndef _TelepathyQt_file_transfer_channel_creation_properties_h_HEADER_GUARD_
24 #define _TelepathyQt_file_transfer_channel_creation_properties_h_HEADER_GUARD_
25
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29
30 #include <TelepathyQt/Constants>
31 #include <TelepathyQt/Global>
32
33 #include <QDateTime>
34 #include <QMetaType>
35 #include <QSharedDataPointer>
36 #include <QString>
37 #include <QVariantMap>
38
39 namespace Tp
40 {
41
42 class TP_QT_EXPORT FileTransferChannelCreationProperties
43 {
44 public:
45 FileTransferChannelCreationProperties();
46 FileTransferChannelCreationProperties(const QString &suggestedFileName,
47 const QString &contentType, qulonglong size);
48 FileTransferChannelCreationProperties(const QString &path,
49 const QString &contentType);
50 FileTransferChannelCreationProperties(
51 const FileTransferChannelCreationProperties &other);
52 ~FileTransferChannelCreationProperties();
53
54 bool isValid() const { return mPriv.constData() != 0; }
55
56 FileTransferChannelCreationProperties &operator=(
57 const FileTransferChannelCreationProperties &other);
58 bool operator==(const FileTransferChannelCreationProperties &other) const;
59
60 FileTransferChannelCreationProperties &setContentHash(
61 FileHashType contentHashType, const QString &contentHash);
62 FileTransferChannelCreationProperties &setDescription(
63 const QString &description);
64 FileTransferChannelCreationProperties &setLastModificationTime(
65 const QDateTime &lastModificationTime);
66 FileTransferChannelCreationProperties &setUri(const QString &uri);
67
68 /* mandatory parameters */
69 QString suggestedFileName() const;
70 QString contentType() const;
71 qulonglong size() const;
72
73 /* optional parameters */
74 bool hasContentHash() const;
75 FileHashType contentHashType() const;
76 QString contentHash() const;
77
78 bool hasDescription() const;
79 QString description() const;
80
81 bool hasLastModificationTime() const;
82 QDateTime lastModificationTime() const;
83
84 bool hasUri() const;
85 QString uri() const;
86
87 QVariantMap createRequest() const;
88 QVariantMap createRequest(const QString &contactIdentifier) const;
89 QVariantMap createRequest(uint handle) const;
90
91 private:
92 struct Private;
93 friend struct Private;
94 QSharedDataPointer<Private> mPriv;
95 };
96
97 } // Tp
98
99 Q_DECLARE_METATYPE(Tp::FileTransferChannelCreationProperties);
100
101 #endif
Tp::FileTransferChannelCreationProperties::isValid
bool isValid() const
Definition: file-transfer-channel-creation-properties.h:54
QString
Tp::FileHashType
FileHashType
Definition: obj-x86_64-linux-gnu/TelepathyQt/_gen/constants.h:2678
Tp::FileTransferChannelCreationProperties
The FileTransferChannelCreationProperties class represents the properties of a file transfer channel ...
Definition: file-transfer-channel-creation-properties.h:42
Tp::operator==
bool operator==(const SUSocketAddress &v1, const SUSocketAddress &v2)
Definition: types.cpp:50
QSharedDataPointer< Private >
QDateTime
Tp
Definition: abstract-adaptor.cpp:31