[Previous] [Next] [Contents]

CHAPTER 6. PHONE INTERFACE

 

6.3 TAPI

A. Message Structure

The communication between application and phone server follows the decided standard (IPC).

 

a. TAPI Message

According to the request of application, phone server returns response as the following form. It automatically analyzes the request using TAPI function and calls the registered call back function.

typedef struct
{
unsigned short length;
unsigned char group;
unsigned char action;
void *data;
} LXT_MESSAGE;

It is composed of length, message group, message little group, and contents data. In here, length only indicates the length of the data. Group and little group are defined at “phoneprotocal.h”.

 

b. Call back function

It is the structure of call back function that applications get response by.

typedef int (*LXT_CALLBACK)(int group, int action, void* data, int length);

Create the call back function that is to get response from phone server like the above structure. Then register the function to handle.

 

c. Handle

It is the structure of handle, which communicates between application and phone server.

typedef struct _lxt_handle
{
int fd;
int clientclass;
LXT_CALLBACK cb;
} LXT_HANDLE;

If application have created handle and connected phone server through TAPI, phone server fills and returns descriptor for socket communication.
At this time, ID and call back function should be filled up.

 

d. Message Type

The messages, which are used to communicate between phone application and phone server, are divided according to its usage.

   

  • Request and Response
  • It is composed of the request of application and the response relevant to the request. The request of application has to be answered by the response message.

    Ex) Request sending call -> Connect call

  • Notification
  • It is used to notify application when phone event occurs regardless of the request of application.

    Ex) Receive call

  • Indication and confirm
  • It is used when application have changed the set value of phone or when phone wants to get information of application.

    Ex) Battery type indication -> Battery type confirm

     


    [Previous] [Next] [Contents] MIZI Prizm 2.0.0