CFavouritesItemImpl Class Reference

class CFavouritesItemImpl : public CBase

Implementation class behind proxy CFavouritesItem .

Inherits from

Public Member Functions
~CFavouritesItemImpl ()
TInt32 ContextId ()
void ExternalizeL ( RWriteStream &)
void ExternalizeUpdateDeltaL ( RWriteStream &)
void InternalizeL ( RReadStream &)
void InternalizeUpdateDeltaL ( RReadStream &)
TBool IsFactoryItem ()
TBool IsFolder ()
TBool IsHidden ()
TBool IsItem ()
TBool IsReadOnly ()
TTime Modified ()
const TDesC & Name ()
CFavouritesItemImpl * NewL ()
CFavouritesItemImpl * NewLC ()
TInt ParentFolder ()
const TDesC & Password ()
void SetContextId ( TInt32 )
void SetHidden ( TBool )
void SetNameL (const TDesC &)
void SetParentFolder ( TInt )
void SetPasswordL (const TDesC &)
void SetType ( CFavouritesItem::TType )
void SetUrlL (const TDesC &)
void SetUserNameL (const TDesC &)
void SetWapAp (const TFavouritesWapAp &)
CFavouritesItem::TType Type ()
TInt Uid ()
const TDesC & Url ()
const TDesC & UserName ()
TFavouritesWapAp WapAp ()
CFavouritesItemImpl & operator= (const CFavouritesItemImpl &)
Protected Member Functions
CFavouritesItemImpl ()
void ConstructL ()
Private Member Functions
void BufFromStreamL ( HBufC *&, RReadStream &)
void BufToStreamL (const TDesC &, RWriteStream &)
TBool IsValid ()
TBool IsValidName (const TDesC &)
TInt MakeName (const TDesC &, TDes &)
void SetBufL ( HBufC *&, const TDesC &, TInt )
void SetFactoryItem ( TBool )
void SetModified ( TTime )
void SetReadOnly ( TBool )
void SetUid ( TInt )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
Private Attributes
TInt32 iContextId
TBool iFactoryItem
TBool iHidden
TTime iModified
HBufC * iName
TInt iParentFolder
HBufC * iPassword
TBool iReadOnly
CFavouritesItem::TType iType
TInt iUid
HBufC * iUrl
HBufC * iUserName
TFavouritesWapAp iWapAp

Constructor & Destructor Documentation

CFavouritesItemImpl()

CFavouritesItemImpl ( ) [protected, inline]

C++ constructor.

~CFavouritesItemImpl()

~CFavouritesItemImpl ( ) [virtual]

Destructor.

Member Functions Documentation

BufFromStreamL(HBufC *&, RReadStream &)

void BufFromStreamL ( HBufC *& aBuf,
RReadStream & aStream
) [private]

Internalize HBufC* member from a stream.

Parameters

HBufC *& aBuf Buffer.
RReadStream & aStream The stream to internalize from.

BufToStreamL(const TDesC &, RWriteStream &)

void BufToStreamL ( const TDesC & aBuf,
RWriteStream & aStream
) const [private]

Externalize descriptor member to a stream.

Parameters

const TDesC & aBuf Buffer.
RWriteStream & aStream The stream to externalize to.

ConstructL()

void ConstructL ( ) [protected]

Second-phase constructor.

ContextId()

TInt32 ContextId ( ) const [inline]

Get context id associated with this item.

ExternalizeL(RWriteStream &)

void ExternalizeL ( RWriteStream & aStream ) const

Externalize into a stream.

Parameters

RWriteStream & aStream The stream to externalize to.

ExternalizeUpdateDeltaL(RWriteStream &)

void ExternalizeUpdateDeltaL ( RWriteStream & aStream ) const

Externalize update-delta into a stream. This is a performance oprtimization to reduce data transfer between client and server. When database is updated (using an item), only the changed data is synced back to the item (name, uid, last-mod-time).

Parameters

RWriteStream & aStream The stream to externalize to.

InternalizeL(RReadStream &)

void InternalizeL ( RReadStream & aStream )

Internalize from a stream.

Parameters

RReadStream & aStream The stream to externalize from.

InternalizeUpdateDeltaL(RReadStream &)

void InternalizeUpdateDeltaL ( RReadStream & aStream )

Internalize update-delta from a stream. This is a performance oprtimization to reduce data transfer between client and server. When database is updated (using an item), only the changed data is synced back to the item (name, uid, last-mod-time).

Parameters

RReadStream & aStream The stream to externalize from.

IsFactoryItem()

TBool IsFactoryItem ( ) const [inline]

Check if this is a factory item.

IsFolder()

TBool IsFolder ( ) const [inline]

Check if this is a folder.

IsHidden()

TBool IsHidden ( ) const [inline]

Check if this is hidden.

IsItem()

TBool IsItem ( ) const [inline]

Check if this is an item (not folder).

IsReadOnly()

TBool IsReadOnly ( ) const [inline]

Check if this is a read-only in database. Note that ETrue value does not prevent modifying this CFavouritesItemImpl object.

IsValid()

TBool IsValid ( ) const [private]
Validate the item.
  • For all kinds: valid name required.

  • For items: URL must be present.

  • For folders: URL, Username, Password must be empty; WAP Access Point must not be specified.

IsValidName(const TDesC &)

TBool IsValidName ( const TDesC & aName ) [private, static]

Check if aName is a valid bookmark name.

Parameters

const TDesC & aName

MakeName(const TDesC &, TDes &)

TInt MakeName ( const TDesC & aSource,
TDes & aTarget
) [private, static]

Create a bookmark name from a string. Leading / trailing whitespace is removed. Note that the resulting name may be zero length (if aSource is made up from whitespace only). In this case the return value is KErrNone, though the name is not valid.

Parameters

const TDesC & aSource The string to create name from.
TDes & aTarget Resulting name is placed here. Previous content is overwritten. Must be large enough to hold the result; the result's length equals to or less than aSource length (i.e. aSource.Length() is enough for aTarget).

Modified()

TTime Modified ( ) const [inline]
Get last modification time (of database entry), universal time. This can be zero if:

Name()

const TDesC & Name ( ) const [inline]

Get the name of this item.

NewL()

CFavouritesItemImpl * NewL ( ) [static]

Two-phased constructor. Leaves on failure.

NewLC()

CFavouritesItemImpl * NewLC ( ) [static]

Two-phased constructor. Leaves on failure.

ParentFolder()

TInt ParentFolder ( ) const [inline]

Get the uid of the parent folder of this item.

Password()

const TDesC & Password ( ) const [inline]

Get password associated with this item.

SetBufL(HBufC *&, const TDesC &, TInt)

void SetBufL ( HBufC *& aBuf,
const TDesC & aDesc,
TInt aMaxLength
) [private]

Set buffer from string. Leaves for exceeding aMaxLength.

Parameters

HBufC *& aBuf Buffer.
const TDesC & aDesc Descriptor to set from.
TInt aMaxLength Max length.

SetContextId(TInt32)

void SetContextId ( TInt32 aContextId ) [inline]

Set context id of the item.

Parameters

TInt32 aContextId The context id to be set.

SetFactoryItem(TBool)

void SetFactoryItem ( TBool aFactoryItem ) [private, inline]

Set factory item flag of the item.

Parameters

TBool aFactoryItem The factory item flag to be set.

SetHidden(TBool)

void SetHidden ( TBool aHidden ) [inline]

Set hidden value of the item.

Parameters

TBool aHidden The hidden value to be set.

SetModified(TTime)

void SetModified ( TTime aModified ) [private, inline]

Set last modification time of the item.

Parameters

TTime aModified

SetNameL(const TDesC &)

void SetNameL ( const TDesC & aName )

Set name of the item. Leading or trailing whitespace is trimmed. Length limit is KFavouritesMaxName (leaves with KErrOverflow).

Parameters

const TDesC & aName The name to be set.

SetParentFolder(TInt)

void SetParentFolder ( TInt aId ) [inline]

Set parent folder.

Parameters

TInt aId The unique id of the parent folder.

SetPasswordL(const TDesC &)

void SetPasswordL ( const TDesC & aPassword ) [inline]

Set password. Length limit is KFavouritesMaxPassword (leaves with KErrOverflow).

Parameters

const TDesC & aPassword The password to be set.

SetReadOnly(TBool)

void SetReadOnly ( TBool aReadOnly ) [private, inline]

Set read-only flag of the item.

Parameters

TBool aReadOnly The read-only flag to be set.

SetType(CFavouritesItem::TType)

void SetType ( CFavouritesItem::TType aType ) [inline]

Set item type (item or folder).

Parameters

CFavouritesItem::TType aType The type to be set. ENone cannot be set (if that is specified, it is ignored).

SetUid(TInt)

void SetUid ( TInt aUid ) [private, inline]

Set unique id of the item.

Parameters

TInt aUid The unique id to be set.

SetUrlL(const TDesC &)

void SetUrlL ( const TDesC & aUrl ) [inline]

Set URL of the item. Length limit is KFavouritesMaxURL (leaves with KErrOverflow).

Parameters

const TDesC & aUrl The URL to be set.

SetUserNameL(const TDesC &)

void SetUserNameL ( const TDesC & aUserName ) [inline]

Set username of the item. Length limit is KFavouritesMaxUserName (leaves with KErrOverflow).

Parameters

const TDesC & aUserName The username to be set.

SetWapAp(const TFavouritesWapAp &)

void SetWapAp ( const TFavouritesWapAp & aAccessPoint ) [inline]

Set WAP Access Point of the item.

Parameters

const TFavouritesWapAp & aAccessPoint The WAP Access point to be set.

Type()

CFavouritesItem::TType Type ( ) const [inline]

Get type of the item (item or folder).

Uid()

TInt Uid ( ) const [inline]

Get unique id of the item.

Url()

const TDesC & Url ( ) const [inline]

Get the URL of this item.

UserName()

const TDesC & UserName ( ) const [inline]

Get the username associated with this item.

WapAp()

TFavouritesWapAp WapAp ( ) const [inline]

Get WAP Access Point id associated with this item.

operator=(const CFavouritesItemImpl &)

CFavouritesItemImpl & operator= ( const CFavouritesItemImpl & aCopyFrom )

Assignment operator.

Parameters

const CFavouritesItemImpl & aCopyFrom Assign from this.

Member Data Documentation

TInt32 iContextId

TInt32 iContextId [private]

TBool iFactoryItem

TBool iFactoryItem [private]

TBool iHidden

TBool iHidden [private]

TTime iModified

TTime iModified [private]

HBufC * iName

HBufC * iName [private]

TInt iParentFolder

TInt iParentFolder [private]

HBufC * iPassword

HBufC * iPassword [private]

TBool iReadOnly

TBool iReadOnly [private]

CFavouritesItem::TType iType

CFavouritesItem::TType iType [private]

TInt iUid

TInt iUid [private]

HBufC * iUrl

HBufC * iUrl [private]

HBufC * iUserName

HBufC * iUserName [private]

TFavouritesWapAp iWapAp

TFavouritesWapAp iWapAp [private]