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

outgoing-stream-tube-channel.h

00001 
00022 #ifndef _TelepathyQt4_outgoing_stream_tube_channel_h_HEADER_GUARD_
00023 #define _TelepathyQt4_outgoing_stream_tube_channel_h_HEADER_GUARD_
00024 
00025 #ifndef IN_TELEPATHY_QT4_HEADER
00026 #error IN_TELEPATHY_QT4_HEADER
00027 #endif
00028 
00029 #include <TelepathyQt4/StreamTubeChannel>
00030 #include <TelepathyQt4/PendingOperation>
00031 
00032 class QHostAddress;
00033 class QTcpServer;
00034 class QLocalServer;
00035 
00036 namespace Tp
00037 {
00038 
00039 class TELEPATHY_QT4_EXPORT OutgoingStreamTubeChannel : public StreamTubeChannel
00040 {
00041     Q_OBJECT
00042     Q_DISABLE_COPY(OutgoingStreamTubeChannel)
00043 
00044 public:
00045     static OutgoingStreamTubeChannelPtr create(const ConnectionPtr &connection,
00046             const QString &objectPath, const QVariantMap &immutableProperties);
00047 
00048     virtual ~OutgoingStreamTubeChannel();
00049 
00050     PendingOperation *offerTcpSocket(const QHostAddress &address, quint16 port, const QVariantMap &parameters);
00051     PendingOperation *offerTcpSocket(const QTcpServer *server, const QVariantMap &parameters);
00052 
00053     PendingOperation *offerUnixSocket(const QString &socketAddress, const QVariantMap &parameters,
00054             bool requireCredentials = false);
00055     PendingOperation *offerUnixSocket(const QLocalServer *server, const QVariantMap &parameters,
00056             bool requireCredentials = false);
00057 
00058     QHash<uint, Tp::ContactPtr> contactsForConnections() const;
00059 
00060     QHash<QPair<QHostAddress,quint16>,uint> connectionsForSourceAddresses() const;
00061 
00062 protected:
00063     OutgoingStreamTubeChannel(const ConnectionPtr &connection, const QString &objectPath,
00064             const QVariantMap &immutableProperties,
00065             const Feature &coreFeature = StreamTubeChannel::FeatureStreamTube);
00066 
00067 private Q_SLOTS:
00068     TELEPATHY_QT4_NO_EXPORT void onNewRemoteConnection(uint contactId, const QDBusVariant &paramenter, uint connectionId);
00069     TELEPATHY_QT4_NO_EXPORT void onContactsRetrieved(const QUuid &uuid, const QList<Tp::ContactPtr> &contacts);
00070     TELEPATHY_QT4_NO_EXPORT void onConnectionClosed(uint connectionId, const QString &, const QString &);
00071 
00072 private:
00073     struct Private;
00074     friend struct PendingOpenTube;
00075     friend struct Private;
00076     Private *mPriv;
00077 };
00078 
00079 }
00080 
00081 #endif


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