CSuplConnection Class Reference

class CSuplConnection : public CActive

CSuplConnection is a wrapper around the underlying socket SUPL Session uses this object to send

This provides the methods to create and destroy for SUPL Connection Provides method to handle incoming packets from the network

EPosSuplProtocolHandlerPlugin.dll
Since
Series 60 3.1M //e.g. Series 60 3.0

Inherits from

Public Member Functions
IMPORT_C voidCancelConnect(TRequestStatus &)
IMPORT_C voidCancelListenToMessages()
IMPORT_C voidCancelSend(TRequestStatus &)
IMPORT_C voidCloseConnection()
IMPORT_C voidConnect(TRequestStatus &)
voidDecrRefCount()
voidDestroy()
IMPORT_C TIntGetLocalIPAddress(TInetAddr &)
IMPORT_C TIntGetPortNumberUsed()
voidGetPskL(const HBufC8 *, HBufC8 *&, HBufC8 *&)
const TDesC &HostAddress()
voidIncRefCount()
IMPORT_C TIntListenToMessages()
CSuplConnection *NewL(RSocketServ &, const TDesC &, const TUint, const TInt, MSuplPacketNotifier *)
CSuplConnection *NewL(RSocketServ &, const TDesC &, const TUint, const TInt, TBool, TBool, MSuplPacketNotifier *)
TUint Port()
TInt RefCount()
IMPORT_C voidSend(const TDesC8 &, TRequestStatus &)
voidTimerExpired()
Protected Member Functions
~CSuplConnection()
voidCheckForOutstandingPackets()
voidCompleteConnectCancel(TRequestStatus &)
voidCompleteConnectRequests(TInt)
voidConnect()
voidConnectIAP()
voidDoCancel()
voidMakeSecureConnection()
voidRunL()
Private Member Functions
CSuplConnection(RSocketServ &)
voidConstructL(const TDesC &, const TUint, const TInt, MSuplPacketNotifier *)
voidConstructL(const TDesC &, const TUint, const TInt, TBool, TBool, MSuplPacketNotifier *)
voidGeneratePskIdentityL(CRepository *, TInt, HBufC8 *&)
voidGeneratePskKeyL(CRepository *, const TDesC8 &, HBufC8 *&, TInt)
voidGeneratePsk_Identity_KeyL(const TDesC8 &, const TDesC8 &, HBufC8 *&, HBufC8 *&)
voidLogPskKeyInfoL(const HBufC8 *, HBufC8 *, HBufC8 *)
voidPrintHex(const TDesC8 &, TInt)
voidSetVariation()
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()
Protected Member Enumerations
enumTConnectionState {
ENotConnected, ERetriveIAP, EConnecting, EConnected, EMakingSecureConn, ESecureHandShake, ELookingUp, EFailure
}
Inherited Enumerations
CActive:TPriority
Private Attributes
TInetAddr iAddress
RPointerArray< TRequestStatus >iConnArray
TInt iConnectClients
TBool iConnectStarted
RConnection iConnection
TBool iFirstPkt
TBuf< KMaxHostAddressLen >iHostAddress
TInt iIAPId
TInt iListenCount
TNameEntry iNameEntry
TPtrC8 iPacket
CSuplPacketInfo *iPkt
RPointerArray< CSuplPacketInfo >iPktArray
TUint iPort
TBool iPskTLSUsage
TInt iRefCount
TRequestStatus *iReqStatus
RHostResolver iResolver
TBool iSendInProgress
RSocket iSocket
CSuplSocketReader *iSocketReader
RSocketServ &iSocketServ
TBool iStartedListen
TConnectionState iState
CSuplSocketTimer *iTimer
CSecureSocket *iTlsSocket
CSuplConnTrace *iTrace
TBool iVariantEnabled
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CSuplConnection(RSocketServ &)

CSuplConnection(RSocketServ &aSocketServ)[private]

C++ default constructor.

Parameters

RSocketServ & aSocketServ

~CSuplConnection()

~CSuplConnection()[protected, virtual]

Making Destructor protected so that no class other than CSuplCommunicationManager is able to delete CSuplConnection.

Member Functions Documentation

CancelConnect(TRequestStatus &)

IMPORT_C voidCancelConnect(TRequestStatus &aStatus)
CancelConnect.
Since
Series 60 5.0

Parameters

TRequestStatus & aStatus

CancelListenToMessages()

IMPORT_C voidCancelListenToMessages()

CancelSend(TRequestStatus &)

IMPORT_C voidCancelSend(TRequestStatus &aStatus)
CancelSend.
Since
Series 60 3.1

Parameters

TRequestStatus & aStatus

CheckForOutstandingPackets()

voidCheckForOutstandingPackets()[protected]

CloseConnection()

IMPORT_C voidCloseConnection()

CompleteConnectCancel(TRequestStatus &)

voidCompleteConnectCancel(TRequestStatus &aStatus)[protected]

Parameters

TRequestStatus & aStatus

CompleteConnectRequests(TInt)

voidCompleteConnectRequests(TInterr)[protected]

Parameters

TInt err

Connect(TRequestStatus &)

IMPORT_C voidConnect(TRequestStatus &aStatus)
Connect.
Since
Series 60 3.1

Parameters

TRequestStatus & aStatus

Connect()

voidConnect()[protected]
A method that makes Socket Connection.
Since
Series 60 3.1

ConnectIAP()

voidConnectIAP()[protected]
A method that makes Socket Connection.
Since
Series 60 3.1

ConstructL(const TDesC &, const TUint, const TInt, MSuplPacketNotifier *)

voidConstructL(const TDesC &aHostAddress,
const TUintaPort,
const TIntaIAPId,
MSuplPacketNotifier *aNotifier
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

const TDesC & aHostAddress
const TUint aPort
const TInt aIAPId
MSuplPacketNotifier * aNotifier

ConstructL(const TDesC &, const TUint, const TInt, TBool, TBool, MSuplPacketNotifier *)

voidConstructL(const TDesC &aHostAddress,
const TUintaPort,
const TIntaIAPId,
TBoolaTls,
TBoolaPskTls,
MSuplPacketNotifier *aNotifier
)[private]

Parameters

const TDesC & aHostAddress
const TUint aPort
const TInt aIAPId
TBool aTls
TBool aPskTls
MSuplPacketNotifier * aNotifier

DecrRefCount()

voidDecrRefCount()
DecrRefCount.
Since
Series 60 3.1

Destroy()

voidDestroy()
Destroy.
Since
Series 60 3.1

DoCancel()

voidDoCancel()[protected, virtual]

From CActive To cancel the asynchronous requests

GeneratePskIdentityL(CRepository *, TInt, HBufC8 *&)

voidGeneratePskIdentityL(CRepository *aRepository,
TIntaKeyVer,
HBufC8 *&aPskIdentity
)[private]

Parameters

CRepository * aRepository
TInt aKeyVer
HBufC8 *& aPskIdentity

GeneratePskKeyL(CRepository *, const TDesC8 &, HBufC8 *&, TInt)

voidGeneratePskKeyL(CRepository *aRepository,
const TDesC8 &aPassKey,
HBufC8 *&aPskKey,
TIntaSLPKeyVersion
)[private]

Parameters

CRepository * aRepository
const TDesC8 & aPassKey
HBufC8 *& aPskKey
TInt aSLPKeyVersion

GeneratePsk_Identity_KeyL(const TDesC8 &, const TDesC8 &, HBufC8 *&, HBufC8 *&)

voidGeneratePsk_Identity_KeyL(const TDesC8 &aVer,
const TDesC8 &aPassword,
HBufC8 *&aPskIdentity,
HBufC8 *&aPskKey
)[private]

Parameters

const TDesC8 & aVer
const TDesC8 & aPassword
HBufC8 *& aPskIdentity
HBufC8 *& aPskKey

GetLocalIPAddress(TInetAddr &)

IMPORT_C TIntGetLocalIPAddress(TInetAddr &aTInetAddress)
GetLocalIPAddress.
Since
Series 60 3.1

Parameters

TInetAddr & aTInetAddress

GetPortNumberUsed()

IMPORT_C TIntGetPortNumberUsed()

GetPskL(const HBufC8 *, HBufC8 *&, HBufC8 *&)

voidGetPskL(const HBufC8 *aPskIdentityHint,
HBufC8 *&aPskIdentity,
HBufC8 *&aPskKey
)

Parameters

const HBufC8 * aPskIdentityHint
HBufC8 *& aPskIdentity
HBufC8 *& aPskKey

HostAddress()

const TDesC &HostAddress()
HostAddress.
Since
Series 60 3.1

IncRefCount()

voidIncRefCount()
IncRefCount.
Since
Series 60 3.1

ListenToMessages()

IMPORT_C TIntListenToMessages()
ListenToMessages.
Since
Series 60 3.1

LogPskKeyInfoL(const HBufC8 *, HBufC8 *, HBufC8 *)

voidLogPskKeyInfoL(const HBufC8 *aPskIdentityHint,
HBufC8 *aPskIdentity,
HBufC8 *aPskKey
)[private]

Parameters

const HBufC8 * aPskIdentityHint
HBufC8 * aPskIdentity
HBufC8 * aPskKey

MakeSecureConnection()

voidMakeSecureConnection()[protected]
A method that makes Socket Secure.
Since
Series 60 3.1

NewL(RSocketServ &, const TDesC &, const TUint, const TInt, MSuplPacketNotifier *)

CSuplConnection *NewL(RSocketServ &aSocketServ,
const TDesC &aHostAddress,
const TUintaPort,
const TIntaIAPId,
MSuplPacketNotifier *aNotifier
)[static]

Two-phased constructor.

Parameters

RSocketServ & aSocketServ
const TDesC & aHostAddress
const TUint aPort
const TInt aIAPId
MSuplPacketNotifier * aNotifier

NewL(RSocketServ &, const TDesC &, const TUint, const TInt, TBool, TBool, MSuplPacketNotifier *)

CSuplConnection *NewL(RSocketServ &aSocketServ,
const TDesC &aHostAddress,
const TUintaPort,
const TIntaIAPId,
TBoolaTls,
TBoolaPskTls,
MSuplPacketNotifier *aNotifier
)[static]

Parameters

RSocketServ & aSocketServ
const TDesC & aHostAddress
const TUint aPort
const TInt aIAPId
TBool aTls
TBool aPskTls
MSuplPacketNotifier * aNotifier

Port()

TUint Port()
Port.
Since
Series 60 3.1

PrintHex(const TDesC8 &, TInt)

voidPrintHex(const TDesC8 &aBuffer,
TIntaLine
)[private]

Parameters

const TDesC8 & aBuffer
TInt aLine

RefCount()

TInt RefCount()
RefCount.
Since
Series 60 3.1

RunL()

voidRunL()[protected, virtual]

From CActive To handle request completion

Send(const TDesC8 &, TRequestStatus &)

IMPORT_C voidSend(const TDesC8 &aPacket,
TRequestStatus &aStatus
)
Send.
Since
Series 60 3.1

Parameters

const TDesC8 & aPacketpacket to be sent
TRequestStatus & aStatus

SetVariation()

voidSetVariation()[private]

TimerExpired()

voidTimerExpired()

Member Enumerations Documentation

Enum TConnectionState

Tracks the state of this object through the connection process ENotConnected The initial (idle) state EConnecting A connect request is pending with the socket server EConnected A connection has been established EMakingSecureConn Started making the Socket Secure ESecureHandShake Client Handshake for the secure connection is in progress ELookingUp A DNS lookup request is pending with the socket server EFailue Indicates failure in any of the asynchronous operations

Enumerators

ENotConnected
ERetriveIAP
EConnecting
EConnected
EMakingSecureConn
ESecureHandShake
ELookingUp
EFailure

Member Data Documentation

TInetAddr iAddress

TInetAddr iAddress[private]

RPointerArray< TRequestStatus > iConnArray

RPointerArray< TRequestStatus >iConnArray[private]

TInt iConnectClients

TInt iConnectClients[private]

TBool iConnectStarted

TBool iConnectStarted[private]

RConnection iConnection

RConnection iConnection[private]

TBool iFirstPkt

TBool iFirstPkt[private]

TBuf< KMaxHostAddressLen > iHostAddress

TBuf< KMaxHostAddressLen >iHostAddress[private]

TInt iIAPId

TInt iIAPId[private]

TInt iListenCount

TInt iListenCount[private]

TNameEntry iNameEntry

TNameEntry iNameEntry[private]

TPtrC8 iPacket

TPtrC8 iPacket[private]

CSuplPacketInfo * iPkt

CSuplPacketInfo *iPkt[private]

RPointerArray< CSuplPacketInfo > iPktArray

RPointerArray< CSuplPacketInfo >iPktArray[private]

TUint iPort

TUint iPort[private]

TBool iPskTLSUsage

TBool iPskTLSUsage[private]

TInt iRefCount

TInt iRefCount[private]

TRequestStatus * iReqStatus

TRequestStatus *iReqStatus[private]

RHostResolver iResolver

RHostResolver iResolver[private]

TBool iSendInProgress

TBool iSendInProgress[private]

RSocket iSocket

RSocket iSocket[private]

CSuplSocketReader * iSocketReader

CSuplSocketReader *iSocketReader[private]

RSocketServ & iSocketServ

RSocketServ &iSocketServ[private]

TBool iStartedListen

TBool iStartedListen[private]

TConnectionState iState

TConnectionState iState[private]

CSuplSocketTimer * iTimer

CSuplSocketTimer *iTimer[private]

CSecureSocket * iTlsSocket

CSecureSocket *iTlsSocket[private]

CSuplConnTrace * iTrace

CSuplConnTrace *iTrace[private]

TBool iVariantEnabled

TBool iVariantEnabled[private]