| 1 | /* |
| 2 | * This file is part of lomiri-online-accounts-service |
| 3 | * |
| 4 | * Copyright (C) 2011 Canonical Ltd. |
| 5 | * |
| 6 | * Contact: Alberto Mardegan <[email protected]> |
| 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License version 3, as published |
| 10 | * by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 15 | * PURPOSE. See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #ifndef SIGNON_UI_SERVICE_H |
| 22 | #define SIGNON_UI_SERVICE_H |
| 23 | |
| 24 | #include <QDBusContext> |
| 25 | #include <QObject> |
| 26 | #include <QVariantMap> |
| 27 | |
| 28 | class QByteArray; |
| 29 | |
| 30 | namespace SignOnUi { |
| 31 | |
| 32 | typedef QList<QByteArray> RawCookies; |
| 33 | |
| 34 | class ServicePrivate; |
| 35 | |
| 36 | class Service: public QObject, protected QDBusContext |
| 37 | { |
| 38 | Q_OBJECT |
| 39 | Q_CLASSINFO("D-Bus Interface", "com.nokia.singlesignonui") |
| 40 | |
| 41 | public: |
| 42 | explicit Service(QObject *parent = 0); |
| 43 | ~Service(); |
| 44 | |
| 45 | public Q_SLOTS: |
| 46 | QVariantMap queryDialog(const QVariantMap ¶meters); |
| 47 | QVariantMap refreshDialog(const QVariantMap &newParameters); |
| 48 | Q_NOREPLY void cancelUiRequest(const QString &requestId); |
| 49 | void removeIdentityData(quint32 id); |
| 50 | |
| 51 | /* |
| 52 | * This is not officially part of the interface; it's an Ubuntu-specific |
| 53 | * experimental method, and we reserve the right to remove or change it in |
| 54 | * future releases. |
| 55 | */ |
| 56 | void cookiesForIdentity(quint32 id, |
| 57 | // Output parameters |
| 58 | RawCookies &cookies, qint64 ×tamp); |
| 59 | |
| 60 | private: |
| 61 | ServicePrivate *d_ptr; |
| 62 | Q_DECLARE_PRIVATE(Service) |
| 63 | }; |
| 64 | |
| 65 | } // namespace |
| 66 | |
| 67 | Q_DECLARE_METATYPE(SignOnUi::RawCookies) |
| 68 | |
| 69 | #endif // SIGNON_UI_SERVICE_H |
| 70 |