Home · All Classes · All Namespaces · Modules · Functions · Files
protocol-parameter.h
00001 
00023 #ifndef _TelepathyQt4_protocol_parameter_h_HEADER_GUARD_
00024 #define _TelepathyQt4_protocol_parameter_h_HEADER_GUARD_
00025 
00026 #ifndef IN_TELEPATHY_QT4_HEADER
00027 #error IN_TELEPATHY_QT4_HEADER
00028 #endif
00029 
00030 #include <TelepathyQt4/Constants>
00031 #include <TelepathyQt4/Global>
00032 
00033 #include <QDBusSignature>
00034 #include <QSharedDataPointer>
00035 #include <QString>
00036 #include <QVariant>
00037 
00038 namespace Tp
00039 {
00040 
00041 class TELEPATHY_QT4_EXPORT ProtocolParameter
00042 {
00043 public:
00044     ProtocolParameter();
00045     ProtocolParameter(const ProtocolParameter &other);
00046     ~ProtocolParameter();
00047 
00048     bool isValid() const { return mPriv.constData() != 0; }
00049 
00050     ProtocolParameter &operator=(const ProtocolParameter &other);
00051     bool operator==(const ProtocolParameter &other) const;
00052     bool operator==(const QString &name) const;
00053     bool operator<(const ProtocolParameter &other) const;
00054 
00055     QString name() const;
00056     QDBusSignature dbusSignature() const;
00057     QVariant::Type type() const;
00058     QVariant defaultValue() const;
00059 
00060     bool isRequired() const;
00061     bool isSecret() const;
00062     bool isRequiredForRegistration() const;
00063 
00064 private:
00065     friend class ConnectionManager;
00066     friend class ProtocolInfo;
00067 
00068     TELEPATHY_QT4_NO_EXPORT ProtocolParameter(const QString &name,
00069                       const QDBusSignature &dbusSignature,
00070                       QVariant defaultValue,
00071                       ConnMgrParamFlag flags);
00072 
00073     struct Private;
00074     friend struct Private;
00075     QSharedDataPointer<Private> mPriv;
00076 };
00077 
00078 typedef QList<ProtocolParameter> ProtocolParameterList;
00079 
00080 uint qHash(const ProtocolParameter &parameter);
00081 
00082 } // Tp
00083 
00084 Q_DECLARE_METATYPE(Tp::ProtocolParameter);
00085 Q_DECLARE_METATYPE(Tp::ProtocolParameterList);
00086 
00087 #endif


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5