protocol-parameter.h Source File

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

protocol-parameter.h
1
23 #ifndef _TelepathyQt_protocol_parameter_h_HEADER_GUARD_
24 #define _TelepathyQt_protocol_parameter_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 #include <TelepathyQt/Types>
33
34 #include <QDBusSignature>
35 #include <QSharedDataPointer>
36 #include <QString>
37 #include <QVariant>
38
39 namespace Tp
40 {
41
42 class TP_QT_EXPORT ProtocolParameter
43 {
44 public:
45 ProtocolParameter();
46 ProtocolParameter(const ParamSpec &spec);
47 ProtocolParameter(const QString &name,
48 const QDBusSignature &dbusSignature,
49 ConnMgrParamFlags flags,
50 QVariant defaultValue = QVariant());
51 ProtocolParameter(const QString &name,
52 const QString &dbusSignature,
53 ConnMgrParamFlags flags,
54 QVariant defaultValue = QVariant());
55 ProtocolParameter(const ProtocolParameter &other);
56 ~ProtocolParameter();
57
58 bool isValid() const { return mPriv.constData() != 0; }
59
60 ProtocolParameter &operator=(const ProtocolParameter &other);
61 bool operator==(const ProtocolParameter &other) const;
62 bool operator==(const QString &name) const;
63 bool operator<(const ProtocolParameter &other) const;
64
65 QString name() const;
66 QDBusSignature dbusSignature() const;
67 QVariant::Type type() const;
68 QVariant defaultValue() const;
69
70 bool isRequired() const;
71 bool isSecret() const;
72 bool isRequiredForRegistration() const;
73
74 ParamSpec bareParameter() const;
75
76 private:
77 friend class ConnectionManager;
78 friend class ProtocolInfo;
79
80 struct Private;
81 friend struct Private;
82 QSharedDataPointer<Private> mPriv;
83 };
84
85 typedef QList<ProtocolParameter> ProtocolParameterList;
86
87 uint qHash(const ProtocolParameter &parameter);
88
89 } // Tp
90
91 Q_DECLARE_METATYPE(Tp::ProtocolParameter);
92 Q_DECLARE_METATYPE(Tp::ProtocolParameterList);
93
94 #endif
Tp::operator==
bool operator==(const SUSocketAddress &v1, const SUSocketAddress &v2)
Definition: types.cpp:50
Tp::ProtocolParameterList
QList< ProtocolParameter > ProtocolParameterList
Definition: protocol-parameter.h:85
Tp::ConnMgrParamFlags
QFlags< ConnMgrParamFlag > ConnMgrParamFlags
Definition: build/TelepathyQt/_gen/constants.h:127
Tp::ProtocolInfo
The ProtocolInfo class represents a Telepathy Protocol.
Definition: protocol-info.h:46
Tp::ProtocolParameter
The ProtocolParameter class represents a Telepathy protocol parameter.
Definition: protocol-parameter.h:42
Tp::ConnectionManager
The ConnectionManager class represents a Telepathy connection manager.
Definition: connection-manager.h:52
Tp::ParamSpec
Definition: build/TelepathyQt/_gen/types.h:2186
Tp::ProtocolParameter::isValid
bool isValid() const
Definition: protocol-parameter.h:58
Tp::qHash
uint qHash(const ChannelClassSpec &spec)
Definition: channel-class-spec.h:283