CFavouritesItemImpl Class Reference

class CFavouritesItemImpl : public CBase

Implementation class behind proxy CFavouritesItem.

Inherits from

Public Member Functions
~CFavouritesItemImpl()
TInt32 ContextId()
voidExternalizeL(RWriteStream &)
voidExternalizeUpdateDeltaL(RWriteStream &)
voidInternalizeL(RReadStream &)
voidInternalizeUpdateDeltaL(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()
voidSetContextId(TInt32)
voidSetHidden(TBool)
voidSetNameL(const TDesC &)
voidSetParentFolder(TInt)
voidSetPasswordL(const TDesC &)
voidSetType(CFavouritesItem::TType)
voidSetUrlL(const TDesC &)
voidSetUserNameL(const TDesC &)
voidSetWapAp(const TFavouritesWapAp &)
CFavouritesItem::TType Type()
TInt Uid()
const TDesC &Url()
const TDesC &UserName()
TFavouritesWapAp WapAp()
CFavouritesItemImpl &operator=(const CFavouritesItemImpl &)
Protected Member Functions
CFavouritesItemImpl()
voidConstructL()
Private Member Functions
voidBufFromStreamL(HBufC *&, RReadStream &)
voidBufToStreamL(const TDesC &, RWriteStream &)
TBool IsValid()
TBool IsValidName(const TDesC &)
TInt MakeName(const TDesC &, TDes &)
voidSetBufL(HBufC *&, const TDesC &, TInt)
voidSetFactoryItem(TBool)
voidSetModified(TTime)
voidSetReadOnly(TBool)
voidSetUid(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 &)

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

Internalize HBufC* member from a stream.

Parameters

HBufC *& aBufBuffer.
RReadStream & aStreamThe stream to internalize from.

BufToStreamL(const TDesC &, RWriteStream &)

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

Externalize descriptor member to a stream.

Parameters

const TDesC & aBufBuffer.
RWriteStream & aStreamThe stream to externalize to.

ConstructL()

voidConstructL()[protected]

Second-phase constructor.

ContextId()

TInt32 ContextId()const [inline]

Get context id associated with this item.

ExternalizeL(RWriteStream &)

voidExternalizeL(RWriteStream &aStream)const

Externalize into a stream.

Parameters

RWriteStream & aStreamThe stream to externalize to.

ExternalizeUpdateDeltaL(RWriteStream &)

voidExternalizeUpdateDeltaL(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 & aStreamThe stream to externalize to.

InternalizeL(RReadStream &)

voidInternalizeL(RReadStream &aStream)

Internalize from a stream.

Parameters

RReadStream & aStreamThe stream to externalize from.

InternalizeUpdateDeltaL(RReadStream &)

voidInternalizeUpdateDeltaL(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 & aStreamThe 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 & aSourceThe string to create name from.
TDes & aTargetResulting 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:
  • Last modification time is not available in database (old databases); or

  • Engine does not support this feature. Note that zero means Modified().Int64() == 0, and not Time::NullTTime().

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)

voidSetBufL(HBufC *&aBuf,
const TDesC &aDesc,
TIntaMaxLength
)[private]

Set buffer from string. Leaves for exceeding aMaxLength.

Parameters

HBufC *& aBufBuffer.
const TDesC & aDescDescriptor to set from.
TInt aMaxLengthMax length.

SetContextId(TInt32)

voidSetContextId(TInt32aContextId)[inline]

Set context id of the item.

Parameters

TInt32 aContextIdThe context id to be set.

SetFactoryItem(TBool)

voidSetFactoryItem(TBoolaFactoryItem)[private, inline]

Set factory item flag of the item.

Parameters

TBool aFactoryItemThe factory item flag to be set.

SetHidden(TBool)

voidSetHidden(TBoolaHidden)[inline]

Set hidden value of the item.

Parameters

TBool aHiddenThe hidden value to be set.

SetModified(TTime)

voidSetModified(TTimeaModified)[private, inline]

Set last modification time of the item.

Parameters

TTime aModified

SetNameL(const TDesC &)

voidSetNameL(const TDesC &aName)

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

Parameters

const TDesC & aNameThe name to be set.

SetParentFolder(TInt)

voidSetParentFolder(TIntaId)[inline]

Set parent folder.

Parameters

TInt aIdThe unique id of the parent folder.

SetPasswordL(const TDesC &)

voidSetPasswordL(const TDesC &aPassword)[inline]

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

Parameters

const TDesC & aPasswordThe password to be set.

SetReadOnly(TBool)

voidSetReadOnly(TBoolaReadOnly)[private, inline]

Set read-only flag of the item.

Parameters

TBool aReadOnlyThe read-only flag to be set.

SetType(CFavouritesItem::TType)

voidSetType(CFavouritesItem::TTypeaType)[inline]

Set item type (item or folder).

Parameters

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

SetUid(TInt)

voidSetUid(TIntaUid)[private, inline]

Set unique id of the item.

Parameters

TInt aUidThe unique id to be set.

SetUrlL(const TDesC &)

voidSetUrlL(const TDesC &aUrl)[inline]

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

Parameters

const TDesC & aUrlThe URL to be set.

SetUserNameL(const TDesC &)

voidSetUserNameL(const TDesC &aUserName)[inline]

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

Parameters

const TDesC & aUserNameThe username to be set.

SetWapAp(const TFavouritesWapAp &)

voidSetWapAp(const TFavouritesWapAp &aAccessPoint)[inline]

Set WAP Access Point of the item.

Parameters

const TFavouritesWapAp & aAccessPointThe 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 & aCopyFromAssign 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]