aboutsummaryrefslogtreecommitdiffstats
path: root/xdg-launcher/src/runxdg.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'xdg-launcher/src/runxdg.hpp')
-rw-r--r--xdg-launcher/src/runxdg.hpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/xdg-launcher/src/runxdg.hpp b/xdg-launcher/src/runxdg.hpp
index c98b95c..ca1e25a 100644
--- a/xdg-launcher/src/runxdg.hpp
+++ b/xdg-launcher/src/runxdg.hpp
@@ -58,12 +58,6 @@ class ILMControl
}
};
-enum launcher_t {
- POSIX,
- AFM_DBUS,
- AFM_WEBSOCKET,
-};
-
class Launcher
{
public:
@@ -72,9 +66,9 @@ class Launcher
virtual pid_t find_surfpid_by_rid(pid_t app_pid) = 0;
virtual int launch(std::string& name) = 0;
- virtual void loop(volatile sig_atomic_t* e_flag) = 0;
+ virtual void loop(volatile sig_atomic_t& e_flag) = 0;
- int m_rid = -1;
+ int m_rid = 0;
};
class POSIXLauncher : public Launcher
@@ -90,7 +84,7 @@ class POSIXLauncher : public Launcher
pid_t find_surfpid_by_rid(pid_t rid);
int launch(std::string& name);
- void loop(volatile sig_atomic_t* e_flag);
+ void loop(volatile sig_atomic_t& e_flag);
};
class AFMLauncher : public Launcher
@@ -108,8 +102,8 @@ class AFMDBusLauncher : public AFMLauncher
{
public:
int launch(std::string& name);
- void loop(volatile sig_atomic_t* e_flag) {
- while (!(*e_flag)) { sleep(60*60*24); } }
+ void loop(volatile sig_atomic_t& e_flag) {
+ while (!(e_flag)) { sleep(60*60*24); } }
private:
int get_dbus_message_bus(GBusType bus_type, GDBusConnection* &conn);
@@ -124,14 +118,14 @@ class AFMWebSocketLauncher : public AFMLauncher
// not implemented yet
public:
int launch(std::string& name) { return 0; }
- void loop(volatile sig_atomic_t* e_flag) {
- while (!(*e_flag)) { sleep(60*60*24); } }
+ void loop(volatile sig_atomic_t& e_flag) {
+ while (!(e_flag)) { sleep(60*60*24); } }
};
class RunXDG
{
public:
- RunXDG(enum launcher_t type, int port, const char* token, const char* id);
+ RunXDG(int port, const char* token, const char* id);
void start(void);
void notify_ivi_control_cb(ilmObjectType object, t_ilm_uint id,