Forums | Forums |




as you know, in brew , there is callback mechanism for app. typical use is as below:
use callback_init to set the cbpfn and pfndata.
and then call ishell_resume.
then, in next brew loop, this callback function will be re-called by brew with
pfndata passed.

all above is i known and used before. but now i read a document named BREW®Dispatcher(one document of BREW 2006 Conference,write by Brian Kelley, Sr. Director / TechnologyQUALCOMM Incorporated), it deals with the deep knowledge of brew callback. the callback struct is :

struct _AEECallback
AEECallback *pNext; // RESERVED
void *pmc; // RESERVED
PFNCBCANCEL pfnCancel; // Filled by callback handler
void *pCancelData; // Filled by callback handler
PFNNOTIFY pfnNotify; // Filled by caller
void *pNotifyData; // Filled by caller
void *pReserved; // RESERVED - Used by handler

i only used/set the pfnNotify,pNotifyData member of AEECallback before, never set/use the other member, and also i do not know exactly what is the use of other members.

but,from this document, it seems they are useful sometimes, and i do find some app(code) used these members(pmc,pNext,pfnCancel,pCancelData,pReserved).

then, i really want to know deeply about brew callback mechanism. the below is what i am passion to know:

a. How does BREW Callback Mechanism Work? How do it Manage Callback Queue? How does it Queue/Pending, Call, De-Queue the Callback ?

b. What is the exact use for every members of AEECallback struct(SDK give some info, but it is too simple, i can not understand anything from that)

c. When should i use/ set these (pmc,pNext,pfnCancel,pCancelData,pReserved) members of callback struct . and how to use them? if some example apps be available, then it will be best.

thanks very very very very very very very........................(N very, and N equal to infinite ^-^) much.

i really want to know all these