CImConnection Class Reference

API published in: S60 3rd Ed

Capability Information

Required Capabilities

NetworkServices ReadUserData

Exceptions

None


#include <imconnection.h>

Detailed Description

Instant Messaging API class By creating this class the user automatically connects to the Symbian server but to do something reasonable the IM interface has to be created using this class.

The following order of calling the methods is one possibility to use this class: 1. NewL() - instantiate the object 2. RegisterObserverL() - register the observer methods 3. LoginL() - connect to the protocol stack and login to remote IM server 4. CreateImClientL() - get the IM interface

All the error codes are returned using the leave mechanism.


Public Member Functions

virtual  ~CImConnection ()
virtual MImClient CreateImClientL ()=0
  Creates the IM interface to sending and receiving IMs.
virtual void  RegisterObserverL (MImConnectionObserver *aObserver)=0
  Method for registering the IM Connection observer to the API.
virtual void  UnregisterObserver ()=0
  Method for unregistering the IM Connection observer.
virtual TImConnectionStatus  ImConnectionStatus ()=0
  Method for getting the connection status.
virtual void  LoginL (const TDesC &aServer, const TDesC &aUserID, const TDesC &aPassword, const TUint32 aAP)=0
  Connects the application to the protocol stack and logs in to the remote SAP server using the given login info.
virtual void  CancelLoginL ()=0
  Cancels the ongoing login operation.
virtual void  LogoutL ()=0
  Logs out from current session.

Static Public Member Functions

static CImConnection NewL (const TDesC &aApplicationId)
  Factory method for creating the class instance.

Protected Member Functions

  CImConnection ()

Constructor & Destructor Documentation

virtual CImConnection::~CImConnection  )  [virtual]
 
CImConnection::CImConnection  )  [inline, protected]
 

Member Function Documentation

virtual void CImConnection::CancelLoginL  )  [pure virtual]
 

Cancels the ongoing login operation.

This method is asynchronous and the completion is signaled by HandleCancelLoginL() observer method.

Leave:
KImApiErrNotLogged not logged in
Leave:
KImApiErrLogoutInProgress logout is ongoing
Leave:
KImApiErrCancelLoginInProgress cancel login is ongoing
Leave:
KImApiErrAlreadyLoggedIn already logged in
virtual MImClient* CImConnection::CreateImClientL  )  [pure virtual]
 

Creates the IM interface to sending and receiving IMs.

Returns:
MImClient
virtual TImConnectionStatus CImConnection::ImConnectionStatus  )  [pure virtual]
 

Method for getting the connection status.

This method is synchronous.

Returns:
connection status enum
virtual void CImConnection::LoginL const TDesC &  aServer,
const TDesC &  aUserID,
const TDesC &  aPassword,
const TUint32  aAP
[pure virtual]
 

Connects the application to the protocol stack and logs in to the remote SAP server using the given login info.

This method is asynchronous and the completion is signaled by HandleLoginL() observer method.

Returns:
connection status enum
Leave:
KImApiErrLoginInProgress already logging in
Leave:
KImApiErrLogoutInProgress logout is ongoing
Leave:
KImApiErrCancelLoginInProgress cancel login is ongoing
Leave:
KImApiErrAlreadyLoggedIn already logged in
virtual void CImConnection::LogoutL  )  [pure virtual]
 

Logs out from current session.

This method is asynchronous and the completion is signaled by HandleLogoutL() observer method. Possible leave reasons:

Leave:
KImApiErrNotLogged not logged in
Leave:
KImApiErrLogoutInProgress logout is ongoing
Leave:
KImApiErrCancelLoginInProgress cancel login is ongoing
static CImConnection* CImConnection::NewL const TDesC &  aApplicationId  )  [static]
 

Factory method for creating the class instance.

Parameters:
aApplicationId  the ApplicationId of the application
Returns:
CImConnection
virtual void CImConnection::RegisterObserverL MImConnectionObserver aObserver  )  [pure virtual]
 

Method for registering the IM Connection observer to the API.

This method is synchronous.

Parameters:
aObserver  observer object which receives the notification
Leave:
KImApiErrAlreadyRegistered if it was registered already or other system wide error code
virtual void CImConnection::UnregisterObserver  )  [pure virtual]
 

Method for unregistering the IM Connection observer.

This method is synchronous.


The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top