CFavouritesItem Class Reference

API published in: S60 1st Ed

Link against: favouritesengine.lib

Capability Information

Required Capabilities

ReadUserData WriteUserData


#include <
favouritesitem.h>

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.


Public Types

enum  TType { ENone, EItem, EFolder }
 Type of an item (item or folder). More...

Public Member Functions

virtual IMPORT_C ~CFavouritesItem ()
 Destructor.
IMPORT_C CFavouritesItemoperator= (const CFavouritesItem &aCopyFrom)
 Assignment operator.
IMPORT_C TInt Uid () const
 Get unique id of the item.
IMPORT_C TInt ParentFolder () const
 Get the uid of the parent folder of this item.
IMPORT_C TType Type () const
 Get type of the item (item or folder).
IMPORT_C const TPtrC Name () const
 Get the name of this item.
IMPORT_C const TPtrC Url () const
 Get the URL of this item.
IMPORT_C TFavouritesWapAp WapAp () const
 Get WAP Access Point id associated with this item.
IMPORT_C const TPtrC UserName () const
 Get the username associated with this item.
IMPORT_C const TPtrC Password () const
 Get password associated with this item.
IMPORT_C TInt32 ContextId () const
 Get context id associated with this item.
IMPORT_C TBool IsItem () const
 Check if this is an item (not folder).
IMPORT_C TBool IsFolder () const
 Check if this is a folder.
IMPORT_C TBool IsFactoryItem () const
 Check if this is a factory item.
IMPORT_C TBool IsReadOnly () const
 Check if this is a read-only in database.
IMPORT_C TTime Modified () const
 Get last modification time (of database entry), universal time.
IMPORT_C void ClearL ()
 Reset the item to default values.
IMPORT_C void SetParentFolder (TInt aId)
 Set parent folder.
IMPORT_C void SetType (TType aType)
 Set item type (item or folder).
IMPORT_C void SetNameL (const TDesC &aName)
 Set name of the item.
IMPORT_C void SetUrlL (const TDesC &aUrl)
 Set URL of the item.
IMPORT_C void SetWapAp (const TFavouritesWapAp &aAccessPoint)
 Set WAP Access Point of the item.
IMPORT_C void SetUserNameL (const TDesC &aUserName)
 Set username of the item.
IMPORT_C void SetPasswordL (const TDesC &aPassword)
 Set password.
IMPORT_C void SetContextId (TInt32 aContextId)
 Set context id of the item.
void ExternalizeL (RWriteStream &aStream) const
 Externalize into a stream.
void InternalizeL (RReadStream &aStream)
 Internalize from a stream.

Static Public Member Functions

static IMPORT_C CFavouritesItemNewLC ()
 Two-phased constructor.
static IMPORT_C CFavouritesItemNewL ()
 Two-phased constructor.

Friends

class RFavouritesDb

Member Enumeration Documentation

enum CFavouritesItem::TType
 

Type of an item (item or folder).

Enumerator:
ENone 
EItem 
EFolder 

Constructor & Destructor Documentation

virtual IMPORT_C CFavouritesItem::~CFavouritesItem  )  [virtual]
 

Destructor.


Member Function Documentation

IMPORT_C void CFavouritesItem::ClearL  ) 
 

Reset the item to default values.

Returns:
void
IMPORT_C TInt32 CFavouritesItem::ContextId  )  const
 

Get context id associated with this item.

Returns:
The context id.
void CFavouritesItem::ExternalizeL RWriteStream &  aStream  )  const
 

Externalize into a stream.

Parameters:
aStream The stream to externalize to.
Returns:
void
void CFavouritesItem::InternalizeL RReadStream &  aStream  ) 
 

Internalize from a stream.

Parameters:
aStream The stream to externalize from.
Returns:
void
IMPORT_C TBool CFavouritesItem::IsFactoryItem  )  const
 

Check if this is a factory item.

Returns:
ETrue if this is a factory item.
IMPORT_C TBool CFavouritesItem::IsFolder  )  const
 

Check if this is a folder.

Returns:
ETrue if this is a folder.
IMPORT_C TBool CFavouritesItem::IsItem  )  const
 

Check if this is an item (not folder).

Returns:
ETrue if this is an item.
IMPORT_C TBool CFavouritesItem::IsReadOnly  )  const
 

Check if this is a read-only in database.

Note that ETrue value does not prevent modifying this CFavouritesItem object.

Returns:
ETrue if this is read-only in database.
IMPORT_C TTime CFavouritesItem::Modified  )  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().
Returns:
TTime, last modification time
IMPORT_C const TPtrC CFavouritesItem::Name  )  const
 

Get the name of this item.

Returns:
The name of this item.
static IMPORT_C CFavouritesItem* CFavouritesItem::NewL  )  [static]
 

Two-phased constructor.

Leaves on failure.

Returns:
The constructed item.
static IMPORT_C CFavouritesItem* CFavouritesItem::NewLC  )  [static]
 

Two-phased constructor.

Leaves on failure. Places the instance on the cleanup stack.

Returns:
The constructed item.
IMPORT_C CFavouritesItem& CFavouritesItem::operator= const CFavouritesItem aCopyFrom  ) 
 

Assignment operator.

Parameters:
aCopyFrom Assign from this.
IMPORT_C TInt CFavouritesItem::ParentFolder  )  const
 

Get the uid of the parent folder of this item.

Returns:
The unique id of the parent folder.
IMPORT_C const TPtrC CFavouritesItem::Password  )  const
 

Get password associated with this item.

Returns:
The password.
IMPORT_C void CFavouritesItem::SetContextId TInt32  aContextId  ) 
 

Set context id of the item.

Parameters:
aContextId The context id to be set.
Returns:
void
IMPORT_C void CFavouritesItem::SetNameL const TDesC &  aName  ) 
 

Set name of the item.

Leading or trailing whitespace is trimmed. Length limit is KFavouritesMaxName (leaves with KErrOverflow).

Parameters:
aName The name to be set.
Returns:
void
IMPORT_C void CFavouritesItem::SetParentFolder TInt  aId  ) 
 

Set parent folder.

Parameters:
aId The unique id of the parent folder.
Returns:
void
IMPORT_C void CFavouritesItem::SetPasswordL const TDesC &  aPassword  ) 
 

Set password.

Length limit is KFavouritesMaxPassword (leaves with KErrOverflow).

Parameters:
aPassword The password to be set.
Returns:
void
IMPORT_C void CFavouritesItem::SetType TType  aType  ) 
 

Set item type (item or folder).

Parameters:
aType The type to be set. ENone cannot be set (if that is specified, it is ignored).
Returns:
void
IMPORT_C void CFavouritesItem::SetUrlL const TDesC &  aUrl  ) 
 

Set URL of the item.

Length limit is KFavouritesMaxURL (leaves with KErrOverflow).

Parameters:
aUrl The URL to be set.
Returns:
void
IMPORT_C void CFavouritesItem::SetUserNameL const TDesC &  aUserName  ) 
 

Set username of the item.

Length limit is KFavouritesMaxUserName (leaves with KErrOverflow).

Parameters:
aUserName The username to be set.
Returns:
void
IMPORT_C void CFavouritesItem::SetWapAp const TFavouritesWapAp aAccessPoint  ) 
 

Set WAP Access Point of the item.

Parameters:
aAccessPoint The WAP Access point to be set.
Returns:
void
IMPORT_C TType CFavouritesItem::Type  )  const
 

Get type of the item (item or folder).

Returns:
The type of the item. It is either EFolder or EItem (never ENone).
IMPORT_C TInt CFavouritesItem::Uid  )  const
 

Get unique id of the item.

Returns:
The unique id.
IMPORT_C const TPtrC CFavouritesItem::Url  )  const
 

Get the URL of this item.

Returns:
The URL of this item.
IMPORT_C const TPtrC CFavouritesItem::UserName  )  const
 

Get the username associated with this item.

Returns:
The username.
IMPORT_C TFavouritesWapAp CFavouritesItem::WapAp  )  const
 

Get WAP Access Point id associated with this item.

Returns:
The WAP Access Point id.

Friends And Related Function Documentation

friend class RFavouritesDb [friend]
 

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top