|
QtService
1.1.0
A platform independent library to easily create system services and use some of their features
|
An overview for the features each backend supports
SIGINT, SIGTERM, SIGQUIT: stopSIGHUB: reloadSIGTSTP: pauseSIGCONT: resumeSIGUSR1: callback "SIGUSR1"SIGUSR2: callback "SIGUSR2"void SIGUSR1(): Invoked by handling the unix signal SIGUSR1void SIGUSR2(): Invoked by handling the unix signal SIGUSR2 qint64 getPid(): Returns the PID auf the currently running instance, or -1 if none is running-platform minimal to avoid any dependencies to the windowing systemSIGINT, SIGTERM, SIGQUIT: stopSIGHUB: reloadSIGTSTP: pauseSIGCONT: resumeSIGUSR1: callback "SIGUSR1"SIGUSR2: callback "SIGUSR2"void SIGUSR1(): Invoked by handling the unix signal SIGUSR1void SIGUSR2(): Invoked by handling the unix signal SIGUSR2int command(parameters...) and will invoke systemctl as systemctl [--user|--system] [--no-block] <command> <service-name> <arguments> and return the result of that command. The first two parameters as well as the service name are automatically determined by the backend, depending on the control configuration. For example, to send the SIGUSR1 signal to a running service, you would call callCommand<int>("kill", QStringLiteral("--signal=SIGUSR1"));SERVICE_WIN32_OWN_PROCESSSERVICE_ACCEPT_PAUSE_CONTINUE | SERVICE_ACCEPT_STOP | SERVICE_ACCEPT_SHUTDOWNvoid command(DWORD): Invoke by handling custom service commands (code range is [128;255])bool command(DWORD cmd): Accepts commands in the range of [128;255]. The command is sent to the service as custom commandSockets category)SIGINT, SIGTERM, SIGQUIT: stopSIGHUB: reloadSIGTSTP: pauseSIGCONT: resumeSIGUSR1: callback "SIGUSR1"SIGUSR2: callback "SIGUSR2"void SIGUSR1(): Invoked by handling the unix signal SIGUSR1void SIGUSR2(): Invoked by handling the unix signal SIGUSR2int command(parameters...) and will invoke launchctl as launchctl <command> <arguments> <service-name> and return the result of that command. The service name is automatically determined by the backend, depending on the control configuration.int onStartCommand(QAndroidIntent, int, int): Run in the android thread (!) to react to the corresponding commandQAndroidBinder *onBind(QAndroidIntent): Run in the android thread (!) to react to the corresponding commandvoid startWithIntent(QAndroidIntent): Starts the service with a custom intent. If the service is already running it is delivered to the running service. The target class is set automatically, so you don't have to set it on your intent.bool bind(QAndroidServiceConnection*, QtAndroid::BindFlags): Binds to the given service. If it is not already running that will also start the service. The bind status is reported to the QAndroidServiceConnection.void unbind(QAndroidServiceConnection*): Unbinds the service connected by the given connection. If no other binders are connected and the service was not started explicitly, this will stop the service.
1.8.14