diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/wolf/log/messages.h | 6 | ||||
-rw-r--r-- | include/wolf/service/service.h | 11 |
2 files changed, 10 insertions, 7 deletions
diff --git a/include/wolf/log/messages.h b/include/wolf/log/messages.h index 04cad44..ad706e7 100644 --- a/include/wolf/log/messages.h +++ b/include/wolf/log/messages.h @@ -182,10 +182,8 @@ #define WOLF_MSG_SERVICE_HANDLING_EVENT WOLF_MSG_SERVICE_BASE+13 #define WOLF_MSG_SERVICE_CANT_REGISTER_SERVICE_CTRL_HANDLER WOLF_MSG_SERVICE_BASE+14 #define WOLF_MSG_SERVICE_CANT_CREATE_STOP_EVENT WOLF_MSG_SERVICE_BASE+15 -#define WOLF_MSG_SERVICE_STARTED_SERVICE WOLF_MSG_SERVICE_BASE+16 -#define WOLF_MSG_SERVICE_WAIT_FOR_OBJECT_FAILED WOLF_MSG_SERVICE_BASE+17 -#define WOLF_MSG_SERVICE_STOPPED_SERVICE WOLF_MSG_SERVICE_BASE+18 -#define WOLF_MSG_SERVICE_CANT_DISPATCH_SERVICE WOLF_MSG_SERVICE_BASE+19 +#define WOLF_MSG_SERVICE_WAIT_FOR_OBJECT_FAILED WOLF_MSG_SERVICE_BASE+16 +#define WOLF_MSG_SERVICE_CANT_DISPATCH_SERVICE WOLF_MSG_SERVICE_BASE+17 #ifdef __cplusplus extern "C" { diff --git a/include/wolf/service/service.h b/include/wolf/service/service.h index 3f09eb7..1275d0b 100644 --- a/include/wolf/service/service.h +++ b/include/wolf/service/service.h @@ -68,6 +68,7 @@ typedef struct wolf_service_params_t { wolf_error_t wolf_service_install( wolf_service_params_t params ); typedef enum wolf_service_event_t { + WOLF_SERVICE_NO_EVENT, /**< no event happened */ WOLF_SERVICE_EVENT_TERMINATE /**< terminate the service now */ } wolf_service_event_t; @@ -91,10 +92,14 @@ wolf_service_event_t wolf_service_events_suspend( int timeout, wolf_error_t *err * * Note: Must be exported as it gets called from the SCM in a service thread/process. */ -void WINAPI wolf_service_main( DWORD argc, LPTSTR *argv ); +void WINAPI wolf_service_main( DWORD argc, LPTSTR *argv ); -wolf_error_t wolf_service_start( LPTSTR service_name, - LPSERVICE_MAIN_FUNCTION service_main ); +void wolf_service_register_main( LPSERVICE_MAIN_FUNCTION service_main ); + +int wolf_service_run( LPTSTR service_name, + wolf_error_t *error ); + + #ifdef __cplusplus } |