TImSmtpProgress Class Reference

#include <mw/smtpset.h>

Link against: imcm.lib

class TImSmtpProgress
Public Attributes
TImImailFileProgress iSendFileProgress
Public Member Functions
IMPORT_C TIntConnectionIAP()
IMPORT_C TIntConnectionState()
IMPORT_C voidDecrementSendTotal()
IMPORT_C TIntError()
IMPORT_C TIntFailedToSend()
IMPORT_C voidInitialiseTotal(const TInt &)
IMPORT_C TIntMsgNo()
IMPORT_C TIntNotSent()
IMPORT_C TIntSendTotal()
IMPORT_C TIntSent()
IMPORT_C TMsvIdServiceId()
IMPORT_C voidSetConnectionIAP(TInt)
IMPORT_C voidSetError(TInt)
IMPORT_C voidSetMsgNo(TInt)
IMPORT_C voidSetServiceId(TMsvId)
IMPORT_C voidSetStatus(TMsgImOutboxSendState)
IMPORT_C TMsgImOutboxSendStateStatus()
IMPORT_C voidUpdateFailedToSend()
IMPORT_C voidUpdateSent()

Detailed Description

Progress information for SMTP operations on the Internet Mail MTM.

The information is obtained through calling CMsvOperation::Progress() on the operation. It is packaged into an 8-bit descriptor.

Messaging clients use the getter functions to get various types of information about an operation's progress. The setter functions are for use by the MTM.

Member Attribute Documentation

iSendFileProgress

TImImailFileProgress iSendFileProgress

Status information about the message that is currently being sent (if sending is in progress).

Member Function Documentation

ConnectionIAP ( )

IMPORT_C TIntConnectionIAP()const

Retrieves the internet access point that is used when connecting to the SMTP service.

Return Value
KErrNotFound if the SMTP service is not connecting, otherwise the internet access point number.

ConnectionState ( )

IMPORT_C TIntConnectionState()const

Retrieves the stage of the connection process as defined in nifvar.h and csdprog.h while the service is connecting to the SMTP server.

Return Value
KLinkLayerOpen if the SMTP service has successfully connected, or KErrNotFound if the SMTP service is disconnected, or the current connection stage (declared in nifvar.h and csdprog.h) while establishing a connection.

DecrementSendTotal ( )

IMPORT_C voidDecrementSendTotal()

Decrements the send total.

This can be used to adjust the total if a message is found to be deleted before it can be sent.

Error ( )

IMPORT_C TIntError()const

Gets an operation error code.

This is set only when a send operation has completed.

Return Value
Operation error code

FailedToSend ( )

IMPORT_C TIntFailedToSend()const

Gets the number of messages that the MTM failed to send this session.

For example, failure could be because the SMTP server refused to accept a message.

Return Value
Number of messages

InitialiseTotal ( const TInt & )

IMPORT_C voidInitialiseTotal(const TInt &aTotal)

Set the progress variables to initial values.

The "send total" and "not sent" variables are set to aTotal. Other counter variables are set to 0. The initial status is set to EMsgOutboxProgressWaiting.

Parameters
aTotalNumber of messages to send

MsgNo ( )

IMPORT_C TIntMsgNo()const

Gets the index of the message that is currently being sent.

The index range is from 0 to SendTotal().

Return Value
Index of the message being sent

NotSent ( )

IMPORT_C TIntNotSent()const

Gets the number of messages that the MTM did not attempt to send in this session.

A possible reason is because the message store was locked by another client.

Return Value
Number of messages

SendTotal ( )

IMPORT_C TIntSendTotal()const

Gets the total number of messages that the MTM is attempting to send in this session.

The following equation is always true: Sent() + NotSent() + FailedToSend() = SendTotal().

Return Value
Number of messages

Sent ( )

IMPORT_C TIntSent()const

Gets the number of messages sent so far in this SMTP session.

Return Value
Number of messages

ServiceId ( )

IMPORT_C TMsvIdServiceId()const

Gets the message server entry ID of the SMTP service being used.

Return Value
Message server entry ID of the SMTP service

SetConnectionIAP ( TInt )

IMPORT_C voidSetConnectionIAP(TIntaConnectionIAP)

Sets the ConnectionIAP value.

Parameters
aConnectionIAPThe value that the ConnectionIAP will be set to.

SetError ( TInt )

IMPORT_C voidSetError(TIntanError)

Sets an error code for the operation.

Parameters
anErrorError code

SetMsgNo ( TInt )

IMPORT_C voidSetMsgNo(TIntaMsgNo)

Sets the index of the message that is currently being sent.

Parameters
aMsgNoIndex of the message being sent

SetServiceId ( TMsvId )

IMPORT_C voidSetServiceId(TMsvIdaServiceId)

Sets the message server entry ID of the SMTP service being used.

Parameters
aServiceIdMessage server entry ID of the SMTP service

SetStatus ( TMsgImOutboxSendState )

IMPORT_C voidSetStatus(TMsgImOutboxSendStateaStatus)

Sets the sending status of the SMTP operation

Parameters
aStatusNew sending status

Status ( )

IMPORT_C TMsgImOutboxSendStateStatus()const

Gets the sending status of the SMTP operation.

Return Value
Sending status

UpdateFailedToSend ( )

IMPORT_C voidUpdateFailedToSend()

Updates progress variables for when a message fails to be sent.

The "failed to send" count is incremented; the "not sent" count is decremented.

UpdateSent ( )

IMPORT_C voidUpdateSent()

Updates progress variables for when a message is successfully sent.

The "message sent" count is incremented; the "not sent" count is decremented.