Service
Description:
Indicates the basic type of a service.
You need to implement the function pointers of .
Summary
Data Fields
Field Documentation
GetName
Description:
Obtains the name of a service.
This function is called by Samgr during service registration and startup. You need to implement this function.
Parameters:
Returns:
Returns a constant string no more than 16 bytes if the service name is obtained successfully; returns NULL if the service name fails to be obtained.
Description:
Obtains task configurations of a service.
This function is used to return task configurations. You need to implement this function.
Parameters:
Returns .
Initialize
Description:
Initializes the service.
After Samgr assigns tasks to a service, the service calls the function in its own tasks. You need to implement this function.
Parameters:
Returns:
Returns TRUE if the initialization is successful; returns FALSE otherwise.
MessageHandle
Description:
Processes service messages.
This function is used to process requests sent by the caller through . You need to implement this function.
Parameters:
Returns TRUE if the message processing is successful; returns FALSE if the processing fails.