Home · All Classes · All Namespaces · Modules · Functions · Files |
00001 00023 #ifndef _TelepathyQt_protocol_parameter_h_HEADER_GUARD_ 00024 #define _TelepathyQt_protocol_parameter_h_HEADER_GUARD_ 00025 00026 #ifndef IN_TP_QT_HEADER 00027 #error IN_TP_QT_HEADER 00028 #endif 00029 00030 #include <TelepathyQt/Constants> 00031 #include <TelepathyQt/Global> 00032 #include <TelepathyQt/Types> 00033 00034 #include <QDBusSignature> 00035 #include <QSharedDataPointer> 00036 #include <QString> 00037 #include <QVariant> 00038 00039 namespace Tp 00040 { 00041 00042 class TP_QT_EXPORT ProtocolParameter 00043 { 00044 public: 00045 ProtocolParameter(); 00046 ProtocolParameter(const ParamSpec &spec); 00047 ProtocolParameter(const QString &name, 00048 const QDBusSignature &dbusSignature, 00049 ConnMgrParamFlags flags, 00050 QVariant defaultValue = QVariant()); 00051 ProtocolParameter(const QString &name, 00052 const QString &dbusSignature, 00053 ConnMgrParamFlags flags, 00054 QVariant defaultValue = QVariant()); 00055 ProtocolParameter(const ProtocolParameter &other); 00056 ~ProtocolParameter(); 00057 00058 bool isValid() const { return mPriv.constData() != 0; } 00059 00060 ProtocolParameter &operator=(const ProtocolParameter &other); 00061 bool operator==(const ProtocolParameter &other) const; 00062 bool operator==(const QString &name) const; 00063 bool operator<(const ProtocolParameter &other) const; 00064 00065 QString name() const; 00066 QDBusSignature dbusSignature() const; 00067 QVariant::Type type() const; 00068 QVariant defaultValue() const; 00069 00070 bool isRequired() const; 00071 bool isSecret() const; 00072 bool isRequiredForRegistration() const; 00073 00074 ParamSpec bareParameter() const; 00075 00076 private: 00077 friend class ConnectionManager; 00078 friend class ProtocolInfo; 00079 00080 struct Private; 00081 friend struct Private; 00082 QSharedDataPointer<Private> mPriv; 00083 }; 00084 00085 typedef QList<ProtocolParameter> ProtocolParameterList; 00086 00087 uint qHash(const ProtocolParameter ¶meter); 00088 00089 } // Tp 00090 00091 Q_DECLARE_METATYPE(Tp::ProtocolParameter); 00092 Q_DECLARE_METATYPE(Tp::ProtocolParameterList); 00093 00094 #endif
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.3 |