CFolderItem Class Reference

class CFolderItem : public CBase

FolderItem either contains a list of FolderItems or contains information about a feed.

Library: FeedsEngine.lib

Since
3.0

Inherits from

Public Member Functions
~CFolderItem()
IMPORT_C TIntFeedId(void)
IMPORT_C const CFolderItem *FolderItemAt(TInt)
IMPORT_C TIntFolderItemCount(void)
IMPORT_C TIntFolderListId(void)
IMPORT_C TIntId(void)
IMPORT_C TIntIndex(const CFolderItem &)
IMPORT_C TBoolIsFolder(void)
IMPORT_C const CItemMini *MiniItemAt(TInt)
IMPORT_C TIntMiniItemsCount(void)
IMPORT_C const TDesC &Name(void)
IMPORT_C const CFolderItem *Parent(void)
IMPORT_C const CFolderItem *Search(const TDesC &)
IMPORT_C const CFolderItem *Search(TInt)
IMPORT_C voidSetUnreadCount(TInt)
IMPORT_C const TDesC &SourceUrl(void)
IMPORT_C TIntStatus()
IMPORT_C const TTime &Timestamp(void)
IMPORT_C TIntUnreadCount(void)
IMPORT_C TIntUnreadFeedCountRecursive(void)
IMPORT_C TIntUnreadTopicCountRecursive(void)
Private Member Functions
CFolderItem(TInt, CFeedsEntity *)
CFolderItem(TInt)
voidAddItemL(CFolderItem *)
voidAddMiniItem(CItemMini *)
voidConstructL()
voidConstructL(const CFeedsEntity &)
TInt GetFolderUnreadCount(const CFolderItem *, TCountType)
CFolderItem *NewFeedL(TInt, const TDesC &, const TDesC &, TInt, TInt, const TTime &, TInt, const TInt &)
CFolderItem *NewFolderL(TInt, const TDesC &, TInt, TInt)
CFolderItem *NewL(TInt, CFeedsEntity *)
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 Member Enumerations
enumTCountType { ECountUnreadFeeds, ECountUnreadTopics }
Private Attributes
TInt iEntryId
TInt iFeedId
CFeedsEntity *iFeedsEntity
RPointerArray< CFolderItem >iFolderItems
TInt iFolderListId
TBool iIsFolder
TLeakTrackeriLeakTracker
RPointerArray< CItemMini >iMiniItems
CPackedFolder *iPackedFolder
const CFolderItem *iParent
TPtrC iSourceUrl
TInt iStatusCode
TTime iTimestamp
TPtrC iTitle
TInt iUnreadCount

Constructor & Destructor Documentation

CFolderItem(TInt, CFeedsEntity *)

CFolderItem(TIntaFolderListId,
CFeedsEntity *aFeedsEntity
)[private]

C++ default constructor. aPackedFolder is adopted by this method.

Parameters

TInt aFolderListId
CFeedsEntity * aFeedsEntity

CFolderItem(TInt)

CFolderItem(TIntaFolderListId)[private]

C++ default constructor.

Parameters

TInt aFolderListId

~CFolderItem()

IMPORT_C~CFolderItem()[virtual]

Destructor.

Member Functions Documentation

AddItemL(CFolderItem *)

voidAddItemL(CFolderItem *aItem)[private]

Adds aItem as a child of this FolderItem. aItem is adopted by this method.

Since
3.0

Parameters

CFolderItem * aItemThe item to append

AddMiniItem(CItemMini *)

voidAddMiniItem(CItemMini *aMiniItem)[private]
Since
3.2 Sets

Parameters

CItemMini * aMiniItem

ConstructL()

voidConstructL()[private]

By default Symbian 2nd phase constructor is private.

ConstructL(const CFeedsEntity &)

voidConstructL(const CFeedsEntity &aFeedsEntity)[private]

By default Symbian 2nd phase constructor is private.

Parameters

const CFeedsEntity & aFeedsEntity

FeedId(void)

IMPORT_C TIntFeedId(void)const

Returns the associated feed id for this folder-item. The method panics if the folder-item is a folder (rather than a feed).

Since
3.1

Parameters

void

FolderItemAt(TInt)

IMPORT_C const CFolderItem *FolderItemAt(TIntaIndex)const

Returns the folder-item at the given index

Since
3.0

Parameters

TInt aIndexThe index of the item.

FolderItemCount(void)

IMPORT_C TIntFolderItemCount(void)const

Returns the number of items.

Since
3.0

Parameters

void

FolderListId(void)

IMPORT_C TIntFolderListId(void)const

Returns the folder-list-id associated with this item.

Since
3.0

Parameters

void

GetFolderUnreadCount(const CFolderItem *, TCountType)

TInt GetFolderUnreadCount(const CFolderItem *aFolder,
TCountTypeaCountType
)[private, static]

Parameters

const CFolderItem * aFolder
TCountType aCountType

Id(void)

IMPORT_C TIntId(void)const

Returns the unique id for this folder-item.

Since
3.0

Parameters

void

Index(const CFolderItem &)

IMPORT_C TIntIndex(const CFolderItem &aItem)const

Returns the index of the given folder-item.

Since
3.0

Parameters

const CFolderItem & aItemThe item to find

IsFolder(void)

IMPORT_C TBoolIsFolder(void)const

Returns true if this is a folder.

Since
3.0

Parameters

void

MiniItemAt(TInt)

IMPORT_C const CItemMini *MiniItemAt(TIntaIndex)const

Return The mini item.

Since
3.2

Parameters

TInt aIndex

MiniItemsCount(void)

IMPORT_C TIntMiniItemsCount(void)const

Returns the number of mini items.

Since
3.2

Parameters

void

Name(void)

IMPORT_C const TDesC &Name(void)const

Returns the name of the item.

Since
3.0

Parameters

void

NewFeedL(TInt, const TDesC &, const TDesC &, TInt, TInt, const TTime &, TInt, const TInt &)

CFolderItem *NewFeedL(TIntaFolderListId,
const TDesC &aTitle,
const TDesC &aUrl,
TIntaEntryId,
TIntaFeedId,
const TTime &aTimestamp,
TIntaStatusCode,
const TInt &aUnreadCount = 0
)[private, static]

Two-phased constructor.

Parameters

TInt aFolderListId
const TDesC & aTitle
const TDesC & aUrl
TInt aEntryId
TInt aFeedId
const TTime & aTimestamp
TInt aStatusCode
const TInt & aUnreadCount = 0

NewFolderL(TInt, const TDesC &, TInt, TInt)

CFolderItem *NewFolderL(TIntaFolderListId,
const TDesC &aTitle,
TIntaEntryId,
TIntaStatusCode
)[private, static]

Two-phased constructor.

Parameters

TInt aFolderListId
const TDesC & aTitle
TInt aEntryId
TInt aStatusCode

NewL(TInt, CFeedsEntity *)

CFolderItem *NewL(TIntaFolderListId,
CFeedsEntity *aFeedsEntity
)[private, static]

Two-phased constructor. Only called from RFolderItem. aPackedFolder is adopted by this method.

Parameters

TInt aFolderListId
CFeedsEntity * aFeedsEntity

Parent(void)

IMPORT_C const CFolderItem *Parent(void)const

Returns the parent folder or NULL if this is the root folder.

Since
3.0

Parameters

void

Search(const TDesC &)

IMPORT_C const CFolderItem *Search(const TDesC &aName)const

Searches for a FolderItem with the given name. If "this" isn't a folder it only checks whether or not it matches the given name. If "this" is a folder it also checks all embedded items.

Since
3.0

Parameters

const TDesC & aNameThe name to search for.

Search(TInt)

IMPORT_C const CFolderItem *Search(TIntaFolderItemId)const

Searches for a FolderItem with the given id. If "this" isn't a folder it only checks whether or not it matches the given id. If "this" is a folder it also checks all embedded items.

Since
3.1

Parameters

TInt aFolderItemIdThe id to search for.

SetUnreadCount(TInt)

IMPORT_C voidSetUnreadCount(TIntaUnreadCount)

Sets the number of unread topics for this folder-item.

Since
3.1 Sets The number of unread topics for this folder-item.

Parameters

TInt aUnreadCount

SourceUrl(void)

IMPORT_C const TDesC &SourceUrl(void)const

Returns the source url of the item.

Since
3.0

Parameters

void

Status()

IMPORT_C TIntStatus()const

Sets the number of unread topics for this folder-item.

Since
5.0 Returns the Status of Folder item

Timestamp(void)

IMPORT_C const TTime &Timestamp(void)const

Returns the timestamp of the last update.

Since
3.1

Parameters

void

UnreadCount(void)

IMPORT_C TIntUnreadCount(void)const

Returns the number of unread topics for this folder-item.

Since
3.1

Parameters

void

UnreadFeedCountRecursive(void)

IMPORT_C TIntUnreadFeedCountRecursive(void)const

Returns the number of unread feeds for this folder-item.

Since
5.0

Parameters

void

UnreadTopicCountRecursive(void)

IMPORT_C TIntUnreadTopicCountRecursive(void)const

Returns the number of unread topics for this folder-item.

Since
5.0

Parameters

void

Member Enumerations Documentation

Enum TCountType

A private function and associated enum (to be used as a flag for this function) that will be called recursively to gather the count of feeds

Since
5.0

Enumerators

ECountUnreadFeeds
ECountUnreadTopics

Member Data Documentation

TInt iEntryId

TInt iEntryId[private]

TInt iFeedId

TInt iFeedId[private]

CFeedsEntity * iFeedsEntity

CFeedsEntity *iFeedsEntity[private]

RPointerArray< CFolderItem > iFolderItems

RPointerArray< CFolderItem >iFolderItems[private]

TInt iFolderListId

TInt iFolderListId[private]

TBool iIsFolder

TBool iIsFolder[private]

TLeakTracker iLeakTracker

TLeakTrackeriLeakTracker[private]

RPointerArray< CItemMini > iMiniItems

RPointerArray< CItemMini >iMiniItems[private]

CPackedFolder * iPackedFolder

CPackedFolder *iPackedFolder[private]

const CFolderItem * iParent

const CFolderItem *iParent[private]

TPtrC iSourceUrl

TPtrC iSourceUrl[private]

TInt iStatusCode

TInt iStatusCode[private]

TTime iTimestamp

TTime iTimestamp[private]

TPtrC iTitle

TPtrC iTitle[private]

TInt iUnreadCount

TInt iUnreadCount[private]