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(RStringPoolaStringPool)

Parameters

RStringPool aStringPool

Member Functions Documentation

AddDateL(const CCookie &, TDes8 &, TBool)

TInt AddDateL(const CCookie &aCookie,
TDes8 &aBuffer,
TBoolaNoDefaulted = 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::TCookieAttributeNameaAttrib,
const CCookie &aCookie,
TDes8 &aBuffer,
TBoolaNoDefaulted = 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 &)

voidAppendAttributeLength(TIntaLength,
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 TIntaIndex
)const [private]

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

Parameters

TDes & aBuffercontains numeric value
const TInt aIndexposition where to decrease

DoPackCookie(TDes8 &, const CCookie &, TBool)

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

Parameters

TDes8 & aBuffer
const CCookie & aCookie
TBool aSevrer

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

voidGetPackedAttributeL(const CCookie::TCookieAttributeNameaAttrib,
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 *&)

voidGetPackedDateAttributeL(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 &)

voidTrimNameAndValueL(CCookie &aCookie)const [private]

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

Parameters

CCookie & aCookieidentifies the cookie

UnpackCookieL(const TDesC8 &, CCookie &)

voidUnpackCookieL(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 &)

voidUnpackCookieL(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 > &)

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

Processes the buffer and inserts cookies into the array.

Parameters

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

Member Data Documentation

RStringPool iStringPool

RStringPool iStringPool[private]