CFavouritesItem Class Reference

#include <mw/favouritesitem.h>

Link against: favouritesengine.lib

class CFavouritesItem : public CBase

Inherits from

Public Member Enumerations
enumTType { ENone, EItem, EFolder }
Public Member Functions
virtual ~CFavouritesItem()
IMPORT_C voidClearL()
IMPORT_C TInt32ContextId()
voidExternalizeL(RWriteStream &)
voidInternalizeL(RReadStream &)
IMPORT_C TBoolIsFactoryItem()
IMPORT_C TBoolIsFolder()
IMPORT_C TBoolIsHidden()
IMPORT_C TBoolIsItem()
IMPORT_C TBoolIsReadOnly()
IMPORT_C TTimeModified()
IMPORT_C const TPtrCName()
IMPORT_C CFavouritesItem *NewL()
IMPORT_C CFavouritesItem *NewLC()
IMPORT_C TIntParentFolder()
IMPORT_C const TPtrCPassword()
IMPORT_C voidSetContextId(TInt32)
IMPORT_C TBoolSetHidden(TBool)
IMPORT_C voidSetNameL(const TDesC &)
IMPORT_C voidSetParentFolder(TInt)
IMPORT_C voidSetPasswordL(const TDesC &)
IMPORT_C voidSetType(TType)
IMPORT_C voidSetUrlL(const TDesC &)
IMPORT_C voidSetUserNameL(const TDesC &)
IMPORT_C voidSetWapAp(const TFavouritesWapAp &)
IMPORT_C TTypeType()
IMPORT_C TIntUid()
IMPORT_C const TPtrCUrl()
IMPORT_C const TPtrCUserName()
IMPORT_C TFavouritesWapApWapAp()
IMPORT_C CFavouritesItem &operator=(const CFavouritesItem &)
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()

Detailed Description

CFavouritesItem is the base class for representing one favourites entry (item or folder). Instances of this class are used to exchange data between the Favourites Engine and clients using it.

Member Enumeration Documentation

Enum TType

Type of an item (item or folder).

Defines the type of an item (item or folder).

EnumeratorValueDescription
ENone
EItem
EFolder

Constructor & Destructor Documentation

~CFavouritesItem ( )

IMPORT_C~CFavouritesItem()[virtual]
Destructor.
Since
0.9

Member Function Documentation

ClearL ( )

IMPORT_C voidClearL()
Reset the item to default values.
Since
0.9
Return Value
void

ContextId ( )

IMPORT_C TInt32ContextId()const
Get context id associated with this item.
Since
0.9
Return Value
The context id.

ExternalizeL ( RWriteStream & )

voidExternalizeL(RWriteStream &aStream)const
Externalize into a stream.
Since
0.9
Parameters
aStreamThe stream to externalize to.
Return Value
void

InternalizeL ( RReadStream & )

voidInternalizeL(RReadStream &aStream)
Internalize from a stream.
Since
0.9
Parameters
aStreamThe stream to externalize from.
Return Value
void

IsFactoryItem ( )

IMPORT_C TBoolIsFactoryItem()const
Check if this is a factory item.
Since
0.9
Return Value
ETrue if this is a factory item.

IsFolder ( )

IMPORT_C TBoolIsFolder()const
Check if this is a folder.
Since
0.9
Return Value
ETrue if this is a folder.

IsHidden ( )

IMPORT_C TBoolIsHidden()const
Check if this is a hidden.
Since
0.9
Return Value
ETrue if this is hidden.

IsItem ( )

IMPORT_C TBoolIsItem()const
Check if this is an item (not folder).
Since
0.9
Return Value
ETrue if this is an item.

IsReadOnly ( )

IMPORT_C TBoolIsReadOnly()const
Check if this is a read-only in database. Note that ETrue value does not prevent modifying this CFavouritesItem object.
Since
0.9
Return Value
ETrue if this is read-only in database.

Modified ( )

IMPORT_C TTimeModified()const
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().
    Since
    0.9
Return Value
TTime, last modification time

Name ( )

IMPORT_C const TPtrCName()const
Get the name of this item.
Since
0.9
Return Value
The name of this item.

NewL ( )

IMPORT_C CFavouritesItem *NewL()[static]
Two-phased constructor. Leaves on failure.
Since
0.9
Return Value
The constructed item.

NewLC ( )

IMPORT_C CFavouritesItem *NewLC()[static]
Two-phased constructor. Leaves on failure. Places the instance on the cleanup stack.
Since
0.9
Return Value
The constructed item.

ParentFolder ( )

IMPORT_C TIntParentFolder()const
Get the uid of the parent folder of this item.
Since
0.9
Return Value
The unique id of the parent folder.

Password ( )

IMPORT_C const TPtrCPassword()const
Get password associated with this item.
Since
0.9
Return Value
The password.

SetContextId ( TInt32 )

IMPORT_C voidSetContextId(TInt32aContextId)
Set context id of the item.
Since
0.9
Parameters
aContextIdThe context id to be set.
Return Value
void

SetHidden ( TBool )

IMPORT_C TBoolSetHidden(TBoolaHidden)const
Set hidden value of the item.
Since
0.9
Parameters
aHiddenThe hidden value to be set.
Return Value
void

SetNameL ( const TDesC & )

IMPORT_C voidSetNameL(const TDesC &aName)
Set name of the item. Leading or trailing whitespace is trimmed. Length limit is KFavouritesMaxName (leaves with KErrOverflow).
Since
0.9
Parameters
aNameThe name to be set.
Return Value
void

SetParentFolder ( TInt )

IMPORT_C voidSetParentFolder(TIntaId)
Set parent folder.
Since
0.9
Parameters
aIdThe unique id of the parent folder.
Return Value
void

SetPasswordL ( const TDesC & )

IMPORT_C voidSetPasswordL(const TDesC &aPassword)
Set password. Length limit is KFavouritesMaxPassword (leaves with KErrOverflow).
Since
0.9
Parameters
aPasswordThe password to be set.
Return Value
void

SetType ( TType )

IMPORT_C voidSetType(TTypeaType)
Set item type (item or folder).
Since
0.9
Parameters
aTypeThe type to be set. ENone cannot be set (if that is specified, it is ignored).
Return Value
void

SetUrlL ( const TDesC & )

IMPORT_C voidSetUrlL(const TDesC &aUrl)
Set URL of the item.
Since
0.9 Length limit is KFavouritesMaxURL (leaves with KErrOverflow).
Parameters
aUrlThe URL to be set.
Return Value
void

SetUserNameL ( const TDesC & )

IMPORT_C voidSetUserNameL(const TDesC &aUserName)
Set username of the item. Length limit is KFavouritesMaxUserName (leaves with KErrOverflow).
Since
0.9
Parameters
aUserNameThe username to be set.
Return Value
void

SetWapAp ( const TFavouritesWapAp & )

IMPORT_C voidSetWapAp(const TFavouritesWapAp &aAccessPoint)
Set WAP Access Point of the item.
Since
0.9
Parameters
aAccessPointThe WAP Access point to be set.
Return Value
void

Type ( )

IMPORT_C TTypeType()const
Get type of the item (item or folder).
Since
0.9
Return Value
The type of the item. It is either EFolder or EItem (never ENone).

Uid ( )

IMPORT_C TIntUid()const
Get unique id of the item.
Since
0.9
Return Value
The unique id.

Url ( )

IMPORT_C const TPtrCUrl()const
Get the URL of this item.
Since
0.9
Return Value
The URL of this item.

UserName ( )

IMPORT_C const TPtrCUserName()const
Get the username associated with this item.
Since
0.9
Return Value
The username.

WapAp ( )

IMPORT_C TFavouritesWapApWapAp()const
Get WAP Access Point id associated with this item.
Since
0.9
Return Value
The WAP Access Point id.

operator= ( const CFavouritesItem & )

IMPORT_C CFavouritesItem &operator=(const CFavouritesItem &aCopyFrom)
Assignment operator.
Since
0.9
Parameters
aCopyFromAssign from this.