CSmsEngine Class Reference

Inherits MSMSExampleMtmsEngineObserver.

List of all members.

Public Member Functions

IMPORT_C ~CSmsEngine ()
IMPORT_C void SendSmsL (const TDesC &aAddr, const TDesC &aMsg)
IMPORT_C void ListenforIncomingSms (TBool aListening)
IMPORT_C void SetAutomaticDeletetion (TBool aDeletion)
IMPORT_C void GetFolderSMSMessageInformationL (TMsvId aFolderID, CDesCArrayFlat *&aAddresses, CDesCArrayFlat *&aMessages)
IMPORT_C RArray< TMsvId > * GetMessageIds ()
IMPORT_C void CopyMessageL (TMsvId aMessageId, TMsvId aFolder)
IMPORT_C void MoveToFolderL (TMsvId aMessageId, TMsvId aFolder)
IMPORT_C void DeleteMessageL (TMsvId aMessageId)
void HandleSessionEventL (TMsvSessionEvent aEvent, TAny *aArg1, TAny *aArg2, TAny *aArg3)
void HandleMessageSentL (TInt aError)

Static Public Member Functions

static IMPORT_C CSmsEngineNewL (MSmsEngineObserver &aObserver)
static IMPORT_C CSmsEngineNewLC (MSmsEngineObserver &aObserver)

Detailed Description

Class CSmsEngine wraps the CSMSExampleMtmsEngine class and offers an easy to use interface for basic SMS functionality.

There are a couple of "almost implemented" features, like deleting the sent message and checking for a response to the sent message. Also some spesial error situations are described in code comments.

Definition at line 40 of file SMSEngine.h.


Constructor & Destructor Documentation

EXPORT_C CSmsEngine::~CSmsEngine (  ) 

Destructor

Definition at line 48 of file SmsEngine.cpp.


Member Function Documentation

EXPORT_C CSmsEngine * CSmsEngine::NewL ( MSmsEngineObserver aObserver  )  [static]

NewL

Parameters:
aObserver the observer

Definition at line 33 of file SmsEngine.cpp.

EXPORT_C CSmsEngine * CSmsEngine::NewLC ( MSmsEngineObserver aObserver  )  [static]

NewL

Parameters:
aObserver the observer

Definition at line 40 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::SendSmsL ( const TDesC &  aAddr,
const TDesC &  aMsg 
)

Sending a message.

Parameters:
aAddr the receiver address
aMsg the message to send

Definition at line 308 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::ListenforIncomingSms ( TBool  aListening  ) 

This enables the client not to listen for incoming messages. By default client receives notitycation when messages arrive

Parameters:
 

Definition at line 350 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::SetAutomaticDeletetion ( TBool  aDeletion  ) 

Do we delete the received message automatically. Default is no.

Parameters:
 

Definition at line 358 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::GetFolderSMSMessageInformationL ( TMsvId  aFolderID,
CDesCArrayFlat *&  aAddresses,
CDesCArrayFlat *&  aMessages 
)

A main function in viewing folder contect. For usage see GUI's AppUi class.

Parameters:
aFolderId the folder
aAddresses Array of recipient addresses
aMessages Array of message bodys.

Definition at line 366 of file SmsEngine.cpp.

EXPORT_C RArray< TMsvId > * CSmsEngine::GetMessageIds (  ) 

Used in getting the message Ids to GUI's listbox id array. Note that GetFolderSMSMessageInformationL has to have been called first so the id's for the folder have been collocted. For usage see GUI's CListboxView class.

Returns:
array of ids

Definition at line 375 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::CopyMessageL ( TMsvId  aMessageId,
TMsvId  aFolder 
)

Copying a message to a specified folder

Parameters:
aMessageID id of an SMS message.
aFolder target folder id.

Definition at line 381 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::MoveToFolderL ( TMsvId  aMessageId,
TMsvId  aFolder 
)

Moving a message to a specified folder

Parameters:
aMessageID id of an SMS message.
aFolder target folder id.

Definition at line 387 of file SmsEngine.cpp.

EXPORT_C void CSmsEngine::DeleteMessageL ( TMsvId  aMessageId  ) 

Deleting a message

Parameters:
aMessageID id of an SMS message.

Definition at line 393 of file SmsEngine.cpp.

void CSmsEngine::HandleSessionEventL ( TMsvSessionEvent  aEvent,
TAny *  aArg1,
TAny *  aArg2,
TAny *  aArg3 
)

From MMsvSessionObserver

Definition at line 77 of file SmsEngine.cpp.

void CSmsEngine::HandleMessageSentL ( TInt  aError  )  [virtual]

From MSMSExampleMtmsEngineObserver

Implements MSMSExampleMtmsEngineObserver.

Definition at line 295 of file SmsEngine.cpp.


Generated by  doxygen 1.6.2