Choco OS
V.0.16.9.0
Join to the chocolate world
|
interface for handling services More...
Go to the source code of this file.
Data Structures | |
struct | oC_Service_Registration_t |
Typedefs | |
typedef struct Service_t * | oC_Service_t |
object for storing service data More... | |
Functions | |
oC_Service_t | oC_Service_New (const oC_Service_Registration_t *Registration) |
allocates memory for a new service More... | |
bool | oC_Service_Delete (oC_Service_t *Service) |
releases memory allocated for a service More... | |
bool | oC_Service_IsCorrect (oC_Service_t Service) |
returns true if the service object is correct | |
oC_ErrorCode_t | oC_Service_Start (oC_Service_t Service) |
starts the service More... | |
oC_ErrorCode_t | oC_Service_Stop (oC_Service_t Service) |
stops the service More... | |
bool | oC_Service_IsActive (oC_Service_t Service) |
returns true if the service is correct and active | |
const char * | oC_Service_GetName (oC_Service_t Service) |
returns name of the service | |
oC_Process_t | oC_Service_GetProcess (oC_Service_t Service) |
returns process associated with the service | |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Definition in file oc_service.h.
typedef struct Service_t* oC_Service_t |
The type is for storing service object data.
Definition at line 70 of file oc_service.h.
bool oC_Service_Delete | ( | oC_Service_t * | Service | ) |
The function is for releasing memory allocated for the service object. It also kills the service process and service thread.
Service | Pointer to the memory where the service object is stored. |
Definition at line 175 of file oc_service.c.
oC_Service_t oC_Service_New | ( | const oC_Service_Registration_t * | Registration | ) |
The function is for allocating memory for a service object.
Registration | Structure with registration of the service |
Definition at line 111 of file oc_service.c.
oC_ErrorCode_t oC_Service_Start | ( | oC_Service_t | Service | ) |
The function starts the given service. The service cannot be already started. If it is, you have to stop it first by calling oC_Service_Stop.
Service | Service object created by the function oC_Service_New |
oC_ErrorCode_None
in case of success Definition at line 232 of file oc_service.c.
oC_ErrorCode_t oC_Service_Stop | ( | oC_Service_t | Service | ) |
The function stops the given service. The service has to be already started. If it is not, you have to start it first by calling oC_Service_Start.
Service | Service object created by the function oC_Service_New |
oC_ErrorCode_None
in case of success Definition at line 273 of file oc_service.c.