CImTextServerSession Class Reference

class CImTextServerSession : public CMsgActive

Creates/opens socket and sends and receives data.

Inherits from

Public Member Functions
~CImTextServerSession ()
IMPORT_C void Disconnect ()
IMPORT_C void Disconnect ( TRequestStatus &)
CImConnect * GetCImConnect ()
IMPORT_C TInt GetConnectionStage ()
IMPORT_C TImLineType GetCurrentTextLine ( TDes8 &)
IMPORT_C TInt GetIAPBearer ( TUint32 &)
IMPORT_C TInt GetIAPValue ( TUint32 &)
IMPORT_C TInt GetLastSocketActivityTimeout ( TUint32 &)
IMPORT_C TInt GetRConnectionName ( TName &)
RSocketServ & GetSocketServ ()
IMPORT_C const TDesC & LocalName ()
IMPORT_C void LogError (const TDesC8 &, const TInt )
IMPORT_C void LogText (const TDesC8 &)
IMPORT_C CImTextServerSession * NewL ()
IMPORT_C CImTextServerSession * NewL ( RSocketServ &, CImConnect &)
IMPORT_C CImTextServerSession * NewL ( TInt , TInt )
IMPORT_C CImTextServerSession * NewL ( TInt , TInt , RSocketServ &, CImConnect &)
IMPORT_C CImTextServerSession * NewL ( RSocketServ &)
IMPORT_C CImTextServerSession * NewLC ( TImOperationMode , RSocketServ &)
IMPORT_C void PerformLogging ( TBool )
IMPORT_C void QueueConnect ( TRequestStatus &, const TDesC &, TInt , TBool )
IMPORT_C void QueueConnect ( TRequestStatus &, const TDesC &, TInt , const CImIAPPreferences &, TInt , TBool )
IMPORT_C void QueueConnect ( TRequestStatus &, const TDesC &, TInt , TCallBack , const TUint32 , TInt , TBool )
IMPORT_C void QueueConnect ( TRequestStatus &, const TDesC &, TInt , const TUint32 , TInt , TBool )
IMPORT_C void QueueConnect ( TRequestStatus &, const TDesC &, TInt , TCallBack , TBool )
IMPORT_C void QueueConnect ( TRequestStatus &, const TDesC &, TInt , TCallBack , const CImIAPPreferences &, TInt , TBool )
IMPORT_C void QueueConnectL ( TRequestStatus &, const TDesC &, TInt , const CImIAPPreferences &, TBool )
IMPORT_C void QueueConnectL ( TRequestStatus &, const TDesC &, TInt , const CImIAPPreferences &, const TDesC8 &)
IMPORT_C void QueueReceiveNextTextLine ( TRequestStatus &)
IMPORT_C TInt Receive ( TDes8 &)
IMPORT_C void Receive ( TRequestStatus &, TDes8 &)
IMPORT_C void ReceiveBinaryData ( TRequestStatus &, TDes8 &, TInt )
IMPORT_C void SSLQueueConnectL ( TRequestStatus &, const TDesC &, TInt , const CImIAPPreferences &, TBool )
IMPORT_C void SSLQueueConnectL ( TRequestStatus &, const TDesC &, TInt , const CImIAPPreferences &, const TDesC8 &)
IMPORT_C void Send ( TRequestStatus &, const TDesC8 &)
IMPORT_C void Send ( TRequestStatus &, TRefByValue < const TDesC8 >, ...)
IMPORT_C TInt Send (const TDesC8 &)
IMPORT_C TInt Send ( TRefByValue < const TDesC8 >, ...)
IMPORT_C void SendQueueReceive ( TRequestStatus &, const TDesC8 &)
IMPORT_C void SendQueueReceive ( TRequestStatus &, TRefByValue < const TDesC8 >, ...)
IMPORT_C void SendQueueReceiveWithTimeout ( TRequestStatus &, TInt , const TDesC8 &)
IMPORT_C TInt SendReceive (const TDesC8 &)
IMPORT_C void SendWithTimeout ( TRequestStatus &, TInt , const TDesC8 &)
IMPORT_C void SetPrimaryTextServerSession ( CImTextServerSession *)
IMPORT_C void SetSSLTLSResponseL (const TDesC8 &)
IMPORT_C TInt SetSecurity ( TBool , TBool )
void SocketIdle ()
void TimeOut ()
Private Member Functions
CImTextServerSession ()
CImTextServerSession ( RSocketServ &, CImConnect &)
CImTextServerSession ( TInt , TInt )
CImTextServerSession ( TInt , TInt , RSocketServ &, CImConnect &)
void Close ()
void ConstructL ()
void CreateLogFile ( TInt )
void CreateSecureSocketL ()
void DoCancel ()
void DoComplete ( TInt &)
void DoConnectedToSocketL ()
void DoQueueConnect ()
void DoRunL ()
TInt Open ()
void OpenScriptFile ( TInt )
void ParseSSLTLSResponseL ()
void QueueGenericConnectL ( TRequestStatus &, const TDesC &, TInt , const CImIAPPreferences &, const TDesC8 &)
void RealReceive ( TDes8 &)
void RealSend (const TDesC8 &)
void SocketConnect ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CMsgActive::CMsgActive(TInt)
CMsgActive::Complete(TInt)
CMsgActive::Queue(TRequestStatus &)
CMsgActive::~CMsgActive()
Public Member Enumerations
enum TImOperationMode { EImServerMode , EImClientMode }
Private Member Enumerations
enum TImSecurityState { EImSecurityStateOff , EImSecurityStateOn , EImSecurityStateFailed }
enum TImSendReceiveState {
EImInactive , EImSending , EImReceiving , EImReceivingBinaryData , EImSendingQueueReceive , EImSuspended
}
enum TImSocketState {
EImClosed , EImResolve , EImConnect , EImSendReceive , EImDialUsingOverride , EImTLSHandShakeStarted , EImSendReceiveTimedOut
}
Inherited Enumerations
CActive:TPriority
Private Attributes
TPtrC iAddressDesc
HBufC8 * iBuffer
TBool iClientOwnsConnection
CImConnect * iConnect
TUint32 iCurrentIAPcache
TImLineType iCurrentLineType
RHostResolver iHostResolver
TNameEntry iHostent
TBool iIAPCached
const CImIAPPreferences * iIAPPreferences
TSockXfrLength iLen
TBuf < KImskIPAddressLen > iLocalName
CImLog * iLog
TBool iPerformLogging
TInt iPortNum
CImTextServerSession * iPrimaryTextServerSession
TBool iReadTLSResponse
TImMailBuffer iReceive
TDes8 * iReceiveData
TTimeIntervalMicroSeconds32 iReceiveIdleTime
TTimeIntervalMicroSeconds32 iReceiveShortIdleTime
HBufC8 * iSSLDomainName
CSecureSocket * iSecureSocket
TImSecurityState iSecurityState
TTimeIntervalMicroSeconds32 iSendIdleTime
TImSendReceiveState iSendReceive
TTimeIntervalMicroSeconds32 iSendShortIdleTime
HBufC8 * iSentData
RSocketServ iServ
RSocket iSocket
TBool iSocketIdleTimeSet
CImSocketIdleTimer * iSocketIdleTimer
TImSocketState iState
HBufC8 * iTLSResponse
TBool iWrappedSocket
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CImTextServerSession()

CImTextServerSession ( ) [private]

cat Construction and Destruction

Intended Usage : Constructor. First phase of two-phase construction method. Does non-allocating construction.
Since
6.0

CImTextServerSession(RSocketServ &, CImConnect &)

CImTextServerSession ( RSocketServ & aSocketServ,
CImConnect & aConnect
) [private]

Parameters

RSocketServ & aSocketServ
CImConnect & aConnect

CImTextServerSession(TInt, TInt)

CImTextServerSession ( TInt aSendIdleTime,
TInt aReceiveIdleTime
) [private]

cat Construction

Intended Usage : Constructor. First phase of two-phase construction method. Does non-allocating construction.
Since
7.0s
Constructor that allows setting of the send and receive idle times.

An idle time of zero implies that no timer should be set.

Parameters

TInt aSendIdleTime The idle time in minutes allowed for sending. A value of zero indicates that no timer should be set.
TInt aReceiveIdleTime The idle time in minutes allowed for receiving. A value of zero indicates that no timer should be set.

CImTextServerSession(TInt, TInt, RSocketServ &, CImConnect &)

CImTextServerSession ( TInt aSendIdleTime,
TInt aReceiveIdleTime,
RSocketServ & aSocketServ,
CImConnect & aConnect
) [private]

Parameters

TInt aSendIdleTime
TInt aReceiveIdleTime
RSocketServ & aSocketServ
CImConnect & aConnect

~CImTextServerSession()

~CImTextServerSession ( )

cat Destruction

Intended Usage : Destructor.
Since
6.0

Member Functions Documentation

Close()

void Close ( ) [private]

ConstructL()

void ConstructL ( ) [private]

cat Construction and Destruction.

Intended Usage : Second phase of two-phase construction method. Does any allocations required to fully construct the object.
Since
6.0
leave
KErrNoMemory.
Pre-condition
First phase of construction is complete
Post-condition
The object is fully constructed and initialised.

CreateLogFile(TInt)

void CreateLogFile ( TInt aPortNum ) [private]

Parameters

TInt aPortNum

CreateSecureSocketL()

void CreateSecureSocketL ( ) [private]
Intended Usage : to use secure socket connection
Since
6.2
leave
None
Post-condition
CSecureSocket object is created and iSecurityState is set to EImSecurityStateOn;

Disconnect()

IMPORT_C void Disconnect ( )
Intended Usage : To disconnect and close socket connection. Error Condition : None
Since
6.0
Pre-condition
None
Post-condition
connection is closed.

Disconnect(TRequestStatus &)

IMPORT_C void Disconnect ( TRequestStatus & aStatus )

Parameters

TRequestStatus & aStatus

DoCancel()

void DoCancel ( ) [private, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

DoComplete(TInt &)

void DoComplete ( TInt & aStatusValue ) [private, virtual]

Parameters

TInt & aStatusValue

DoConnectedToSocketL()

void DoConnectedToSocketL ( ) [private]

DoQueueConnect()

void DoQueueConnect ( ) [private]

DoRunL()

void DoRunL ( ) [private, virtual]

GetCImConnect()

CImConnect * GetCImConnect ( )
Intended Usage : Returns the CImConnect object
Since
9.2
Post-condition
Going to be use on the secondary session

GetConnectionStage()

IMPORT_C TInt GetConnectionStage ( )
Intended Usage : Gets the stage of the connection process obtained from RConnection
Since
7.0s

GetCurrentTextLine(TDes8 &)

IMPORT_C TImLineType GetCurrentTextLine ( TDes8 & aDesc )

Returns first full line of data received from socket to user

Intended Usage : To return received data. Error Condition : None
Since
6.0
Post-condition
returns the received buffer in the form of aDesc

Parameters

TDes8 & aDesc will be filled with received buffer

GetIAPBearer(TUint32 &)

IMPORT_C TInt GetIAPBearer ( TUint32 & aBearer )

Returns the bearer type we are connected to with in aBearer or returns an error code

Parameters

TUint32 & aBearer

GetIAPValue(TUint32 &)

IMPORT_C TInt GetIAPValue ( TUint32 & aIAP )
Intended Usage : Returns the IAP we are connecting/connected with in aIAP or returns an error code
Since
6.0
Post-condition
aIAP will be filled with current IAP connected.

Parameters

TUint32 & aIAP will be the current IAP

GetLastSocketActivityTimeout(TUint32 &)

IMPORT_C TInt GetLastSocketActivityTimeout ( TUint32 & aTimeout )
Intended Usage : Returns the last socket activity timeout value
Since
9.1
Post-condition
aTimeout will be filled with the timeout value

Parameters

TUint32 & aTimeout is a return argument containing the timeout if it was found

GetRConnectionName(TName &)

IMPORT_C TInt GetRConnectionName ( TName & aName )
Intended Usage : Returns the name of the RConnection .
Since
9.1
Post-condition
aName will be filled with current name of the RConnection .

Parameters

TName & aName Buffer in which the name is returned.

GetSocketServ()

RSocketServ & GetSocketServ ( )
Intended Usage : Returns the Socket Server
Since
8.0

LocalName()

IMPORT_C const TDesC & LocalName ( )

LogError(const TDesC8 &, const TInt)

IMPORT_C void LogError ( const TDesC8 & aString,
const TInt aError
)

Parameters

const TDesC8 & aString
const TInt aError

LogText(const TDesC8 &)

IMPORT_C void LogText ( const TDesC8 & aString )

Parameters

const TDesC8 & aString

NewL()

IMPORT_C CImTextServerSession * NewL ( ) [static]

cat Construction

Intended Usage : Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack .
Since
6.0
leave
KErrNoMemory.
Pre-condition
None
Post-condition
A fully constructed and initialised CImTextServerSession object.

NewL(RSocketServ &, CImConnect &)

IMPORT_C CImTextServerSession * NewL ( RSocketServ & aSocketServ,
CImConnect & aConnect
) [static]

Parameters

RSocketServ & aSocketServ
CImConnect & aConnect

NewL(TInt, TInt)

IMPORT_C CImTextServerSession * NewL ( TInt aSendIdleTime,
TInt aReceiveIdleTime
) [static]

cat Construction

Intended Usage : Static factory constructor. Uses two phase construction and leaves nothing on the CleanupStack .
Since
7.0s
leave
KErrNoMemory.
Pre-condition
None
Post-condition
A fully constructed and initialised CImTextServerSession object.
Factory constructor that allows setting of send and receive idle times.

An idle time of zero implies that no timer should be set.

Parameters

TInt aSendIdleTime The idle time in minutes allowed for sending. A value of zero indicates that no timer should be set.
TInt aReceiveIdleTime The idle time in minutes allowed for receiving. A value of zero indicates that no timer should be set.

NewL(TInt, TInt, RSocketServ &, CImConnect &)

IMPORT_C CImTextServerSession * NewL ( TInt aSendIdleTime,
TInt aReceiveIdleTime,
RSocketServ & aSocketServ,
CImConnect & aConnect
) [static]

Parameters

TInt aSendIdleTime
TInt aReceiveIdleTime
RSocketServ & aSocketServ
CImConnect & aConnect

NewL(RSocketServ &)

IMPORT_C CImTextServerSession * NewL ( RSocketServ & aServerServ ) [static]

Parameters

RSocketServ & aServerServ

NewLC(TImOperationMode, RSocketServ &)

IMPORT_C CImTextServerSession * NewLC ( TImOperationMode aMode,
RSocketServ & aServerServ
) [static]

Parameters

TImOperationMode aMode
RSocketServ & aServerServ

Open()

TInt Open ( ) [private]

OpenScriptFile(TInt)

void OpenScriptFile ( TInt aPortNum ) [private]

Parameters

TInt aPortNum

ParseSSLTLSResponseL()

void ParseSSLTLSResponseL ( ) [private]
Intended Usage : session will compare the response(for TLS command) with the MTMs response
Since
6.2
leave
KImskSSLTLSNegotiateFailed if the response doesn't match
Post-condition
CSecureSocket object is created

PerformLogging(TBool)

IMPORT_C void PerformLogging ( TBool aLogging )

Parameters

TBool aLogging

QueueConnect(TRequestStatus &, const TDesC &, TInt, TBool)

IMPORT_C void QueueConnect ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
TBool aEnableTimeout = ETrue
)

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
TBool aEnableTimeout = ETrue

QueueConnect(TRequestStatus &, const TDesC &, TInt, const CImIAPPreferences &, TInt, TBool)

IMPORT_C void QueueConnect ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const CImIAPPreferences & aIAPPreferences,
TInt aType,
TBool aEnableTimeout = ETrue
)

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
const CImIAPPreferences & aIAPPreferences
TInt aType
TBool aEnableTimeout = ETrue

QueueConnect(TRequestStatus &, const TDesC &, TInt, TCallBack, const TUint32, TInt, TBool)

IMPORT_C void QueueConnect ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
TCallBack aDisconnectFunction,
const TUint32 aIntraddress,
TInt aType,
TBool aEnableTimeout = ETrue
)

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
TCallBack aDisconnectFunction
const TUint32 aIntraddress
TInt aType
TBool aEnableTimeout = ETrue

QueueConnect(TRequestStatus &, const TDesC &, TInt, const TUint32, TInt, TBool)

IMPORT_C void QueueConnect ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const TUint32 aIAPaddress,
TInt aType,
TBool aEnableTimeout = ETrue
)

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
const TUint32 aIAPaddress
TInt aType
TBool aEnableTimeout = ETrue

QueueConnect(TRequestStatus &, const TDesC &, TInt, TCallBack, TBool)

IMPORT_C void QueueConnect ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
TCallBack aDisconnectFunction,
TBool aEnableTimeout = ETrue
)

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
TCallBack aDisconnectFunction
TBool aEnableTimeout = ETrue

QueueConnect(TRequestStatus &, const TDesC &, TInt, TCallBack, const CImIAPPreferences &, TInt, TBool)

IMPORT_C void QueueConnect ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
TCallBack aDisconnectFunction,
const CImIAPPreferences & aIAPPreferences,
TInt aType,
TBool aEnableTimeout = ETrue
)

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
TCallBack aDisconnectFunction
const CImIAPPreferences & aIAPPreferences
TInt aType
TBool aEnableTimeout = ETrue

QueueConnectL(TRequestStatus &, const TDesC &, TInt, const CImIAPPreferences &, TBool)

IMPORT_C void QueueConnectL ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const CImIAPPreferences & aIAPPreferences,
TBool aEnableTimeout = ETrue
)
Intended Usage : Queue a connect assuming the socket is successfully opened. Error Condition : KErrNoMemory
Since
6.0
Pre-condition
None
Post-condition
connection is ready to send and receive data.

Parameters

TRequestStatus & aStatus Asynchronous completion status
const TDesC & anAddressDesc is the IP address
TInt aPortNum is the port number eg. 143, 25, 110.
const CImIAPPreferences & aIAPPreferences is the IAP connection preference to be used
TBool aEnableTimeout = ETrue Not used

QueueConnectL(TRequestStatus &, const TDesC &, TInt, const CImIAPPreferences &, const TDesC8 &)

IMPORT_C void QueueConnectL ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const CImIAPPreferences & aIAPPreferences,
const TDesC8 & aSSLDomainName
)

Queue a connect on a socket assuming the socket is successfully opened.

Pre-condition
None
Post-condition
Connection is ready to send and receive data
Since
9.5

Parameters

TRequestStatus & aStatus Asynchronous completion status
const TDesC & anAddressDesc
TInt aPortNum Port number eg. 993, 465, 995.
const CImIAPPreferences & aIAPPreferences IAP connection preferences to be used
const TDesC8 & aSSLDomainName SSL domain name to use for the connection

QueueGenericConnectL(TRequestStatus &, const TDesC &, TInt, const CImIAPPreferences &, const TDesC8 &)

void QueueGenericConnectL ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const CImIAPPreferences & aIAPPreferences,
const TDesC8 & aSSLDomainName
) [private]

Parameters

TRequestStatus & aStatus
const TDesC & anAddressDesc
TInt aPortNum
const CImIAPPreferences & aIAPPreferences
const TDesC8 & aSSLDomainName

QueueReceiveNextTextLine(TRequestStatus &)

IMPORT_C void QueueReceiveNextTextLine ( TRequestStatus & aStatus )

User queues a new request from the socket (unless there's a full line of data in buffer then signal user and there's no need to make a receive request)

Intended Usage : User queues a new request from the socket. Error Condition : None
Since
6.0

Parameters

TRequestStatus & aStatus for asynchronous request

RealReceive(TDes8 &)

void RealReceive ( TDes8 & aDesc ) [private]

Parameters

TDes8 & aDesc

RealSend(const TDesC8 &)

void RealSend ( const TDesC8 & aDesc ) [private]

Parameters

const TDesC8 & aDesc

Receive(TDes8 &)

IMPORT_C TInt Receive ( TDes8 & rDes )

Parameters

TDes8 & rDes

Receive(TRequestStatus &, TDes8 &)

IMPORT_C void Receive ( TRequestStatus & aStatus,
TDes8 & rDes
)

Parameters

TRequestStatus & aStatus
TDes8 & rDes

ReceiveBinaryData(TRequestStatus &, TDes8 &, TInt)

IMPORT_C void ReceiveBinaryData ( TRequestStatus & aStatus,
TDes8 & aDes,
TInt aLen
)
Intended Usage : Users queue a request for received data Error Condition : None
Since
6.0
Post-condition
aDes will be filled with received data of aLen. ReceiveBinaryData should be called after Send.

Parameters

TRequestStatus & aStatus Asynchronous completion status
TDes8 & aDes is the aData to be received
TInt aLen is the length of the data the user wants to read

SSLQueueConnectL(TRequestStatus &, const TDesC &, TInt, const CImIAPPreferences &, TBool)

IMPORT_C void SSLQueueConnectL ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const CImIAPPreferences & aIAPPreferences,
TBool aEnableTimeout = ETrue
)
Intended Usage : Queue a wrapped SSL connect on an socket assuming the socket is successfully opened. Error Condition : KErrNoMemory, EImskSocketOpen
Since
7.0s
Pre-condition
None
Post-condition
connection is ready to send and receive data.

Parameters

TRequestStatus & aStatus Asynchronous completion status
const TDesC & anAddressDesc is the IP address
TInt aPortNum is the port number eg. 993, 465, 995.
const CImIAPPreferences & aIAPPreferences is the IAP connection preference to be used
TBool aEnableTimeout = ETrue Not used

SSLQueueConnectL(TRequestStatus &, const TDesC &, TInt, const CImIAPPreferences &, const TDesC8 &)

IMPORT_C void SSLQueueConnectL ( TRequestStatus & aStatus,
const TDesC & anAddressDesc,
TInt aPortNum,
const CImIAPPreferences & aIAPPreferences,
const TDesC8 & aSSLDomainName
)

Queue a wrapped SSL connect on a socket assuming the socket is successfully opened.

Pre-condition
None
Post-condition
Connection is ready to send and receive data
Since
9.5

Parameters

TRequestStatus & aStatus Asynchronous completion status
const TDesC & anAddressDesc
TInt aPortNum Port number eg. 993, 465, 995.
const CImIAPPreferences & aIAPPreferences IAP connection preferences to be used
const TDesC8 & aSSLDomainName SSL domain name to use for the connection

Send(TRequestStatus &, const TDesC8 &)

IMPORT_C void Send ( TRequestStatus & aStatus,
const TDesC8 & aDesc
)
Intended Usage : To send data. Error Condition : None
Since
6.0
Post-condition
None

Parameters

TRequestStatus & aStatus Asynchronous completion status
const TDesC8 & aDesc is the aData to be sent

Send(TRequestStatus &, TRefByValue< const TDesC8 >, ...)

IMPORT_C void Send ( TRequestStatus & aStatus,
TRefByValue < const TDesC8 > aFmt,
...
)

Parameters

TRequestStatus & aStatus
TRefByValue < const TDesC8 > aFmt
...

Send(const TDesC8 &)

IMPORT_C TInt Send ( const TDesC8 & aDesc )

Parameters

const TDesC8 & aDesc

Send(TRefByValue< const TDesC8 >, ...)

IMPORT_C TInt Send ( TRefByValue < const TDesC8 > aFmt,
...
)

Parameters

TRefByValue < const TDesC8 > aFmt
...

SendQueueReceive(TRequestStatus &, const TDesC8 &)

IMPORT_C void SendQueueReceive ( TRequestStatus & aStatus,
const TDesC8 & aDesc
)
Intended Usage : To send data and queue a receive. Error Condition : None
Since
6.0
Post-condition
Sends the data and queues a receive. GetCurrentTextLine should be called after this method to read received data

Parameters

TRequestStatus & aStatus Asynchronous completion status
const TDesC8 & aDesc is the aData to be sent

SendQueueReceive(TRequestStatus &, TRefByValue< const TDesC8 >, ...)

IMPORT_C void SendQueueReceive ( TRequestStatus & aStatus,
TRefByValue < const TDesC8 > aFmt,
...
)

Parameters

TRequestStatus & aStatus
TRefByValue < const TDesC8 > aFmt
...

SendQueueReceiveWithTimeout(TRequestStatus &, TInt, const TDesC8 &)

IMPORT_C void SendQueueReceiveWithTimeout ( TRequestStatus & aStatus,
TInt aIdleTime,
const TDesC8 & aDesc
)

Parameters

TRequestStatus & aStatus
TInt aIdleTime
const TDesC8 & aDesc

SendReceive(const TDesC8 &)

IMPORT_C TInt SendReceive ( const TDesC8 & aDesc )

Parameters

const TDesC8 & aDesc

SendWithTimeout(TRequestStatus &, TInt, const TDesC8 &)

IMPORT_C void SendWithTimeout ( TRequestStatus & aStatus,
TInt aIdleTime,
const TDesC8 & aDesc
)

Parameters

TRequestStatus & aStatus
TInt aIdleTime
const TDesC8 & aDesc

SetPrimaryTextServerSession(CImTextServerSession *)

IMPORT_C void SetPrimaryTextServerSession ( CImTextServerSession * aPrimaryTextServerSession )

Parameters

CImTextServerSession * aPrimaryTextServerSession

SetSSLTLSResponseL(const TDesC8 &)

IMPORT_C void SetSSLTLSResponseL ( const TDesC8 & aDesc )

This method should be called before Send/SendQueueReceive() TLS command is sent.

Intended Usage : To use for secure connection. Error Condition : KErrNoMemory
Since
6.2
Pre-condition
aDesc cannot be zero length
leave
EImskNoTLSResponseString
Post-condition
iTLSResponse is filled with aDesc contents

Parameters

const TDesC8 & aDesc is the positive response the MTM expects from the connected server for TLS command. e.g. OK, +OK, 220 etc..

SetSecurity(TBool, TBool)

IMPORT_C TInt SetSecurity ( TBool aSecurityOn,
TBool aUnattendedMode = FALSE
)

Parameters

TBool aSecurityOn
TBool aUnattendedMode = FALSE

SocketConnect()

void SocketConnect ( ) [private]

SocketIdle()

void SocketIdle ( )
Intended Usage : disconnects the socket and notifies the observer when the socket has been idle for some time
Since
7.0s

TimeOut()

void TimeOut ( )

Member Enumerations Documentation

Enum TImOperationMode

Enumerators

EImServerMode
EImClientMode

Enum TImSecurityState

Enumerators

EImSecurityStateOff
EImSecurityStateOn
EImSecurityStateFailed

Enum TImSendReceiveState

Enumerators

EImInactive
EImSending
EImReceiving
EImReceivingBinaryData
EImSendingQueueReceive
EImSuspended

Enum TImSocketState

Enumerators

EImClosed
EImResolve
EImConnect
EImSendReceive
EImDialUsingOverride
EImTLSHandShakeStarted
EImSendReceiveTimedOut

Member Data Documentation

TPtrC iAddressDesc

TPtrC iAddressDesc [private]

server address

HBufC8 * iBuffer

HBufC8 * iBuffer [private]

TBool iClientOwnsConnection

TBool iClientOwnsConnection [private]

CImConnect * iConnect

CImConnect * iConnect [private]

TUint32 iCurrentIAPcache

TUint32 iCurrentIAPcache [private]

TImLineType iCurrentLineType

TImLineType iCurrentLineType [private]

RHostResolver iHostResolver

RHostResolver iHostResolver [private]

handle to Hostresolver

TNameEntry iHostent

TNameEntry iHostent [private]

result of the host resolver

TBool iIAPCached

TBool iIAPCached [private]

Used to find if IAP is cached

const CImIAPPreferences * iIAPPreferences

const CImIAPPreferences * iIAPPreferences [private]

TSockXfrLength iLen

TSockXfrLength iLen [private]

TBuf< KImskIPAddressLen > iLocalName

TBuf < KImskIPAddressLen > iLocalName [private]

IP address name

CImLog * iLog

CImLog * iLog [private]

to log connection data

TBool iPerformLogging

TBool iPerformLogging [private]

TInt iPortNum

TInt iPortNum [private]

port number e.g. 25 for SMTP, 143 for IMAP and 110 for POP

CImTextServerSession * iPrimaryTextServerSession

CImTextServerSession * iPrimaryTextServerSession [private]

TBool iReadTLSResponse

TBool iReadTLSResponse [private]

internal flag to read tls response

TImMailBuffer iReceive

TImMailBuffer iReceive [private]

data returned by the socket

TDes8 * iReceiveData

TDes8 * iReceiveData [private]

TTimeIntervalMicroSeconds32 iReceiveIdleTime

TTimeIntervalMicroSeconds32 iReceiveIdleTime [private]

TTimeIntervalMicroSeconds32 iReceiveShortIdleTime

TTimeIntervalMicroSeconds32 iReceiveShortIdleTime [private]

HBufC8 * iSSLDomainName

HBufC8 * iSSLDomainName [private]

SSL domain name for secure sockets

CSecureSocket * iSecureSocket

CSecureSocket * iSecureSocket [private]

handle to secure socket for SSL/TLS connection

TImSecurityState iSecurityState

TImSecurityState iSecurityState [private]

secure state i.e to use Secure socket

TTimeIntervalMicroSeconds32 iSendIdleTime

TTimeIntervalMicroSeconds32 iSendIdleTime [private]

TImSendReceiveState iSendReceive

TImSendReceiveState iSendReceive [private]

TTimeIntervalMicroSeconds32 iSendShortIdleTime

TTimeIntervalMicroSeconds32 iSendShortIdleTime [private]

A shorter idle timeout, used when a fast response is expected

HBufC8 * iSentData

HBufC8 * iSentData [private]

RSocketServ iServ

RSocketServ iServ [private]

handle to RSocketServ

RSocket iSocket

RSocket iSocket [private]

handle to the socket

TBool iSocketIdleTimeSet

TBool iSocketIdleTimeSet [private]

CImSocketIdleTimer * iSocketIdleTimer

CImSocketIdleTimer * iSocketIdleTimer [private]

TImSocketState iState

TImSocketState iState [private]

HBufC8 * iTLSResponse

HBufC8 * iTLSResponse [private]

response for different mail protocols like 220,+OK, OK, BAD

TBool iWrappedSocket

TBool iWrappedSocket [private]