2
* This file is part of buteo-sync-plugins-contacts package
4
* Copyright (C) 2013 Jolla Ltd. and/or its subsidiary(-ies).
7
* Contributors: Sateesh Kavuri <sateesh.kavuri@gmail.com>
8
* Mani Chandrasekar <maninc@gmail.com>
9
* Renato Araujo Oliveira Filho <renato.filho@canonical.com>
11
* This library is free software; you can redistribute it and/or
12
* modify it under the terms of the GNU Lesser General Public License
13
* version 2.1 as published by the Free Software Foundation.
15
* This library is distributed in the hope that it will be useful, but
16
* WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
* Lesser General Public License for more details.
20
* You should have received a copy of the GNU Lesser General Public
21
* License along with this library; if not, write to the Free Software
22
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
31
#include <QScopedPointer>
33
#include <SignOn/AuthService>
34
#include <SignOn/Identity>
36
#include <Accounts/Account>
37
#include <Accounts/Manager>
41
class UAuth : public QObject
44
Q_DECLARE_PRIVATE(UAuth)
46
explicit UAuth(QObject *parent = 0);
49
virtual bool authenticate();
50
virtual bool init(const quint32 accountId, const QString serviceName);
52
inline QString accountDisplayName() const { return mDisplayName; }
53
inline QString token() const { return mToken; }
64
QScopedPointer<UAuthPrivate> d_ptr;
67
void credentialsStored(const quint32);
68
void error(const SignOn::Error &);
69
void sessionResponse(const SignOn::SessionData &);