RExplicitHTTPSession Class Reference

class RExplicitHTTPSession

RExplicitHTTPSession is a wrapper around the RHTTPSession. This handle provides features which allows the application to prompt the user only once for the selection of an IAP during muliple connections within a session.

Public Member Functions
RExplicitHTTPSession()
IMPORT_C voidCancelStart()
IMPORT_C voidClose()
IMPORT_C RHTTPSession &HTTPSession()
IMPORT_C voidOpenL(const TUriC8 &, TUint32, TBool)
IMPORT_C voidStartConnection(TRequestStatus &)
RHTTPSession &operator()()
Private Member Functions
voidBindConnectionL(TUint32, TBool)
TBool UseProxyL(const TDesC8 &, HBufC8 *&)
Private Attributes
RConnection iConnection
RHTTPSession iHTTPSession
TUint32 iIap
RSocketServ iSocketServ

Constructor & Destructor Documentation

RExplicitHTTPSession()

IMPORT_CRExplicitHTTPSession()

A default RExplicitHTTPSession constructor.

Member Functions Documentation

BindConnectionL(TUint32, TBool)

voidBindConnectionL(TUint32aIap,
TBoolaStartConnection
)[private]

Parameters

TUint32 aIap
TBool aStartConnection

CancelStart()

IMPORT_C voidCancelStart()

This API is used to close the RConnection.

Close()

IMPORT_C voidClose()

Closes the handle to RExplicitHTTPSession. It also closes the handle to RHTTPSession, the RConnection and the RSocketServ.

HTTPSession()

IMPORT_C RHTTPSession &HTTPSession()

Returns a handle to the RHTTPSession.

OpenL(const TUriC8 &, TUint32, TBool)

IMPORT_C voidOpenL(const TUriC8 &aUri,
TUint32aIapNumber = 0,
TBoolaStartConnection = ETrue
)

This is a wrapper for the session handle RHTTPSession. It opens a session and sets up the proxies and the network settings using the provided IAP. It also starts a connection using the connection preference settings in CommDb. This function leaves with an appropriate error code if the open failed.

Parameters

const TUriC8 & aUriThis is used to retrieve the proxy record. If no proxy is found for the given URI, then no proxy will be used by default.
TUint32 aIapNumber = 0This carries the IAP. If this is non-zero, it will be set as a connction preference and the user will not be prompted for an IAP.
TBool aStartConnection = ETrueIf set to ETrue, a new connection is started. This by default is set to ETrue.

StartConnection(TRequestStatus &)

IMPORT_C voidStartConnection(TRequestStatus &aStatus)

This API can be used to start an RConnection. It uses the connection preferences set while opening the handle to RExplicitHTTPSession to start the RConnection.

Parameters

TRequestStatus & aStatusOn return, the status of the request, e.g. KErrNone, KErrAlreadyExists.

UseProxyL(const TDesC8 &, HBufC8 *&)

TBool UseProxyL(const TDesC8 &aScheme,
HBufC8 *&aProxyServer
)[private]

Parameters

const TDesC8 & aScheme
HBufC8 *& aProxyServer

operator()()

RHTTPSession &operator()()[inline]

Member Data Documentation

RConnection iConnection

RConnection iConnection[private]

RHTTPSession iHTTPSession

RHTTPSession iHTTPSession[private]

TUint32 iIap

TUint32 iIap[private]

RSocketServ iSocketServ

RSocketServ iSocketServ[private]