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 : public QObject
40 TpSessionChannel(Tp::TextChannelPtr);
41 TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
42 void sendMessage(QString message);
45 void channelReady(TpSessionChannel *);
46 void channelDestroyed(TpSessionChannel *);
47 void messageReceived(const Tp::ReceivedMessage &,TpSessionChannel *);
48 void messageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &,TpSessionChannel *);
50 void onChannelCreated(Tp::PendingOperation *op);
51 void onChannelReady(Tp::PendingOperation *op);
52 void onChannelDestroyed(QObject *);
53 void onMessageReceived(const Tp::ReceivedMessage &);
54 void onMessageSent(const Tp::Message &,Tp::MessageSendingFlags, const QString &);
56 Tp::ContactPtr peerContact;
57 Tp::TextChannelPtr channel;
60 #endif // TPSESSIONCHANNEL_H