Debian Codegraph @

online-accounts-service/src/mir-helper.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_MIR_HELPER_H
22 #define OAU_MIR_HELPER_H
23
24 #include <QObject>
25 #include <QSharedPointer>
26
27 namespace OnlineAccountsUi {
28
29 class PromptSessionPrivate;
30 class MirHelper;
31 class MirHelperPrivate;
32
33 class PromptSession: public QObject
34 {
35 Q_OBJECT
36
37 public:
38 ~PromptSession();
39
40 QString requestSocket();
41
42 Q_SIGNALS:
43 void finished();
44
45 private:
46 explicit PromptSession(PromptSessionPrivate *priv);
47
48 private:
49 friend class MirHelper;
50 friend class MirHelperPrivate;
51 PromptSessionPrivate *d_ptr;
52 Q_DECLARE_PRIVATE(PromptSession)
53 };
54
55 typedef QSharedPointer<PromptSession> PromptSessionP;
56
57 class MirHelper: public QObject
58 {
59 Q_OBJECT
60
61 public:
62 static MirHelper *instance();
63
64 PromptSessionP createPromptSession(pid_t initiatorPid);
65
66 private:
67 explicit MirHelper(QObject *parent = 0);
68 ~MirHelper();
69
70 private:
71 friend class PromptSession;
72 MirHelperPrivate *d_ptr;
73 Q_DECLARE_PRIVATE(MirHelper)
74 };
75
76 } // namespace
77
78 #endif // OAU_MIR_HELPER_H