![]() |
Deskflow 1.24.0.365
Keyboard and mouse sharing utility
|
Interface for architecture dependent daemonizing. More...
#include <IArchDaemon.h>

Public Types | |
| using | DaemonFunc = std::function<int()> |
Public Member Functions | |
| virtual | ~IArchDaemon ()=default |
manipulators | |
| virtual int | daemonize (DaemonFunc const &func)=0 |
| Daemonize the process. | |
| virtual QString | commandLine () const =0 |
| Get the command line. | |
Interface for architecture dependent daemonizing.
This interface defines the operations required by deskflow for installing uninstalling daeamons and daemonizing a process. Each architecture must implement this interface.
| using IArchDaemon::DaemonFunc = std::function<int()> |
|
virtualdefault |
|
pure virtual |
Get the command line.
Gets the command line with which the application was started.
Implemented in ArchDaemonNone, and ArchDaemonWindows.
|
pure virtual |
Daemonize the process.
Daemonize. Throw ArchDaemonFailedException on error. name is the name of the daemon. Once daemonized, func is invoked and daemonize returns when and what it does.
Exactly what happens when daemonizing depends on the platform.
func gets passed one argument, the name passed to daemonize(). func is only called when the service is actually started. func must call ArchMiscWindows::runDaemon() to finally becoming a service. The runFunc function passed to runDaemon() must call ArchMiscWindows::daemonRunning(true) when it enters the main loop (i.e. after initialization) and ArchMiscWindows::daemonRunning(false) when it leaves the main loop. The stopFunc function passed to runDaemon() is called when the daemon must exit the main loop and it must cause runFunc to return. func should return what runDaemon() returns. func or runFunc can call ArchMiscWindows::daemonFailed() to indicate startup failure. Implemented in ArchDaemonNone, and ArchDaemonWindows.