11
by Andre Moreira Magalhaes (andrunko)
Refactor |
1 |
/*
|
2 |
* Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
|
|
3 |
* @author Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
|
|
4 |
* Copyright (C) 2011 David Edmundson <kde@davidedmundson.co.uk>
|
|
5 |
*
|
|
6 |
* This library is free software; you can redistribute it and/or
|
|
7 |
* modify it under the terms of the GNU Lesser General Public
|
|
8 |
* License as published by the Free Software Foundation; either
|
|
9 |
* version 2.1 of the License, or (at your option) any later version.
|
|
10 |
*
|
|
11 |
* This library is distributed in the hope that it will be useful,
|
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 |
* Lesser General Public License for more details.
|
|
15 |
*
|
|
16 |
* You should have received a copy of the GNU Lesser General Public
|
|
17 |
* License along with this library; if not, write to the Free Software
|
|
18 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
19 |
*/
|
|
20 |
||
21 |
#ifndef SASLHANDLER_H
|
|
22 |
#define SASLHANDLER_H
|
|
23 |
||
24 |
#include <QObject> |
|
25 |
||
41.1.2
by Dario Freddi
port-to-0.9: Rename relevant include paths and variables |
26 |
#include <TelepathyQt/AbstractClientHandler> |
11
by Andre Moreira Magalhaes (andrunko)
Refactor |
27 |
|
28 |
namespace Tp |
|
29 |
{
|
|
30 |
class PendingOperation; |
|
31 |
};
|
|
32 |
||
33 |
class SaslAuthOp; |
|
34 |
||
35 |
class SaslHandler : public QObject, public Tp::AbstractClientHandler |
|
36 |
{
|
|
37 |
Q_OBJECT
|
|
38 |
||
39 |
public: |
|
71
by David Edmundson
Move channel filters out of main and with the relevant handler |
40 |
explicit SaslHandler(); |
11
by Andre Moreira Magalhaes (andrunko)
Refactor |
41 |
~SaslHandler(); |
42 |
||
43 |
bool bypassApproval() const; |
|
44 |
||
45 |
void handleChannels(const Tp::MethodInvocationContextPtr<> &context, |
|
46 |
const Tp::AccountPtr &account, |
|
47 |
const Tp::ConnectionPtr &connection, |
|
48 |
const QList<Tp::ChannelPtr> &channels, |
|
49 |
const QList<Tp::ChannelRequestPtr> &requestsSatisfied, |
|
50 |
const QDateTime &userActionTime, |
|
51 |
const Tp::AbstractClientHandler::HandlerInfo &handlerInfo); |
|
52 |
||
53 |
private Q_SLOTS: |
|
54 |
void onAuthReady(Tp::PendingOperation *op); |
|
55 |
void onAuthFinished(Tp::PendingOperation *op); |
|
56 |
||
57 |
private: |
|
58 |
QHash<Tp::PendingOperation *, Tp::MethodInvocationContextPtr<> > mAuthContexts; |
|
59 |
};
|
|
60 |
||
61 |
#endif
|