~mardy/ubuntu-system-settings-online-accounts/master

« back to all changes in this revision

Viewing changes to online-accounts-service/ui-proxy.h

  • Committer: Alberto Mardegan
  • Date: 2014-08-13 14:44:09 UTC
  • mfrom: (129.1.7 headless-service)
  • Revision ID: alberto.mardegan@canonical.com-20140813144409-c88fg9u922le83cx
Move the UI into a separate process

Introduce online-accounts-service as a UI-less DBus service which acts as a
dispatcher for authentication and authorization requests; the requests
themselves are processed by a subprocess, online-accounts-ui, of which multiple
instances can exists (each instance having single window).

This is the first step towards implementing trust session support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2014 Canonical Ltd.
 
3
 *
 
4
 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
 
5
 *
 
6
 * This file is part of online-accounts-ui
 
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 OAU_UI_PROXY_H
 
22
#define OAU_UI_PROXY_H
 
23
 
 
24
#include <QObject>
 
25
#include <QVariantMap>
 
26
 
 
27
namespace OnlineAccountsUi {
 
28
 
 
29
class Request;
 
30
 
 
31
class UiProxyPrivate;
 
32
class UiProxy: public QObject
 
33
{
 
34
    Q_OBJECT
 
35
 
 
36
public:
 
37
    explicit UiProxy(QObject *parent = 0);
 
38
    ~UiProxy();
 
39
 
 
40
    bool init();
 
41
    void handleRequest(Request *request);
 
42
    bool hasHandlerFor(const QVariantMap &parameters);
 
43
 
 
44
Q_SIGNALS:
 
45
    void finished();
 
46
 
 
47
private:
 
48
    UiProxyPrivate *d_ptr;
 
49
    Q_DECLARE_PRIVATE(UiProxy)
 
50
};
 
51
 
 
52
} // namespace
 
53
 
 
54
#endif // OAU_UI_PROXY_H