file-transfer-channel-creation-properties.h Source File

| 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
38 namespace Tp
39 {
40
41 class TP_QT_EXPORT FileTransferChannelCreationProperties
42 {
43 public:
44 FileTransferChannelCreationProperties();
45 FileTransferChannelCreationProperties(const QString &suggestedFileName,
46 const QString &contentType, qulonglong size);
47 FileTransferChannelCreationProperties(const QString &path,
48 const QString &contentType);
49 FileTransferChannelCreationProperties(
50 const FileTransferChannelCreationProperties &other);
51 ~FileTransferChannelCreationProperties();
52
53 bool isValid() const { return mPriv.constData() != 0; }
54
55 FileTransferChannelCreationProperties &operator=(
56 const FileTransferChannelCreationProperties &other);
57 bool operator==(const FileTransferChannelCreationProperties &other) const;
58
59 FileTransferChannelCreationProperties &setContentHash(
60 FileHashType contentHashType, const QString &contentHash);
61 FileTransferChannelCreationProperties &setDescription(
62 const QString &description);
63 FileTransferChannelCreationProperties &setLastModificationTime(
64 const QDateTime &lastModificationTime);
65 FileTransferChannelCreationProperties &setUri(const QString &uri);
66
67 /* mandatory parameters */
68 QString suggestedFileName() const;
69 QString contentType() const;
70 qulonglong size() const;
71
72 /* optional parameters */
73 bool hasContentHash() const;
74 FileHashType contentHashType() const;
75 QString contentHash() const;
76
77 bool hasDescription() const;
78 QString description() const;
79
80 bool hasLastModificationTime() const;
81 QDateTime lastModificationTime() const;
82
83 bool hasUri() const;
84 QString uri() const;
85
86 private:
87 struct Private;
88 friend struct Private;
89 QSharedDataPointer<Private> mPriv;
90 };
91
92 } // Tp
93
94 Q_DECLARE_METATYPE(Tp::FileTransferChannelCreationProperties);
95
96 #endif
Tp::operator==
bool operator==(const SUSocketAddress &v1, const SUSocketAddress &v2)
Definition: types.cpp:50
Tp::FileHashType
FileHashType
Definition: build/TelepathyQt/_gen/constants.h:2678
Tp::FileTransferChannelCreationProperties::isValid
bool isValid() const
Definition: file-transfer-channel-creation-properties.h:53
Tp::FileTransferChannelCreationProperties
The FileTransferChannelCreationProperties class represents the properties of a file transfer channel ...
Definition: file-transfer-channel-creation-properties.h:41