同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Related Modules:
Description:
Defines the base class of a feature.
You need to implement the pointer to the feature.
Since:
1.0
Version:
1.0
OnInitialize )(Feature *feature, Service *parent, Identity identity) |
|
const char*(* Feature::GetName) ([Feature](Feature.md) *feature)
Description:
Obtains a feature name.
This function is implemented by developers and called by Samgr during feature registration and startup.
Parameters:
feature | Indicates the pointer to the feature. |
Returns:
Returns a constant character string less than 16 bytes if the operation is successful; returns NULL if the operation fails.
void(* Feature::OnInitialize) ([Feature](Feature.md) *feature, [Service](Service.md) *parent, [Identity](Identity.md) identity)
Description:
Initializes a feature.
This function is implemented by developers. After Samgr dispatches tasks to a service, the service calls this function in its own tasks.
Parameters:
feature | Indicates the pointer to the feature. |
parent | Indicates the pointer to the Service to which the feature belongs. |
identity | Indicates the identity of a feature dispatched by the system. |
BOOL(* Feature::OnMessage) ([Feature](Feature.md) *feature, [Request](Request.md) *request)
Description:
Processes a feature message.
This function is implemented by developers to process requests sent by callers through IUnknown.
Parameters:
feature | Indicates the pointer to the feature. |
request | Indicates the request message. |
Returns:
Returns TRUE if the processing is successful; returns FALSE if the processing fails.
void(* Feature::OnStop) ([Feature](Feature.md) *feature, [Identity](Identity.md) identity)
Description:
Stops a feature.
This function is implemented by developers and is called by Samgr when a feature is deregistered to stop running services.
Parameters:
feature | Indicates the pointer to the feature. |
identity | Indicates the Identity of the feature to be stopped. |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。