MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9
   Home · All Classes · All Namespaces · Modules · Functions · Files

connection-lowlevel.h

00001 
00023 #ifndef _TelepathyQt4_connection_lowlevel_h_HEADER_GUARD_
00024 #define _TelepathyQt4_connection_lowlevel_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/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 TELEPATHY_QT4_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     TELEPATHY_QT4_NO_EXPORT ConnectionLowlevel(Connection *parent);
00083 
00084     TELEPATHY_QT4_NO_EXPORT bool hasImmortalHandles() const;
00085 
00086     TELEPATHY_QT4_NO_EXPORT bool hasContactId(uint handle) const;
00087     TELEPATHY_QT4_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

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