VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
run_as_service.h File Reference

Supports Windows service creation/deletion and starting/stopping the service User needs only one function call to Run_as_service() to enable Windows service functionality. More...

Go to the source code of this file.

Namespaces

 ugcs
 UGCS root namespace.
 
 ugcs::vsm
 All VSM SDK functionality resides in this namespace.
 

Typedefs

typedef Callback_proxy< int,
int, char ** > 
ugcs::vsm::Program_init
 Signature for program initialization routine. More...
 

Enumerations

enum  ugcs::vsm::Run_as_service_result { SERVICE_RESULT_OK = 0, SERVICE_RESULT_ERROR = 1, SERVICE_RESULT_NORMAL_INVOCATION = -1 }
 Result of Run_as_service function SERVICE_RESULT_OK = 0: Was invoked as service and is about to end. More...
 

Functions

template<class __Callable , typename... __Args>
 ugcs::vsm::__DEFINE_CALLBACK_BUILDER_BODY (Make_program_init_handler,(int, char **),(0, nullptr)) typedef Callback_proxy< void > Program_done
 Builder for init handler. More...
 
Run_as_service_result ugcs::vsm::Run_as_service (const char *service_name, int argc, char *argv[], Program_init prog_init, Program_done prog_done)
 Entry point for running program as a service. More...
 

Detailed Description

Supports Windows service creation/deletion and starting/stopping the service User needs only one function call to Run_as_service() to enable Windows service functionality.

In linux build Run_as_service() does nothing and returns SERVICE_RESULT_NORMAL_INVOCATION.