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

protocol-info.h

    00001
    00023 #ifndef _TelepathyQt4_protocol_info_h_HEADER_GUARD_
    00024 #define _TelepathyQt4_protocol_info_h_HEADER_GUARD_
    00025
    00026 #ifndef IN_TELEPATHY_QT4_HEADER
    00027 #error IN_TELEPATHY_QT4_HEADER
    00028 #endif
    00029
    00030 #include <TelepathyQt4/AvatarSpec>
    00031 #include <TelepathyQt4/Global>
    00032 #include <TelepathyQt4/PresenceSpec>
    00033 #include <TelepathyQt4/ProtocolParameter>
    00034 #include <TelepathyQt4/Types>
    00035
    00036 #include <QSharedDataPointer>
    00037 #include <QString>
    00038 #include <QList>
    00039
    00040 namespace Tp
    00041 {
    00042
    00043 class ConnectionCapabilities;
    00044
    00045 class TELEPATHY_QT4_EXPORT ProtocolInfo
    00046 {
    00047 public:
    00048     ProtocolInfo();
    00049     ProtocolInfo(const ProtocolInfo &other);
    00050     ~ProtocolInfo();
    00051
    00052     bool isValid() const { return mPriv.constData() != 0; }
    00053
    00054     ProtocolInfo &operator=(const ProtocolInfo &other);
    00055
    00056     QString cmName() const;
    00057
    00058     QString name() const;
    00059
    00060     ProtocolParameterList parameters() const;
    00061     bool hasParameter(const QString &name) const;
    00062
    00063     bool canRegister() const;
    00064
    00065     ConnectionCapabilities capabilities() const;
    00066
    00067     QString vcardField() const;
    00068
    00069     QString englishName() const;
    00070
    00071     QString iconName() const;
    00072
    00073     PresenceSpecList allowedPresenceStatuses() const;
    00074
    00075     AvatarSpec avatarRequirements() const;
    00076
    00077 private:
    00078     friend class ConnectionManager;
    00079
    00080     TELEPATHY_QT4_NO_EXPORT ProtocolInfo(const QString &cmName, const QString &name);
    00081
    00082     TELEPATHY_QT4_NO_EXPORT void addParameter(const ParamSpec &spec);
    00083     TELEPATHY_QT4_NO_EXPORT void setVCardField(const QString &vcardField);
    00084     TELEPATHY_QT4_NO_EXPORT void setEnglishName(const QString &englishName);
    00085     TELEPATHY_QT4_NO_EXPORT void setIconName(const QString &iconName);
    00086     TELEPATHY_QT4_NO_EXPORT void setRequestableChannelClasses(const RequestableChannelClassList &caps);
    00087     TELEPATHY_QT4_NO_EXPORT void setAllowedPresenceStatuses(const PresenceSpecList &statuses);
    00088     TELEPATHY_QT4_NO_EXPORT void setAvatarRequirements(const AvatarSpec &avatarRequirements);
    00089
    00090     struct Private;
    00091     friend struct Private;
    00092     QSharedDataPointer<Private> mPriv;
    00093 };
    00094
    00095 typedef QList<ProtocolInfo> ProtocolInfoList;
    00096
    00097 } // Tp
    00098
    00099 Q_DECLARE_METATYPE(Tp::ProtocolInfo);
    00100 Q_DECLARE_METATYPE(Tp::ProtocolInfoList);
    00101
    00102 #endif