Bp/Bn & IServiceManager, BpServiceManager
2016-03-17 18:03:06 0 举报
MediaServer初始化时主要是和binder挂上钩。
作者其他创作
大纲/内容
INTERFACE
+ getInterfaceDescriptor() //获取接口描述符+ asInterface() // 主要返回new Bp##INTERFACE(obj)+ I##INTERFACE() //构造函数+ ~I##INTERFACE() //析构函数
BpServiceManager
+ getService()+ checkService()+ addService()+ listServices
BpInterface //BpInterfce 继承BpRefBase 对象,通过mRemote 持有BpBinder对象表示客户端的binder对象
+ onAsBinder()
BnServiceManager
IInterface
+ asBinder()+ onAsBinder()
IBinder
+ queryLocalInterface()+ getInterfaceDescriptor()+ transact()+ BBinder* localBinder();+ BpBinder* remoteBinder();
BBinder //代表通信的服务端
+ getInterfaceDescriptor()+ ontransact()+ linkToDeath()+ BBinder* localBinder()
BpBinder//代表通信的客户端
+ getInterfaceDescriptor()+ transact()+ linkToDeath()+ BpBinder* remoteBinder();
BnInterface //BnInterface继承了BBinder对象表示服务端的binder
+ queryLocalInterface()+ getInterfaceDescriptor()+ onAsBinder()
BpRefBase
+ IBinder* const mRemote // 通过mRemote 持有BpBinder对象
+remote(); // return mRemote
RefBase
IServiceManager
DECLARE_META_INTERFACE(ServiceManager) 声明几个:+ getInterfaceDescriptor() + asInterface() // 主要返回new BpServiceManager(obj)+ IServiceManager() //构造函数+ ~IServiceManager() //析构函数
0 条评论
下一页