signon 8.54

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

signonui_interface.cpp
Go to the documentation of this file.
1 /*
2 * This file is part of signon
3 *
4 * Copyright (C) 2009-2010 Nokia Corporation.
5 * Copyright (C) 2013 Canonical Ltd.
6 *
7 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * version 2.1 as published by the Free Software Foundation.
12 *
13 * This library is distributed in the hope that it will be useful, but
14 * 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
21 * 02110-1301 USA
22 */
23
24 #include "signonui_interface.h"
25 #include "signond-common.h"
26
27 #include "SignOn/uisessiondata_priv.h"
28
29 /*
30 * Implementation of interface class SignonUiAdaptor
31 */
32 SignonUiAdaptor::SignonUiAdaptor(const QString &service,
33 const QString &path,
34 const QDBusConnection &connection,
35 QObject *parent):
36 QDBusAbstractInterface(service, path, staticInterfaceName(),
37 connection, parent)
38 {
39 }
40
41 SignonUiAdaptor::~SignonUiAdaptor()
42 {
43 }
44
45 /*
46 * Open a new dialog
47 * */
48
49 QDBusPendingCall SignonUiAdaptor::queryDialog(const QVariantMap &parameters)
50 {
51 QList<QVariant> argumentList;
52 argumentList << parameters;
53 return callWithArgumentListAndBigTimeout(QLatin1String("queryDialog"),
54 argumentList);
55 }
56
57
58 /*
59 * update the existing dialog
60 * */
61 QDBusPendingCall SignonUiAdaptor::refreshDialog(const QVariantMap &parameters)
62 {
63 QList<QVariant> argumentList;
64 argumentList << parameters;
65 return callWithArgumentListAndBigTimeout(QLatin1String("refreshDialog"),
66 argumentList);
67 }
68
69
70 /*
71 * cancel dialog request
72 * */
73 void SignonUiAdaptor::cancelUiRequest(const QString &requestId)
74 {
75 QList<QVariant> argumentList;
76 argumentList << requestId;
77 callWithArgumentList(QDBus::NoBlock, QLatin1String("cancelUiRequest"),
78 argumentList);
79 }
80
81 /*
82 * Remove any data associated with the given identity.
83 * */
84 QDBusPendingCall SignonUiAdaptor::removeIdentityData(quint32 id)
85 {
86 QList<QVariant> argumentList;
87 argumentList << id;
88 return asyncCallWithArgumentList(QLatin1String("removeIdentityData"),
89 argumentList);
90 }
91
92 QDBusPendingCall
93 SignonUiAdaptor::callWithArgumentListAndBigTimeout(const QString &method,
94 const QList<QVariant> &args)
95 {
96 QDBusMessage msg = QDBusMessage::createMethodCall(service(),
97 path(),
98 interface(),
99 method);
100 if (!args.isEmpty())
101 msg.setArguments(args);
102 return connection().asyncCall(msg, SIGNOND_MAX_TIMEOUT);
103 }
SignonUiAdaptor::SignonUiAdaptor
SignonUiAdaptor(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent=0)
Definition: signonui_interface.cpp:32
SignonUiAdaptor::callWithArgumentListAndBigTimeout
QDBusPendingCall callWithArgumentListAndBigTimeout(const QString &method, const QList< QVariant > &args=QList< QVariant >())
Definition: signonui_interface.cpp:93
signond-common.h
SignonUiAdaptor::refreshDialog
QDBusPendingCall refreshDialog(const QVariantMap &parameters)
Definition: signonui_interface.cpp:61
SignonUiAdaptor::cancelUiRequest
void cancelUiRequest(const QString &requestId)
Definition: signonui_interface.cpp:73
SignonUiAdaptor::queryDialog
QDBusPendingCall queryDialog(const QVariantMap &parameters)
Definition: signonui_interface.cpp:49
SignonUiAdaptor::~SignonUiAdaptor
~SignonUiAdaptor()
Definition: signonui_interface.cpp:41
SignonUiAdaptor::removeIdentityData
QDBusPendingCall removeIdentityData(quint32 id)
Definition: signonui_interface.cpp:84
signonui_interface.h
QList
Definition: backupifadaptor.h:18