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

tpsessionchannel.h

00001 /*
00002  * This file is part of TpSession
00003  *
00004  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
00005  * Contact Kate Alhola  kate.alholanokia.com
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with this library; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 #ifndef TPSESSIONCHANNEL_H
00022 #define TPSESSIONCHANNEL_H
00023 
00024 #include <QObject>
00025 #include <TelepathyQt4/Types>
00026 #include <TelepathyQt4/Types>
00027 #include <TelepathyQt4/Message>
00028 #include <TelepathyQt4/PendingChannel>
00029 #include <TelepathyQt4/ChannelRequest>
00030 #include <TelepathyQt4/Channel>
00031 #include <TelepathyQt4/TextChannel>
00032 #include <TelepathyQt4/PendingReady>
00033 #include <TelepathyQt4/ContactManager>
00034 #include <TelepathyQt4/Connection>
00035 
00036 class TpSessionChannel : public QObject
00037 {
00038   Q_OBJECT
00039 public:
00040     TpSessionChannel(Tp::TextChannelPtr);
00041     TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
00042     void sendMessage(QString message);
00043     QString peerId();
00044 signals:
00045   void channelReady(TpSessionChannel *);
00046   void channelDestroyed(TpSessionChannel *);
00047   void messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
00048   void messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
00049 public slots:
00050     void onChannelCreated(Tp::PendingOperation *op);
00051     void onChannelReady(Tp::PendingOperation *op);
00052     void onChannelDestroyed(QObject *);
00053     void onMessageReceived(const Tp::ReceivedMessage &);
00054     void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
00055 public:
00056     Tp::ContactPtr peerContact;
00057     Tp::TextChannelPtr channel;
00058 };
00059 
00060 #endif // TPSESSIONCHANNEL_H


Copyright © 2010 Nokia Corporation
TpSession