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 TInt FeedId (void)
IMPORT_C const CFolderItem * FolderItemAt ( TInt )
IMPORT_C TInt FolderItemCount (void)
IMPORT_C TInt FolderListId (void)
IMPORT_C TInt Id (void)
IMPORT_C TInt Index (const CFolderItem &)
IMPORT_C TBool IsFolder (void)
IMPORT_C const CItemMini * MiniItemAt ( TInt )
IMPORT_C TInt MiniItemsCount (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 void SetUnreadCount ( TInt )
IMPORT_C const TDesC & SourceUrl (void)
IMPORT_C TInt Status ()
IMPORT_C const TTime & Timestamp (void)
IMPORT_C TInt UnreadCount (void)
IMPORT_C TInt UnreadFeedCountRecursive (void)
IMPORT_C TInt UnreadTopicCountRecursive (void)
Private Member Functions
CFolderItem ( TInt , CFeedsEntity *)
CFolderItem ( TInt )
void AddItemL ( CFolderItem *)
void AddMiniItem ( CItemMini *)
void ConstructL ()
void ConstructL (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
enum TCountType { ECountUnreadFeeds , ECountUnreadTopics }
Private Attributes
TInt iEntryId
TInt iFeedId
CFeedsEntity * iFeedsEntity
RPointerArray < CFolderItem > iFolderItems
TInt iFolderListId
TBool iIsFolder
TLeakTracker iLeakTracker
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 ( TInt aFolderListId,
CFeedsEntity * aFeedsEntity
) [private]

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

Parameters

TInt aFolderListId
CFeedsEntity * aFeedsEntity

CFolderItem(TInt)

CFolderItem ( TInt aFolderListId ) [private]

C++ default constructor.

Parameters

TInt aFolderListId

~CFolderItem()

IMPORT_C ~CFolderItem ( ) [virtual]

Destructor.

Member Functions Documentation

AddItemL(CFolderItem *)

void AddItemL ( CFolderItem * aItem ) [private]

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

Since
3.0

Parameters

CFolderItem * aItem The item to append

AddMiniItem(CItemMini *)

void AddMiniItem ( CItemMini * aMiniItem ) [private]
Since
3.2 Sets

Parameters

CItemMini * aMiniItem

ConstructL()

void ConstructL ( ) [private]

By default Symbian 2nd phase constructor is private.

ConstructL(const CFeedsEntity &)

void ConstructL ( const CFeedsEntity & aFeedsEntity ) [private]

By default Symbian 2nd phase constructor is private.

Parameters

const CFeedsEntity & aFeedsEntity

FeedId(void)

IMPORT_C TInt FeedId ( 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 ( TInt aIndex ) const

Returns the folder-item at the given index

Since
3.0

Parameters

TInt aIndex The index of the item.

FolderItemCount(void)

IMPORT_C TInt FolderItemCount ( void ) const

Returns the number of items.

Since
3.0

Parameters

void

FolderListId(void)

IMPORT_C TInt FolderListId ( 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,
TCountType aCountType
) [private, static]

Parameters

const CFolderItem * aFolder
TCountType aCountType

Id(void)

IMPORT_C TInt Id ( void ) const

Returns the unique id for this folder-item.

Since
3.0

Parameters

void

Index(const CFolderItem &)

IMPORT_C TInt Index ( const CFolderItem & aItem ) const

Returns the index of the given folder-item.

Since
3.0

Parameters

const CFolderItem & aItem The item to find

IsFolder(void)

IMPORT_C TBool IsFolder ( void ) const

Returns true if this is a folder.

Since
3.0

Parameters

void

MiniItemAt(TInt)

IMPORT_C const CItemMini * MiniItemAt ( TInt aIndex ) const

Return The mini item.

Since
3.2

Parameters

TInt aIndex

MiniItemsCount(void)

IMPORT_C TInt MiniItemsCount ( 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 ( TInt aFolderListId,
const TDesC & aTitle,
const TDesC & aUrl,
TInt aEntryId,
TInt aFeedId,
const TTime & aTimestamp,
TInt aStatusCode,
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 ( TInt aFolderListId,
const TDesC & aTitle,
TInt aEntryId,
TInt aStatusCode
) [private, static]

Two-phased constructor.

Parameters

TInt aFolderListId
const TDesC & aTitle
TInt aEntryId
TInt aStatusCode

NewL(TInt, CFeedsEntity *)

CFolderItem * NewL ( TInt aFolderListId,
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 & aName The name to search for.

Search(TInt)

IMPORT_C const CFolderItem * Search ( TInt aFolderItemId ) 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 aFolderItemId The id to search for.

SetUnreadCount(TInt)

IMPORT_C void SetUnreadCount ( TInt aUnreadCount )

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 TInt Status ( ) 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 TInt UnreadCount ( void ) const

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

Since
3.1

Parameters

void

UnreadFeedCountRecursive(void)

IMPORT_C TInt UnreadFeedCountRecursive ( void ) const

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

Since
5.0

Parameters

void

UnreadTopicCountRecursive(void)

IMPORT_C TInt UnreadTopicCountRecursive ( 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

TLeakTracker iLeakTracker [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]