IM API: API description

The logical type of IM API is Library API. IM API provides standalone implementation classes that are used by the client. The interface provides methods that do not block, but return immediately, so that the API operation happens simultaneously while the client application continues to run. The implementation is used in the context of the client’s thread and the operations can be used independently of each other. Notification events are used to indicate the client of changes in the connection state and on arrival of a new instant message. Moreover, when some operation is complete, the client also gets a notification of this. The API implementation uses active objects so the client application is required to install and run an active scheduler.

Use cases

The main use cases are described in Figure 1.

Figure 1: Main use cases

API class structure

IM API is divided into two logical parts: connection handling and IM handling. Each part has its observer interface, which needs to be implemented by the client. The user application first has to create an object of CImConnection with help of the ECom framework. After creating that object the connection handler part of IM API is ready for use. The user application has to implement the MImConnectionObserver interface for notifications and register that to IM API. Using the CImConnection class the user application is able to create objects of MImClient for IM handling. The interface class structure is shown in Figure 2.

Figure 2: Interface class structure


Copyright © Nokia Corporation 2001-2008
Back to top