2 * This file is part of TpSession
4 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
5 * Contact Kate Alhola kate.alholanokia.com
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #ifndef TPSESSIONCHANNEL_H
22 #define TPSESSIONCHANNEL_H
25 #include <TelepathyQt4/Types>
26 #include <TelepathyQt4/Types>
27 #include <TelepathyQt4/Message>
28 #include <TelepathyQt4/PendingChannel>
29 #include <TelepathyQt4/ChannelRequest>
30 #include <TelepathyQt4/Channel>
31 #include <TelepathyQt4/TextChannel>
32 #include <TelepathyQt4/PendingReady>
33 #include <TelepathyQt4/ContactManager>
34 #include <TelepathyQt4/Connection>
36 class TpSessionChannel;
38 #include "tpsession.h"
40 class TpSessionChannel : public QObject
44 TpSessionChannel(Tp::TextChannelPtr);
45 TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
46 void sendMessage(QString message);
51 void channelReady(TpSessionChannel *);
52 void channelDestroyed(TpSessionChannel *);
53 void messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
54 void messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
56 void onChannelCreated(Tp::PendingOperation *op);
57 void onChannelReady(Tp::PendingOperation *op);
58 void onChannelDestroyed();
59 void onMessageReceived(const Tp::ReceivedMessage &);
60 void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
62 Tp::ContactPtr peerContact;
63 Tp::TextChannelPtr channel;
66 #endif // TPSESSIONCHANNEL_H