Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: SMTPSET.H
Link against: imcm.lib

Class TImSmtpProgress

class TImSmtpProgress;

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.

Members

Defined in TImSmtpProgress:
ConnectionIAP(), ConnectionState(), DecrementSendTotal(), Error(), FailedToSend(), InitialiseTotal(), MsgNo(), NotSent(), SendTotal(), Sent(), ServiceId(), SetConnectionIAP(), SetError(), SetMsgNo(), SetServiceId(), SetStatus(), Status(), UpdateFailedToSend(), UpdateSent(), iSendFileProgress


Member functions


Status()

IMPORT_C TMsgImOutboxSendState Status() const;

Description

Gets the sending status of the SMTP operation.

Return value

TMsgImOutboxSendState

Sending status


MsgNo()

IMPORT_C TInt MsgNo() const;

Description

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

The index range is from 0 to SendTotal().

Return value

TInt

Index of the message being sent


Error()

IMPORT_C TInt Error() const;

Description

Gets an operation error code.

This is set only when a send operation has completed.

Return value

TInt

Operation error code


Sent()

IMPORT_C TInt Sent() const;

Description

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

Return value

TInt

Number of messages


NotSent()

IMPORT_C TInt NotSent() const;

Description

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

TInt

Number of messages


FailedToSend()

IMPORT_C TInt FailedToSend() const;

Description

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

TInt

Number of messages


SendTotal()

IMPORT_C TInt SendTotal() const;

Description

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

TInt

Number of messages


SetError()

IMPORT_C void SetError(TInt anError);

Description

Sets an error code for the operation.

Parameters

TInt anError

Error code


SetStatus()

IMPORT_C void SetStatus(TMsgImOutboxSendState aStatus);

Description

Sets the sending status of the SMTP operation

Parameters

TMsgImOutboxSendState aStatus

New sending status


SetMsgNo()

IMPORT_C void SetMsgNo(TInt aMsgNo);

Description

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

Parameters

TInt aMsgNo

Index of the message being sent


InitialiseTotal()

IMPORT_C void InitialiseTotal(const TInt &aTotal);

Description

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

const TInt &aTotal

Number of messages to send


UpdateSent()

IMPORT_C void UpdateSent();

Description

Updates progress variables for when a message is successfully sent.

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


UpdateFailedToSend()

IMPORT_C void UpdateFailedToSend();

Description

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

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


DecrementSendTotal()

IMPORT_C void DecrementSendTotal();

Description

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.


ServiceId()

IMPORT_C TMsvId ServiceId() const;

Description

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

Return value

TMsvId

Message server entry ID of the SMTP service


SetServiceId()

IMPORT_C void SetServiceId(TMsvId aServiceId);

Description

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

Parameters

TMsvId aServiceId

Message server entry ID of the SMTP service


ConnectionState()

IMPORT_C TInt ConnectionState() const;

Description

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

TInt

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.


ConnectionIAP()

IMPORT_C TInt ConnectionIAP() const;

Description

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

Return value

TInt

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


SetConnectionIAP()

IMPORT_C void SetConnectionIAP(TInt aConnectionIAP);

Description

Sets the ConnectionIAP value.

Parameters

TInt aConnectionIAP

The value that the ConnectionIAP will be set to.

[Top]


Member data


iSendFileProgress

TImImailFileProgress iSendFileProgress;

Description

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