MImClient Class Reference

API published in: S60 3rd Ed

Capability Information

Required Capabilities

NetworkServices ReadUserData

Exceptions

None


#include <imclient.h>

Detailed Description

Instant Messaging interface class This interface class provides methods to send and receive instant messages.

Application to be able to receive IMs it must register its own observer using this interface class. This interface can be obtained using a factory method from the CImConnection class.


Public Member Functions

virtual  ~MImClient ()
virtual void  RegisterObserverL (MImObserver *aObserver)=0
  Method for registering the IM client to the WV Engine.
virtual void  UnregisterObserver ()=0
  Method for unregistering the IM Sender from the WV Engine.
virtual TInt  SendPToPMessageL (const TContactItemId &aContactItem, const TDesC16 &aContent)=0
  Method for sending person-to-person text message (UNICODE) using Contact Model IDs.
virtual TInt  SendPToPMessageL (const CContactIdArray &aContactIds, const TDesC16 &aContent)=0
  Method for sending person-to-person text message (UNICODE) using Contact Model IDs.
virtual TInt  SendPToPMessageL (const CContactIdArray &aContactIds, const TDesC &aContentType, const TDesC8 &aContent)=0
  Method for sending person-to-person binary (or 8bit text) message using Contact Model IDs.
virtual TInt  SendPToPMessageL (const TDesC &aUserId, const TDesC16 &aContent)=0
  Method for sending person-to-person text message using directly the User IDs.
virtual TInt  SendPToPMessageL (const MDesCArray &aUserIds, const TDesC16 &aContent)=0
  Method for sending person-to-person text message using directly the User IDs.
virtual TInt  SendPToPMessageL (const MDesCArray &aUserIds, const TDesC &aContentType, const TDesC8 &aContent)=0
  Method for sending person-to-person binary (or 8 bit text) message using directly the User IDs.

Constructor & Destructor Documentation

virtual MImClient::~MImClient  )  [inline, virtual]
 

Member Function Documentation

virtual void MImClient::RegisterObserverL MImObserver aObserver  )  [pure virtual]
 

Method for registering the IM client to the WV Engine.

This method is synchronous.

Parameters:
aObserver  observer object used for notifying the user software
Leave:
KImApiErrAlreadyRegistered if it was registered already or other system wide error code
virtual TInt MImClient::SendPToPMessageL const MDesCArray &  aUserIds,
const TDesC &  aContentType,
const TDesC8 &  aContent
[pure virtual]
 

Method for sending person-to-person binary (or 8 bit text) message using directly the User IDs.

This method is asynchronous and its completion is signaled in HandleMessageSentL() method. The method will leave on error. The API specific error codes are in imerrors.h file

Parameters:
aUserIds  recipient(s) of the message
aContentType  MIME type of the message
aContent  the message
Returns:
operation code.
NOTE: Not yet supported!
virtual TInt MImClient::SendPToPMessageL const MDesCArray &  aUserIds,
const TDesC16 &  aContent
[pure virtual]
 

Method for sending person-to-person text message using directly the User IDs.

This method is asynchronous and its completion is signaled in HandleMessageSentL() method. The method will leave on error. The API specific error codes are in imerrors.h file

Parameters:
aUserIds  recipient(s) of the message
aContent  the message in UNICODE
Returns:
operation code.
Leave:
KImApiErrNotRegistered observer was not registered
Leave:
KImApiErrInvalidUserId wrong User ID
virtual TInt MImClient::SendPToPMessageL const TDesC &  aUserId,
const TDesC16 &  aContent
[pure virtual]
 

Method for sending person-to-person text message using directly the User IDs.

This method is asynchronous and its completion is signaled in HandleMessageSentL() method. The method will leave on error. The API specific error codes are in imerrors.h file

Parameters:
aUserId  the recipient of the message
aContent  the message in UNICODE
Returns:
operation code.
Leave:
KImApiErrNotRegistered observer was not registered
Leave:
KImApiErrInvalidUserId wrong User ID
virtual TInt MImClient::SendPToPMessageL const CContactIdArray &  aContactIds,
const TDesC &  aContentType,
const TDesC8 &  aContent
[pure virtual]
 

Method for sending person-to-person binary (or 8bit text) message using Contact Model IDs.

This method is asynchronous and its completion is signaled in HandleMessageSentL() method. The method will leave on error. The API specific error codes are in imerrors.h file Please note that one contact can have more than one assigned IM user ID. Sending IM to those contacts will result in partial success.

Parameters:
aContactIds  Contact Model Ids of the recipient(s)
aContentType  MIME type of the content
aContent  The content of the message
Returns:
operation code
NOTE: Not yet supported!
virtual TInt MImClient::SendPToPMessageL const CContactIdArray &  aContactIds,
const TDesC16 &  aContent
[pure virtual]
 

Method for sending person-to-person text message (UNICODE) using Contact Model IDs.

This method is asynchronous and its completion is signaled in HandleMessageSentL() method. The method will leave on error. The API specific error codes are in imerrors.h file Please note that one contact can have more than one assigned IM user ID. Sending IM to those contacts will result in partial success.

Parameters:
aContactIds  Contact Model Ids of the recipient(s)
aContent  The content of the message in UNICODE
Returns:
operation code
Leave:
KImApiErrNotRegistered observer was not registered
Leave:
KImApiErrInvalidContactId the contact ID does not have a corresponding User ID
virtual TInt MImClient::SendPToPMessageL const TContactItemId &  aContactItem,
const TDesC16 &  aContent
[pure virtual]
 

Method for sending person-to-person text message (UNICODE) using Contact Model IDs.

This method is asynchronous and it’s completion is signaled in HandleMessageSentL() method. The method will leave on error. The API specific error codes are in imerrors.h file

Parameters:
aContactItem  Contact Model ID of the recipient
aContent  The content of the message in UNICODE
Returns:
operation code
Leave:
KImApiErrNotRegistered observer was not registered
Leave:
KImApiErrInvalidContactId the contact ID does not have a corresponding User ID
virtual void MImClient::UnregisterObserver  )  [pure virtual]
 

Method for unregistering the IM Sender from the WV Engine.

This method is synchronous method.


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

Copyright © Nokia Corporation 2001-2008
Back to top