Vers 0.1.3, extra qDebug printouts commented out
[tpsession] / tpsession-0.1 / debian / tmp / usr / include / telepathy-1.0 / tpsession / tpsessionchannel.h
1 /*
2  * This file is part of TpSession
3  *
4  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
5  * Contact Kate Alhola  kate.alholanokia.com
6  *
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.
11  *
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.
16  *
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
20  */
21 #ifndef TPSESSIONCHANNEL_H
22 #define TPSESSIONCHANNEL_H
23
24 #include <QObject>
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>
35
36 class TpSessionChannel : public QObject
37 {
38   Q_OBJECT
39 public:
40     TpSessionChannel(Tp::TextChannelPtr);
41     TpSessionChannel(Tp::ConnectionPtr conn,const Tp::ContactPtr &contact);
42     void sendMessage(QString message);
43     QString peerId();
44 signals:
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 *);
49 public slots:
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 &);
55 public:
56     Tp::ContactPtr peerContact;
57     Tp::TextChannelPtr channel;
58 };
59
60 #endif // TPSESSIONCHANNEL_H