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 
43 {
44 public:
46  FileTransferChannelCreationProperties(const QString &suggestedFileName,
47  const QString &contentType, qulonglong size);
48  FileTransferChannelCreationProperties(const QString &path,
49  const QString &contentType);
53 
54  bool isValid() const { return mPriv.constData() != 0; }
55 
58  bool operator==(const FileTransferChannelCreationProperties &other) const;
59 
61  FileHashType contentHashType, const QString &contentHash);
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 
100 
101 #endif
bool operator==(const SUSocketAddress &v1, const SUSocketAddress &v2)
Definition: types.cpp:50
The FileTransferChannelCreationProperties class represents the properties of a file transfer channel ...
Definition: file-transfer-channel-creation-properties.h:42
FileHashType
Definition: build/TelepathyQt/_gen/constants.h:2678
bool isValid() const
Definition: file-transfer-channel-creation-properties.h:54
Definition: abstract-adaptor.cpp:31


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.7