registry文件-A核进程间服务调用的对外接口定义
samgr中注册表api解释
这个文件都是些对外的调用接口api,大致的变量指向api都在代码中注释。都是cortex-A核进程间服务调用的对外接口定义。
Provider: 服务的提供者,为系统提供能力(对外接口)。
Consumer: 服务的消费者,调用服务提供的功能(对外接口)。
Samgr: 作为中介者,管理Provider提供的能力,同时帮助Consumer发现Provider的能力。
SamgrLite: 主要提供服务的注册与发现能力。
Service: 开发服务时,需要实现的服务的生命周期接口。
Feature: 开发功能时,需要实现的功能的生命周期接口。
IUnknown: 基于IUnknown开发服务或功能的对外接口。
IClientProxy: IPC调用时,消费者的消息发送代理。
IServerProxy: IPC调用时,开发者需要实现提供者的消息处理接口。
这个是注册服务的api
int __attribute__((weak)) SAMGR_RegisterServiceApi(const char *service, const char *feature,
const Identity *identity, IUnknown *iUnknown)
{
(void)service; //开发服务时,需要实现的服务的生命周期接口。
(void)feature;//开发功能时,需要实现的功能的生命周期接口
(void)iUnknown; //基于IUnknown开发服务或功能的对外接口。
(void)identity; //身份验证api
return EC_FAILURE;
}
寻找服务api
IUnknown *__attribute__((weak)) SAMGR_FindServiceApi(const char *service, const char *feature)
{
(void)service;
(void)feature;
return NULL;
}
系统注册能力的api
int32 __attribute__((weak)) SAMGR_RegisterSystemCapabilityApi(const char *sysCap, BOOL isReg)
{
(void)sysCap; //系统能力api
(void)isReg;
return EC_FAILURE;
}
查询系统能力Api
BOOL __attribute__((weak)) SAMGR_QuerySystemCapabilityApi(const char *sysCap)
{
(void)sysCap;
return FALSE;
}
获取系统能力Api
int32 __attribute__((weak)) SAMGR_GetSystemCapabilitiesApi(char sysCaps[MAX_SYSCAP_NUM][MAX_SYSCAP_NAME_LEN],
int32 *size)
{
(void)sysCaps;
(void)size;
return EC_FAILURE;
}