MImObserver Class Reference

API published in: S60 3rd Ed

Capability Information

Required Capabilities

NetworkServices ReadUserData

Exceptions

None


#include <imclient.h>

Detailed Description

Observer interface for Instant Messaging The user shall implement this interface and register it through the MImClient interface to the API to be able to receive IMs.

Public Member Functions

virtual void  HandleMessageSentL (const TInt aOpCode, const TInt aErrorCode)=0
  This method is called when the SendPToPMessageL succeeded.
virtual void  HandleSendErrorL (const TInt aOpCode, const TInt aErrorCode, MImClientDetailedError *aDetailedError)=0
  This method is called when the SendPToPMessageL failed for some reason.
virtual void  HandleNewPToPMessageL (const TInt aErrorCode, const TContactItemId aContactId, const TDesC &aUserId, const TDesC &aMessageType, const TDesC16 &aContent)=0
  This method is called when a new point-to-point text message has arrived.
virtual void  HandleNewPToPMessageL (const TInt aErrorCode, const TContactItemId aContactId, const TDesC &aUserId, const TDesC &aMessageType, const TDesC8 &aContent)=0
  This method is called when a new point-to-point message (8bit) has arrived.

Member Function Documentation

virtual void MImObserver::HandleMessageSentL const TInt  aOpCode,
const TInt  aErrorCode
[pure virtual]
 

This method is called when the SendPToPMessageL succeeded.

Parameters:
aOpCode  operation code matching the called functions.
aErrorCode  error codes.
virtual void MImObserver::HandleNewPToPMessageL const TInt  aErrorCode,
const TContactItemId  aContactId,
const TDesC &  aUserId,
const TDesC &  aMessageType,
const TDesC8 &  aContent
[pure virtual]
 

This method is called when a new point-to-point message (8bit) has arrived.

The message can be text or binary data.

Parameters:
aErrorCode  error codes (to be defined)
aContactId  Contact model ID of the sender
aUserId  UserID of the message sender
aMessageType  MIME type of the received message
aContent  the message
NOTE: Not yet supported!
virtual void MImObserver::HandleNewPToPMessageL const TInt  aErrorCode,
const TContactItemId  aContactId,
const TDesC &  aUserId,
const TDesC &  aMessageType,
const TDesC16 &  aContent
[pure virtual]
 

This method is called when a new point-to-point text message has arrived.

Parameters:
aErrorCode  error codes (to be defined)
aContactId  Contact model ID of the sender
aUserId  UserID of the message sender
aMessageType  MIME type of the received message
aContent  the message in UNICODE
virtual void MImObserver::HandleSendErrorL const TInt  aOpCode,
const TInt  aErrorCode,
MImClientDetailedError aDetailedError
[pure virtual]
 

This method is called when the SendPToPMessageL failed for some reason.

If the IM was sent to more recipients the error can be a partial success. In that case the detailed error codes for each user can fetched separately. Please note that the aDetailedError is valid during the function call. After that it gets destroyed in the API.

Parameters:
aOpCode  operation code matching the called functions.
aErrorCode  error codes.
aDetailedError  list of errors for each failed user ID.

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

Copyright © Nokia Corporation 2001-2008
Back to top