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

connection-lowlevel.h

    00001
    00023 #ifndef _TelepathyQt_connection_lowlevel_h_HEADER_GUARD_
    00024 #define _TelepathyQt_connection_lowlevel_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/Types>
    00032
    00033 namespace Tp
    00034 {
    00035
    00036 class Connection;
    00037 class PendingChannel;
    00038 class PendingContactAttributes;
    00039 class PendingHandles;
    00040 class PendingOperation;
    00041 class PendingReady;
    00042
    00043 class TP_QT_EXPORT ConnectionLowlevel : public QObject, public RefCounted
    00044 {
    00045     Q_OBJECT
    00046     Q_DISABLE_COPY(ConnectionLowlevel)
    00047
    00048 public:
    00049     ~ConnectionLowlevel();
    00050
    00051     bool isValid() const;
    00052     ConnectionPtr connection() const;
    00053
    00054     PendingReady *requestConnect(const Features &requestedFeatures = Features());
    00055     PendingOperation *requestDisconnect();
    00056
    00057     SimpleStatusSpecMap allowedPresenceStatuses() const;
    00058     uint maxPresenceStatusMessageLength() const;
    00059
    00060     PendingOperation *setSelfPresence(const QString &status, const QString &statusMessage);
    00061
    00062     PendingChannel *createChannel(const QVariantMap &request);
    00063     PendingChannel *createChannel(const QVariantMap &request, int timeout);
    00064     PendingChannel *ensureChannel(const QVariantMap &request);
    00065     PendingChannel *ensureChannel(const QVariantMap &request, int timeout);
    00066
    00067     PendingHandles *requestHandles(HandleType handleType, const QStringList &names);
    00068     PendingHandles *referenceHandles(HandleType handleType, const UIntList &handles);
    00069
    00070     PendingContactAttributes *contactAttributes(const UIntList &handles,
    00071             const QStringList &interfaces, bool reference = true);
    00072     QStringList contactAttributeInterfaces() const;
    00073
    00074     void injectContactIds(const HandleIdentifierMap &contactIds);
    00075     void injectContactId(uint handle, const QString &contactId);
    00076
    00077 private:
    00078     friend class Connection;
    00079     friend class ContactManager;
    00080     friend class PendingContacts;
    00081
    00082     TP_QT_NO_EXPORT ConnectionLowlevel(Connection *parent);
    00083
    00084     TP_QT_NO_EXPORT bool hasImmortalHandles() const;
    00085
    00086     TP_QT_NO_EXPORT bool hasContactId(uint handle) const;
    00087     TP_QT_NO_EXPORT QString contactId(uint handle) const;
    00088
    00089     struct Private;
    00090     friend struct Private;
    00091     Private *mPriv;
    00092 };
    00093
    00094 } // Tp
    00095
    00096 #endif