9a659a6ab419ec26fffeccb12e34a54d40a9bc84
[apps/homescreen.git] / homescreen / src / homescreenhandler.h
1 // SPDX-License-Identifier: Apache-2.0
2 /*
3  * Copyright (c) 2017 TOYOTA MOTOR CORPORATION
4  * Copyright (c) 2022 Konsulko Group
5  */
6
7 #ifndef HOMESCREENHANDLER_H
8 #define HOMESCREENHANDLER_H
9
10 #include <QObject>
11 #include <string>
12
13 #include "applicationlauncher.h"
14 #include "AppLauncherClient.h"
15
16 #include "shell.h"
17
18 using namespace std;
19
20 class HomescreenHandler : public QObject
21 {
22         Q_OBJECT
23 public:
24         explicit HomescreenHandler(Shell *aglShell, ApplicationLauncher *launcher = 0, QObject *parent = 0);
25         ~HomescreenHandler();
26
27         Q_INVOKABLE void tapShortcut(QString application_id);
28
29         void addAppToStack(const QString& application_id);
30         void activateApp(const QString& app_id);
31         void deactivateApp(const QString& app_id);
32
33         QStringList apps_stack;
34         std::list<std::pair<const QString, const QString>> pending_app_list;
35 signals:
36         void showNotification(QString application_id, QString icon_path, QString text);
37         void showInformation(QString info);
38
39 public slots:
40         void processAppStatusEvent(const QString &id, const QString &status);
41
42 private:
43         ApplicationLauncher *mp_launcher;
44         AppLauncherClient *mp_applauncher_client;
45
46         Shell *aglShell;
47
48 };
49
50 #endif // HOMESCREENHANDLER_H