Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: ccookie.h

Class CCookie

class CCookie

Support

Supported from 7.0

Description

Encapsulates the attributes of a cookie.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CCookieEncapsulates the attributes of a cookie

Defined in CCookie:
Attribute(), CCookie(), CloseAttribute(), ConstructL(), EComment, ECommentURI, EDiscard, EDomain, EExpires, EMaxAge, EName, EPath, EPort, ESecure, EValue, EVersion, FindAttribute(), FromCookie2(), NewL(), SetAttributeL(), TCookieAttribute, TCookieAttributeName, iAttributes, iSetCookie2, iStringPool, ~CCookie()

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CCookie* NewL(RStringPool aStringPool, RStringF aName, RStringF aValue, TBool aCookie2);

Description

Allocates and constructs a CCookie object.

Parameters

RStringPool aStringPool

A string pool to be used by this cookie

RStringF aName

Name of this cookie

RStringF aValue

Value of this cookie

TBool aCookie2

Flag indicating if this cookie was received in a SetCookie2 header

Return value

CCookie*

Pointer to a fully constructed CCookie


~CCookie()

~CCookie();

Description

Standard destructor

[Top]


Member functions


SetAttributeL()

void SetAttributeL(TCookieAttributeName aAttributeName, THTTPHdrVal aAttributeVal);

Description

Sets an attribute on the cookie.

Adding an attribute that already exists replaces the existing value.

Parameters

TCookieAttributeName aAttributeName

Identifies the attribute

THTTPHdrVal aAttributeVal

The attribute value

Leave codes

System wide error codes


Attribute()

TInt Attribute(TCookieAttributeName aAttributeName, THTTPHdrVal& aAttributeVal) const;

Description

Gets the value of a specified attribute.

Parameters

TCookieAttributeName aAttributeName

Identifies the attribute

THTTPHdrVal& aAttributeVal

On return, the attribute value

Return value

TInt

System wide error codes. KErrNotFound indicates that the cookie doesn't contain the specified attribute.


FromCookie2()

TBool FromCookie2() const;

Description

Tests if this cookie come from a SetCookie2 header, rather than a SetCookie header.

Return value

TBool

True if this cookie was received in SetCookie2 header

[Top]


Member enumerations


Enum TCookieAttributeName

TCookieAttributeName

Description

Enumeration of all the elements of data that make up a cookie, as defined in RFC 2965.

EName

Name of the cookie.

This is mandatory.

EValue

Value associated with the name.

This is mandatory.

EComment

Comment which can be displayed to the user.

ECommentURI

A URI that can be visited for more information.

EDiscard

Flag indicating that the cookie should be discarded.

EDomain

Domain to which this cookie applies.

EMaxAge

Age after which this cookie should be deleted.

EPath

Path to which this cookie applies.

EPort

Port numbers to which this cookie applies.

ESecure

Flag indicating this cookie should only be used for secure transactions.

EVersion

Specification version of the cookie.

EExpires

Time after which this cookie should be deleted.

This applies to Netscape specification cookies only.

[Top]


Internal members


CCookie()

private: CCookie(RStringPool aStringPool, TBool aCookie2);

Description

This member is internal and not intended for use.


ConstructL()

private: void ConstructL(RStringF aName, RStringF aValue);

Description

This member is internal and not intended for use.


CloseAttribute()

private: void CloseAttribute(TCookieAttribute aCookieAttribute);

Description

This member is internal and not intended for use.


FindAttribute()

private: TInt FindAttribute(TCookieAttributeName aAttributeName, TCookieAttribute& aAttribute) const;

Description

This member is internal and not intended for use.


iStringPool

private: RStringPool iStringPool;

Description

This member is internal and not intended for use.


iAttributes

private: RArray<TCookieAttribute> iAttributes;

Description

This member is internal and not intended for use.


iSetCookie2

private: TBool iSetCookie2;

Description

This member is internal and not intended for use.


Class TCookieAttribute

class TCookieAttribute

Description

This member is internal and not intended for use.

Defined in CCookie::TCookieAttribute:
TCookieAttribute(), TCookieAttribute(), iName, iValue

Construction and destruction


TCookieAttribute()

TCookieAttribute(TCookieAttributeName aName, THTTPHdrVal aHdrVal);

Description

This member is internal and not intended for use.


TCookieAttribute()

TCookieAttribute();

Description

This member is internal and not intended for use.

Member data


iName

TCookieAttributeName iName;

Description

This member is internal and not intended for use.


iValue

THTTPHdrVal iValue;

Description

This member is internal and not intended for use.