Debian Codegraph @

online-accounts-service/src/request-manager.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2014 Canonical Ltd.
3 *
4 * Contact: Alberto Mardegan <[email protected]>
5 *
6 * This file is part of lomiri-online-accounts-service
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_REQUEST_MANAGER_H
22 #define OAU_REQUEST_MANAGER_H
23
24 #include <QObject>
25 #include <QVariantMap>
26
27 namespace OnlineAccountsUi {
28
29 class Request;
30 class UiProxy;
31
32 class RequestManagerPrivate;
33 class RequestManager: public QObject
34 {
35 Q_OBJECT
36 Q_PROPERTY(bool isIdle READ isIdle NOTIFY isIdleChanged)
37
38 public:
39 explicit RequestManager(QObject *parent = 0);
40 ~RequestManager();
41
42 static RequestManager *instance();
43
44 void enqueue(Request *request);
45
46 bool isIdle() const;
47
48 Q_SIGNALS:
49 void isIdleChanged();
50
51 private:
52 RequestManagerPrivate *d_ptr;
53 Q_DECLARE_PRIVATE(RequestManager)
54 };
55
56 } // namespace
57
58 #endif // OAU_REQUEST_MANAGER_H