gpe-phone: LiPS Event Lib

1    Introduction
1.1    Brief introduction
1.2    Dependency
2    Overview
3    Design and Concepts
4    Package Map

 
1    Introduction
1.1    Brief introduction
This package gives a framework to implement LiPS event model.
1.2    Dependency
LiPS event lib depends on the following libraries:
2    Overview
LiPS Event lib defines the event structure that was described LiPS Event programming model. It supports both asynchronous event & unsolicited event models.
3    Design and Concepts
This section explains what you should know as a programmer for LiPS enabler development with LiPS event model.
Event is defined as the way that Application communicates with enablers. All the events happen in certain sessions. Session is a component recording execution context. Session is identified by sid_t type.
Asynchronous event is caused from an asynchronous request. When asynchronous request function is invoked, a callback function must be provided. A rid will be generated from enabler. With this package, the callback function with the rid & sid will be stored in a hash table.
Unsolicited event comes from outside of the application. Programmer must to register the event type before retrieving it. To register an event type, a callback function also should be provided. The package offers a function to store the session id & event type with the callback function in another hash table.
When event happens, enabler will use evt_get function to build an evt_t structure. In fact, evt_get is just a function pointer which point to a real function provide by enabler developers, since different enabler have different method to get event. To build the event structure, enabler can use the functions from this package to retrieve the handler for the event (callback function) by the rid or event type.
After get an event structure was build, the callback function will be called by invoking the evt_call function in this package. In this way, the application will be notified. When the callback function returns, the event structure should be released by evt_release.  If the event is an asynchronous event, the handler should be removed from the hash table as well.
We provides a evt_process function to combine the evt_get, evt_call and evt_release.
If application unregister an unsolicited event, the handler should be removed from the hash table.
 
4    Package Map