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 void CancelConnect ( TRequestStatus &)
IMPORT_C void CancelListenToMessages ()
IMPORT_C void CancelSend ( TRequestStatus &)
IMPORT_C void CloseConnection ()
IMPORT_C void Connect ( TRequestStatus &)
void DecrRefCount ()
void Destroy ()
IMPORT_C TInt GetLocalIPAddress ( TInetAddr &)
IMPORT_C TInt GetPortNumberUsed ()
void GetPskL (const HBufC8 *, HBufC8 *&, HBufC8 *&)
const TDesC & HostAddress ()
void IncRefCount ()
IMPORT_C TInt ListenToMessages ()
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 void Send (const TDesC8 &, TRequestStatus &)
void TimerExpired ()
Protected Member Functions
~CSuplConnection ()
void CheckForOutstandingPackets ()
void CompleteConnectCancel ( TRequestStatus &)
void CompleteConnectRequests ( TInt )
void Connect ()
void ConnectIAP ()
void DoCancel ()
void MakeSecureConnection ()
void RunL ()
Private Member Functions
CSuplConnection ( RSocketServ &)
void ConstructL (const TDesC &, const TUint , const TInt , MSuplPacketNotifier *)
void ConstructL (const TDesC &, const TUint , const TInt , TBool , TBool , MSuplPacketNotifier *)
void GeneratePskIdentityL ( CRepository *, TInt , HBufC8 *&)
void GeneratePskKeyL ( CRepository *, const TDesC8 &, HBufC8 *&, TInt )
void GeneratePsk_Identity_KeyL (const TDesC8 &, const TDesC8 &, HBufC8 *&, HBufC8 *&)
void LogPskKeyInfoL (const HBufC8 *, HBufC8 *, HBufC8 *)
void PrintHex (const TDesC8 &, TInt )
void SetVariation ()
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
enum TConnectionState {
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 void CancelConnect ( TRequestStatus & aStatus )
CancelConnect.
Since
Series 60 5.0

Parameters

TRequestStatus & aStatus

CancelListenToMessages()

IMPORT_C void CancelListenToMessages ( )

CancelSend(TRequestStatus &)

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

Parameters

TRequestStatus & aStatus

CheckForOutstandingPackets()

void CheckForOutstandingPackets ( ) [protected]

CloseConnection()

IMPORT_C void CloseConnection ( )

CompleteConnectCancel(TRequestStatus &)

void CompleteConnectCancel ( TRequestStatus & aStatus ) [protected]

Parameters

TRequestStatus & aStatus

CompleteConnectRequests(TInt)

void CompleteConnectRequests ( TInt err ) [protected]

Parameters

TInt err

Connect(TRequestStatus &)

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

Parameters

TRequestStatus & aStatus

Connect()

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

ConnectIAP()

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

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

void ConstructL ( const TDesC & aHostAddress,
const TUint aPort,
const TInt aIAPId,
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 *)

void ConstructL ( const TDesC & aHostAddress,
const TUint aPort,
const TInt aIAPId,
TBool aTls,
TBool aPskTls,
MSuplPacketNotifier * aNotifier
) [private]

Parameters

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

DecrRefCount()

void DecrRefCount ( )
DecrRefCount.
Since
Series 60 3.1

Destroy()

void Destroy ( )
Destroy.
Since
Series 60 3.1

DoCancel()

void DoCancel ( ) [protected, virtual]

From CActive To cancel the asynchronous requests

GeneratePskIdentityL(CRepository *, TInt, HBufC8 *&)

void GeneratePskIdentityL ( CRepository * aRepository,
TInt aKeyVer,
HBufC8 *& aPskIdentity
) [private]

Parameters

CRepository * aRepository
TInt aKeyVer
HBufC8 *& aPskIdentity

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

void GeneratePskKeyL ( CRepository * aRepository,
const TDesC8 & aPassKey,
HBufC8 *& aPskKey,
TInt aSLPKeyVersion
) [private]

Parameters

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

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

void GeneratePsk_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 TInt GetLocalIPAddress ( TInetAddr & aTInetAddress )
GetLocalIPAddress.
Since
Series 60 3.1

Parameters

TInetAddr & aTInetAddress

GetPortNumberUsed()

IMPORT_C TInt GetPortNumberUsed ( )

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

void GetPskL ( 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()

void IncRefCount ( )
IncRefCount.
Since
Series 60 3.1

ListenToMessages()

IMPORT_C TInt ListenToMessages ( )
ListenToMessages.
Since
Series 60 3.1

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

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

Parameters

const HBufC8 * aPskIdentityHint
HBufC8 * aPskIdentity
HBufC8 * aPskKey

MakeSecureConnection()

void MakeSecureConnection ( ) [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 TUint aPort,
const TInt aIAPId,
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 TUint aPort,
const TInt aIAPId,
TBool aTls,
TBool aPskTls,
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)

void PrintHex ( const TDesC8 & aBuffer,
TInt aLine
) [private]

Parameters

const TDesC8 & aBuffer
TInt aLine

RefCount()

TInt RefCount ( )
RefCount.
Since
Series 60 3.1

RunL()

void RunL ( ) [protected, virtual]

From CActive To handle request completion

Send(const TDesC8 &, TRequestStatus &)

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

Parameters

const TDesC8 & aPacket packet to be sent
TRequestStatus & aStatus

SetVariation()

void SetVariation ( ) [private]

TimerExpired()

void TimerExpired ( )

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]