Hi. I am trying to understand the IPC mechanism in Android. I wanted to have a high level view of this whole mechanism after a call to transact() is initiated.
Here is a typical scenario I have been trying to understand: I have filched this from a post on this forum by [email protected]: "A binder object is an instance of a class that implements the IBinder interface. The term 'binder class' is used to refer to a concrete class whose instances are binder objects. In other words, a binder class directly or indirectly implements IBinder, and its instances are binder objects." Now, IInterface also #includes Binder.h which #includes IBinder.h A class implements the IInterface.h and exposes some functions as an interface, which are typically pure virtual. These are functions that those which should be used by other processes for whom the object of this Binder class lies outside their address space. How is this logically done? The file IInterface.h itself is more interesting. It has two more interfaces, BpInterface BnInterface Each of them have the onAsBinder() pure virtual function, which has to be implemented by the Binder Class. How and Why are these two interfaces used? Now, onAsBinder() return an IBinder pointer. How does the flow of control follow up after that? I have some very basic questions about the Binder IPC. Please shed some light on them. 1) What does this IBinder pointer point to? 2) How does the IPC work? 3) Explain the working of the transact() function. 3.1) Explain the Parcel objects data , reply 3.2) Who and How is transact() called? Please go ahead and explain as much as you can about this whole IPC ensemble. Point out resources if there are any on this. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

