9 #ifndef __AFW_SERVICE_H__
10 #define __AFW_SERVICE_H__
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
enum afw_service_status_e afw_service_status_t
Typedef for service status enum.
enum afw_service_startup_e afw_service_startup_t
Typedef for service startup type enum.
struct afw_thread_mutex_s afw_thread_mutex_t
const afw_utf8_t * afw_service_startup_description(afw_service_startup_t startup)
Get description for a afw_service_startup_t enum.
void afw_service_restart(const afw_utf8_t *service_id, afw_xctx_t *xctx)
Restart a service.
const afw_value_t * afw_service_startup_as_value(afw_service_startup_t startup)
Convert afw_service_startup_t enum to corresponding adaptive value.
void(* afw_service_create_cede_p_t)(afw_service_t *service, void *data, const afw_object_t *properties, const afw_pool_t *p, afw_xctx_t *xctx)
Function passed to afw_service_start_cede_p.
void afw_service_start_using_AdaptiveConf_cede_p(const afw_object_t *properties, const afw_utf8_t *source_location, const afw_pool_t *p, afw_xctx_t *xctx)
Start a service using AdaptiveConf object and cede p.
void afw_service_stop(const afw_utf8_t *service_id, afw_xctx_t *xctx)
Stop a service.
const afw_object_t * afw_service_get_object(const afw_utf8_t *service_id, const afw_pool_t *p, afw_xctx_t *xctx)
Get a service object.
const afw_utf8_t * afw_service_status_description(afw_service_status_t status)
Get description for a afw_service_status_t enum.
afw_service_status_t afw_service_status_as_enum(const afw_utf8_t *s)
Convert utf8 to corresponding afw_service_status_t enum.
void afw_service_context_prepare(const afw_service_t *service, const afw_pool_t *p, afw_xctx_t *xctx)
Prepare expression evaluation context for service::.
const afw_utf8_t * afw_service_status_as_utf8(afw_service_status_t status)
Convert afw_service_status_t enum to corresponding utf8.
const afw_value_t * afw_service_status_description_as_value(afw_service_status_t status)
Get description as value for a afw_service_status_t enum.
const afw_value_t * afw_service_startup_description_as_value(afw_service_startup_t startup)
Get description as value for a afw_service_startup_t enum.
const afw_value_t * afw_service_status_as_value(afw_service_status_t status)
Convert afw_service_status_t enum to corresponding adaptive value.
const afw_utf8_t * afw_service_startup_as_utf8(afw_service_startup_t startup)
Convert afw_service_startup_t enum to corresponding utf8.
void afw_service_start(const afw_utf8_t *service_id, afw_boolean_t manual_start, afw_xctx_t *xctx)
Start a service.
afw_service_startup_t afw_service_startup_as_enum(const afw_utf8_t *s)
Convert utf8 to corresponding afw_service_startup_t enum.
date, time, and time zone.
Interface afw_object public struct.
Interface afw_pool public struct.
const afw_utf8_t * status_message
Optional status message.
afw_utf8_t service_id
Service's name.
const afw_utf8_t * conf_source_location
The source location associated with the conf for this service.
afw_thread_mutex_t * mutex
Mutex used when changing status.
afw_dateTime_t start_time
Start time.
afw_boolean_t has_service_conf
Has a service conf object.
const afw_pool_t * p
Pool that holds service's resources.
const afw_utf8_t * source_location
The source location associated with this service.
const afw_service_type_t * service_type
afw_service_type instance for this service_type_id.
const afw_utf8_t * conf_subtype
This is the value of the subtype property from conf or NULL.
const afw_utf8_t * status_debug
Optional status debug.
const afw_utf8_t * type
The part before the dash ('-') in service_id.
const afw_utf8_t * conf_id
The part after the dash ('-') in the service id.
const afw_object_t * properties
The properties object containing runtime and conf properties.
afw_service_status_t status
The status of the service.
Interface afw_service_type public struct.
NFC normalized UTF-8 string.
Interface afw_value public struct.
Interface afw_xctx public struct.