1 /**
2  * This file is part of TelepathyQt
3  *
4  * @copyright Copyright (C) 2010-2011 Collabora Ltd. <http://www.collabora.co.uk/>
5  * @license LGPL 2.1
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 
22 #ifndef _TelepathyQt_tube_channel_h_HEADER_GUARD_
23 #define _TelepathyQt_tube_channel_h_HEADER_GUARD_
24 
25 #ifndef IN_TP_QT_HEADER
26 #error IN_TP_QT_HEADER
27 #endif
28 
29 #include <TelepathyQt/Channel>
30 
31 namespace Tp
32 {
33 
34 class TP_QT_EXPORT TubeChannel : public Channel
35 {
36     Q_OBJECT
37     Q_DISABLE_COPY(TubeChannel)
38 
39 public:
40     static const Feature FeatureCore;
41 
42     static TubeChannelPtr create(const ConnectionPtr &connection,
43             const QString &objectPath, const QVariantMap &immutableProperties);
44 
45     virtual ~TubeChannel();
46 
47     TubeChannelState state() const;
48 
49     QVariantMap parameters() const;
50 
51 Q_SIGNALS:
52     void stateChanged(Tp::TubeChannelState state);
53 
54 protected:
55     TubeChannel(const ConnectionPtr &connection, const QString &objectPath,
56             const QVariantMap &immutableProperties,
57             const Feature &coreFeature = TubeChannel::FeatureCore);
58 
59     void setParameters(const QVariantMap &parameters);
60 
61 private Q_SLOTS:
62     TP_QT_NO_EXPORT void onTubeChannelStateChanged(uint newstate);
63     TP_QT_NO_EXPORT void gotTubeProperties(Tp::PendingOperation *op);
64 
65 private:
66     struct Private;
67     friend struct Private;
68     Private *mPriv;
69 };
70 
71 }
72 
73 #endif
74