当前位置:网站首页>Things about the client (2)
Things about the client (2)
2022-07-18 07:23:00 【Pseudo procedural ape who loves fishing】
Previous review
In the last blog post , We introduced the registry initialization operation in the client , Briefly introduces the functions of other functions .
Today we will deeply analyze the implementation process of each function , And describe the process in the form of a simple flow chart .
Function realization
Because the function of each function needs to call the initialization operation , So I won't introduce it anymore , Please refer to the previous blog for the initialization process : What happened to the client
SAMGR_RegisterServiceApi
The function of this function is to build a remote register service application programming interface , Steps are as follows :
① Registry initialization (InitializeRegistry)
② Add a router (SAMGR_AddRouter)
③ Return the strategy of the process (SAMGR_ProcPolicy)
SAMGR_AddRouter
Adding a router is also divided into the following steps :
① Query interface (QueryInterface)
② Lock multiple writes , Press the key to find (VECTOR_FindByKey)
③ Apply for a temporary space (SAMGR_Malloc)
④ Add elements to vectors (VECTOR_Add)
⑤ Release space (SAMGR_Free)
SAMGR_ProcPolicy
The implementation of process strategy is also divided into several steps :
① First get the registered identity of a user (RegisterIdentity)
- Get the remote policy in the process of obtaining identity (GetRemotePolicy)
② Add the policy of the process to the router (AddPolicyToRouter)
The step flow chart of building the remote register service application programming interface is as follows :
SAMGR_FindServiceApi
The function of this function is to find the service Api, The realization process of its function is divided into the following steps :
① Registry initialization (InitializeRegistry)
② Use vector keys to find , Get the element at the specified location (VECTOR_FindByKey、VECTOR_At)
③ Create a proxy server (SAMGR_CreateIProxy)
④ Again, use the vector key to find , Get the element at the specified location (VECTOR_FindByKey、VECTOR_At)
⑤ Add elements to vectors (VECTOR_Add)
SAMGR_CreateIProxy
Creating a proxy server also requires some steps :
① Query user identity (QueryIdentity)
② Create client (SAMGR_CreateIClient)
③ Apply for a temporary space (SAMGR_Malloc)
④ Register death callback (RegisterDeathCallback)
entry->iUnknown.Invoke = ProxyInvoke; // Proxy call
entry->iUnknown.AddRef = AddRef; // Add reference
entry->iUnknown.Release = Release; // Release space
The implementation flow chart of this function is as follows :
If the functions of the above two functions are to verify the identity of users , Provide users with a platform for manipulation , Then the next function function is to provide users with the ability to obtain functions
I call these three functions Service functions , Three service functions are provided :
SAMGR_RegisterSystemCapabilityApi // Register system capabilities Api
SAMGR_QuerySystemCapabilityApi // Query system functions Api
SAMGR_GetSystemCapabilitiesApi // Get system functions Api
For specific functions, you can check the previous code annotation blog :OpenHarmony Module two samgr_client File header and source file parsing
Next up
In the next issue, we will start to conduct in-depth analysis of the server , Mainly based on module II samgr_server Files are objects , Carefully analyze the construction process of the server and the construction and implementation steps of service functions .
What if you want to know what happened , Let's hear the decomposition next time
边栏推荐
猜你喜欢

毫米波雷达学习(五)——角度估计

Win10右键新建栏目中添加新建Markdown文件(Typora.md)
![[basic use of oscilloscope] and [introduction to the meaning of each key on the oscilloscope key panel]](/img/b7/d2d60ac3c3c1001d49073ea39c2851.png)
[basic use of oscilloscope] and [introduction to the meaning of each key on the oscilloscope key panel]

传值、传引用、传指针

VxWorks环境搭建与学习

Lifecycle: the foundation of lifecycle aware components - jetpack series (1)

(戴尔灵越7572)笔记本外扩显示器以后,笔记本没有声音了的解决办法

C language (high level) static address book

JVM内存比例调节

自增(自减)运算符的运算优先级
随机推荐
How to deploy polardb for PostgreSQL before HTAP capability accelerates TPC-H implementation?
(戴尔灵越7572)笔记本外扩显示器以后,笔记本没有声音了的解决办法
C语言学习第一周——C语言的历史
带图像识别的YYS连点器 V2.0
[use win10's own remote connection tool] to remotely access and control [another win10 Computer]
C language: code specification Discussion & excerpts (including excerpts from some rules of [Huawei code specification])
Unet++ network tensorflow Version (slim Implementation)
OpenHarmony相关知识学习
Probability meditation: 1 Plausible reasoning
OpenHarmony模块二interfaces下头文件解析(8)
数据治理生产线DataArts,让“人人都是分析师”
C语言:【位域操作】(结构体中使用冒号)
客户端的那些事儿
TP5的一些查询
for循环的执行顺序
通达信开户选哪个证券公司 开户安全吗?
Openharmony module II parsing of header files under interfaces (9)
【森城市】GIS数据漫谈(四)— 坐标系统
08 semi automatic annotation of target detection data set
Execution order of the for loop