~tiagosh/telepathy-qt/group-chat2

« back to all changes in this revision

Viewing changes to TelepathyQt/server-authentication-channel.h

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo
  • Date: 2013-06-06 04:56:14 UTC
  • Revision ID: package-import@ubuntu.com-20130606045614-inpxexo6765rnmp1
Tags: upstream-0.9.3
ImportĀ upstreamĀ versionĀ 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * This file is part of TelepathyQt
 
3
 *
 
4
 * @copyright Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
 
5
 * @copyright Copyright (C) 2012 Nokia Corporation
 
6
 * @license LGPL 2.1
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2.1 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library; if not, write to the Free Software
 
20
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
21
 */
 
22
 
 
23
#ifndef _TelepathyQt_server_authentication_channel_h_HEADER_GUARD_
 
24
#define _TelepathyQt_server_authentication_channel_h_HEADER_GUARD_
 
25
 
 
26
#ifndef IN_TP_QT_HEADER
 
27
#error IN_TP_QT_HEADER
 
28
#endif
 
29
 
 
30
#include <TelepathyQt/Channel>
 
31
 
 
32
namespace Tp
 
33
{
 
34
 
 
35
class TP_QT_EXPORT ServerAuthenticationChannel : public Channel
 
36
{
 
37
    Q_OBJECT
 
38
    Q_DISABLE_COPY(ServerAuthenticationChannel)
 
39
 
 
40
public:
 
41
    static const Feature FeatureCore;
 
42
 
 
43
    static ServerAuthenticationChannelPtr create(const ConnectionPtr &connection,
 
44
            const QString &objectPath, const QVariantMap &immutableProperties);
 
45
 
 
46
    virtual ~ServerAuthenticationChannel();
 
47
 
 
48
    CaptchaAuthenticationPtr captchaAuthentication() const;
 
49
 
 
50
    // TODO: Add something for SASL here as well
 
51
 
 
52
    bool hasCaptchaInterface() const;
 
53
    // TODO: Enable when SASL high-level support is in
 
54
    // bool hasSaslInterface() const;
 
55
 
 
56
protected:
 
57
    ServerAuthenticationChannel(const ConnectionPtr &connection, const QString &objectPath,
 
58
            const QVariantMap &immutableProperties,
 
59
            const Feature &coreFeature = ServerAuthenticationChannel::FeatureCore);
 
60
 
 
61
private Q_SLOTS:
 
62
    TP_QT_NO_EXPORT void gotCaptchaAuthenticationProperties(Tp::PendingOperation *op);
 
63
    TP_QT_NO_EXPORT void gotServerAuthenticationProperties(Tp::PendingOperation *op);
 
64
 
 
65
private:
 
66
    struct Private;
 
67
    friend struct Private;
 
68
    Private *mPriv;
 
69
};
 
70
 
 
71
}
 
72
 
 
73
#endif