TCookiePacker Class Reference

class TCookiePacker

TCookiePackedCookie Packs a CCookie's content into a buffer for sending across IPC. Also unpacks the data into a CCookie

Constructor & Destructor Documentation

TCookiePacker(RStringPool)

TCookiePacker ( RStringPool aStringPool )

Parameters

RStringPool aStringPool

Member Functions Documentation

AddDateL(const CCookie &, TDes8 &, TBool)

TInt AddDateL ( const CCookie & aCookie,
TDes8 & aBuffer,
TBool aNoDefaulted = EFalse
) const [private]

Add Date attribute from cookie to the string buffer.

Parameters

const CCookie & aCookie
TDes8 & aBuffer
TBool aNoDefaulted = EFalse

AddStringF(const CCookie::TCookieAttributeName, const CCookie &, TDes8 &, TBool)

TInt AddStringF ( const CCookie::TCookieAttributeName aAttrib,
const CCookie & aCookie,
TDes8 & aBuffer,
TBool aNoDefaulted = EFalse
) const [private]

Add a named (string type) attribute from cookie to the string buffer.

Parameters

const CCookie::TCookieAttributeName aAttrib
const CCookie & aCookie
TDes8 & aBuffer
TBool aNoDefaulted = EFalse

AppendAttributeLength(TInt, TDes8 &)

void AppendAttributeLength ( TInt aLength,
TDes8 & aBuffer
) const [private]

Parameters

TInt aLength
TDes8 & aBuffer

CliPackCookie(TDes8 &, const CCookie &)

TInt CliPackCookie ( TDes8 & aBuffer,
const CCookie & aCookie
) const

Parameters

TDes8 & aBuffer
const CCookie & aCookie

DecreaseNumericValueL(TDes &, const TInt)

TInt DecreaseNumericValueL ( TDes & aBuffer,
const TInt aIndex
) const [private]

Decrease a numeric value in a numeric formatted buffer. (underflow is handled)

Parameters

TDes & aBuffer contains numeric value
const TInt aIndex position where to decrease

DoPackCookie(TDes8 &, const CCookie &, TBool)

TInt DoPackCookie ( TDes8 & aBuffer,
const CCookie & aCookie,
TBool aSevrer
) const [private]

Parameters

TDes8 & aBuffer
const CCookie & aCookie
TBool aSevrer

GetPackedAttributeL(const CCookie::TCookieAttributeName, CCookie &, const TUint8 *&)

void GetPackedAttributeL ( const CCookie::TCookieAttributeName aAttrib,
CCookie & aCookie,
const TUint8 *& aPtrStart
) const [private]

Unpack a named (string type) attribute from the buffer to the cookie.

Parameters

const CCookie::TCookieAttributeName aAttrib
CCookie & aCookie
const TUint8 *& aPtrStart

GetPackedDateAttributeL(CCookie &, const TUint8 *&)

void GetPackedDateAttributeL ( CCookie & aCookie,
const TUint8 *& aPtrStart
) const [private]

Unpack the Date attribute from the buffer to the cookie.

Parameters

CCookie & aCookie
const TUint8 *& aPtrStart

SrvPackCookie(TDes8 &, const CCookie &)

TInt SrvPackCookie ( TDes8 & aBuffer,
const CCookie & aCookie
) const

Parameters

TDes8 & aBuffer
const CCookie & aCookie

TrimNameAndValueL(CCookie &)

void TrimNameAndValueL ( CCookie & aCookie ) const [private]

Trim cookie's name and value if their size is bigger than 4K.

Parameters

CCookie & aCookie identifies the cookie

UnpackCookieL(const TDesC8 &, CCookie &)

void UnpackCookieL ( const TDesC8 & aPtr,
CCookie & aCookie
) const

This method unpacks a cookie from a flat buffer to a cookie object. It is used from both client and server side.

Parameters

const TDesC8 & aPtr
CCookie & aCookie

UnpackCookieL(const TUint8 *&, CCookie &)

void UnpackCookieL ( const TUint8 *& aPtr,
CCookie & aCookie
) const [private]

This method unpacks a cookie from a flat buffer to a cookie object. It is used from both client and server side.

Parameters

const TUint8 *& aPtr
CCookie & aCookie

UnpackCookiesFromBufferL(const TDesC8 &, RPointerArray< CCookie > &)

void UnpackCookiesFromBufferL ( const TDesC8 & aBuffer,
RPointerArray < CCookie > & aCookies
) const

Processes the buffer and inserts cookies into the array.

Parameters

const TDesC8 & aBuffer Buffer to be processed. It contains the cookies in a form that makes it possible to transfer the cookies over client- server boundary,
RPointerArray < CCookie > & aCookies The array that is supposed to contain the cookies.

Member Data Documentation

RStringPool iStringPool

RStringPool iStringPool [private]