a2baeb2d6d140e32c7b987250f363ee8f3de252e
[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 signals:
34         void showNotification(QString application_id, QString icon_path, QString text);
35         void showInformation(QString info);
36
37 public slots:
38         void processAppStatusEvent(const QString &id, const QString &status);
39
40 private:
41         ApplicationLauncher *mp_launcher;
42         AppLauncherClient *mp_applauncher_client;
43
44         Shell *aglShell;
45
46         QStringList apps_stack;
47 };
48
49 #endif // HOMESCREENHANDLER_H