Home · All Classes · All Namespaces · Modules · Functions · Files
protocol-info.h
1 
23 #ifndef _TelepathyQt_protocol_info_h_HEADER_GUARD_
24 #define _TelepathyQt_protocol_info_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 #include <TelepathyQt/AvatarSpec>
31 #include <TelepathyQt/Global>
32 #include <TelepathyQt/PresenceSpec>
33 #include <TelepathyQt/ProtocolParameter>
34 #include <TelepathyQt/Types>
35 
36 #include <QSharedDataPointer>
37 #include <QString>
38 #include <QList>
39 
40 namespace Tp
41 {
42 
43 class ConnectionCapabilities;
44 class PendingString;
45 
46 class TP_QT_EXPORT ProtocolInfo
47 {
48 public:
49  ProtocolInfo();
50  ProtocolInfo(const ProtocolInfo &other);
51  ~ProtocolInfo();
52 
53  bool isValid() const { return mPriv.constData() != 0; }
54 
55  ProtocolInfo &operator=(const ProtocolInfo &other);
56 
57  QString cmName() const;
58 
59  QString name() const;
60 
61  ProtocolParameterList parameters() const;
62  bool hasParameter(const QString &name) const;
63 
64  bool canRegister() const;
65 
66  ConnectionCapabilities capabilities() const;
67 
68  QString vcardField() const;
69 
70  QString englishName() const;
71 
72  QString iconName() const;
73 
74  PresenceSpecList allowedPresenceStatuses() const;
75 
76  AvatarSpec avatarRequirements() const;
77 
78  QStringList addressableVCardFields() const;
79  QStringList addressableUriSchemes() const;
80 
81  PendingString *normalizeVCardAddress(const QString &vcardField, const QString &vcardAddress);
82  PendingString *normalizeContactUri(const QString &uri);
83 
84 private:
85  friend class ConnectionManager;
86 
87  TP_QT_NO_EXPORT ProtocolInfo(const ConnectionManagerPtr &cm, const QString &name);
88 
89  TP_QT_NO_EXPORT void addParameter(const ParamSpec &spec);
90  TP_QT_NO_EXPORT void setVCardField(const QString &vcardField);
91  TP_QT_NO_EXPORT void setEnglishName(const QString &englishName);
92  TP_QT_NO_EXPORT void setIconName(const QString &iconName);
93  TP_QT_NO_EXPORT void setRequestableChannelClasses(const RequestableChannelClassList &caps);
94  TP_QT_NO_EXPORT void setAllowedPresenceStatuses(const PresenceSpecList &statuses);
95  TP_QT_NO_EXPORT void setAvatarRequirements(const AvatarSpec &avatarRequirements);
96  TP_QT_NO_EXPORT void setAddressableVCardFields(const QStringList &vcardFields);
97  TP_QT_NO_EXPORT void setAddressableUriSchemes(const QStringList &uriSchemes);
98 
99  struct Private;
100  friend struct Private;
101  QSharedDataPointer<Private> mPriv;
102 };
103 
104 typedef QList<ProtocolInfo> ProtocolInfoList;
105 
106 } // Tp
107 
108 Q_DECLARE_METATYPE(Tp::ProtocolInfo);
109 Q_DECLARE_METATYPE(Tp::ProtocolInfoList);
110 
111 #endif
The PendingString class is a generic subclass of PendingOperation representing a pending D-Bus method...
Definition: pending-string.h:37
The ConnectionCapabilities class represents the capabilities of a Connection.
Definition: connection-capabilities.h:38
The AvatarSpec class represents a Telepathy avatar information supported by a protocol.
Definition: avatar.h:51
QList< ProtocolParameter > ProtocolParameterList
Definition: protocol-parameter.h:85
The ProtocolInfo class represents a Telepathy Protocol.
Definition: protocol-info.h:46
Definition: build/TelepathyQt/_gen/types.h:2195
bool isValid() const
Definition: protocol-info.h:53
The PresenceSpecList class represents a list of PresenceSpec.
Definition: presence.h:125
QList< RequestableChannelClass > RequestableChannelClassList
Definition: build/TelepathyQt/_gen/types.h:2630
The ConnectionManager class represents a Telepathy connection manager.
Definition: connection-manager.h:52
Definition: abstract-adaptor.cpp:31
QList< ProtocolInfo > ProtocolInfoList
Definition: protocol-info.h:104


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