2 * Copyright (c) 2020 Collabora Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
30 class Launcher : public QObject
35 Launcher(const QString &sock_name, QObject *parent = nullptr) :
36 QObject(parent), afm_sock_name(sock_name)
39 connection_set = false;
47 // call this before to any start-up
48 int setup_pws_connection(void);
49 bool connection_is_set(void);
52 int start(const QString &app);
53 bool terminate(const QString &app);
54 bool is_running(const QString &app);
55 size_t get_list_runnables(QString *data);
58 struct pws_data_source *pws;
60 QString afm_sock_name;
62 QHash<QString, int> applications; // stores the apps started
66 pws_data_source_destroy(pws);