同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Related Modules:
Description:
Indicates the basic type of a service.
You need to implement the function pointers of Service.
Initialize )(Service *service, Identity identity) |
|
MessageHandle )(Service *service, Request *request) |
|
GetTaskConfig )(Service *service) |
const char*(* Service::GetName) ([Service](Service.md) *service)
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:
service | Indicates the pointer to the service. |
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.
[TaskConfig](TaskConfig.md)(* Service::GetTaskConfig) ([Service](Service.md) *service)
Description:
Obtains task configurations of a service.
This function is used to return task configurations. You need to implement this function.
Parameters:
service | Indicates the pointer to the service. |
Returns:
Returns TaskConfig.
BOOL(* Service::Initialize) ([Service](Service.md) *service, [Identity](Identity.md) identity)
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:
service | Indicates the pointer to the service. |
identity | Indicates the ID allocated by the system to the service. For details, see Identity. |
Returns:
Returns TRUE if the initialization is successful; returns FALSE otherwise.
BOOL(* Service::MessageHandle) ([Service](Service.md) *service, [Request](Request.md) *request)
Description:
Processes service messages.
This function is used to process requests sent by the caller through IUnknown. You need to implement this function.
Parameters:
service | Indicates the pointer to the service. |
request | Indicates the pointer to the request data. |
Returns:
Returns TRUE if the message processing is successful; returns FALSE if the processing fails.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。