CSearchContent Class Reference

class CSearchContent : public CBase

Has Description of a content type

Encapsulates all the content type related info like icon, snippet format, content type etc.,

searchutilities.lib

Inherits from

Public Member Functions
~CSearchContent()
IMPORT_C voidAddChildL(CSearchContent *)
IMPORT_C const TDesC &Caption()
IMPORT_C TUidContentId()
IMPORT_C TSearchContentTypeContentType()
IMPORT_C voidExternalizeL(RWriteStream &)
IMPORT_C const CSearchContent *FindChildL(TUid)
IMPORT_C const CSearchContent *FindSubContentL(const CSearchLightResult &)
IMPORT_C voidGetChildrenL(RPointerArray< const CSearchContent > &)
IMPORT_C const CSearchIconInfo *IconInfo()
IMPORT_C CSearchContent *NewL(TSearchContentType)
IMPORT_C CSearchContent *NewL(RReadStream &)
IMPORT_C TUidPluginId()
IMPORT_C voidSetCaptionL(const TDesC &)
IMPORT_C voidSetContentId(TUid)
IMPORT_C voidSetIconInfo(CSearchIconInfo *)
IMPORT_C voidSetPluginId(TUid)
IMPORT_C voidSetShortCaptionL(const TDesC &)
IMPORT_C voidSetSnippetFormatL(const TDesC8 &)
IMPORT_C voidSetSubContentId(TInt32)
IMPORT_C const TDesC8 &SnippetFormat()
IMPORT_C TInt32SubContentId()
Protected Member Functions
CSearchContent(TSearchContentType)
voidConstructL(RReadStream &)
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()
Public Member Enumerations
enumTSearchContentType { ETypeContentClass, ETypeContentFolder, ETypeContentSubContent }
Private Attributes
HBufC *iCaption
RPointerArray< CSearchContent >iChildren
TUid iContentId
CSearchIconInfo *iIconInfo
TUid iPluginId
HBufC *iShortCaption
HBufC8 *iSnippetFormat
TInt32 iSubContentId
TSearchContentType iType

Constructor & Destructor Documentation

CSearchContent(TSearchContentType)

CSearchContent(TSearchContentTypeaType)[protected]

Constructor

Parameters

TSearchContentType aType

~CSearchContent()

~CSearchContent()[virtual]

Destructor

Member Functions Documentation

AddChildL(CSearchContent *)

IMPORT_C voidAddChildL(CSearchContent *aContent)

Adds a child to this content. Notice that ContentFolder cannot have ContentClass as its child. If this rule is broken the function will leave.

Parameters

CSearchContent * aContent

Caption()

IMPORT_C const TDesC &Caption()const

Gets the Caption

ConstructL(RReadStream &)

voidConstructL(RReadStream &aStream)[protected]

2nd phase constructor

Parameters

RReadStream & aStream

ContentId()

IMPORT_C TUidContentId()const

Gets the content id

ContentType()

IMPORT_C TSearchContentTypeContentType()const

Returns the content type

ExternalizeL(RWriteStream &)

IMPORT_C voidExternalizeL(RWriteStream &aStream)const

Externalizes the object

Parameters

RWriteStream & aStream

FindChildL(TUid)

IMPORT_C const CSearchContent *FindChildL(TUidaContentId)const

Finds a child

Parameters

TUid aContentId

FindSubContentL(const CSearchLightResult &)

IMPORT_C const CSearchContent *FindSubContentL(const CSearchLightResult &aResult)const

Finds a sub child

Parameters

const CSearchLightResult & aResult

GetChildrenL(RPointerArray< const CSearchContent > &)

IMPORT_C voidGetChildrenL(RPointerArray< const CSearchContent > &aContentArray)const

Gets the children

Parameters

RPointerArray< const CSearchContent > & aContentArray

IconInfo()

IMPORT_C const CSearchIconInfo *IconInfo()const

Gets the icon

NewL(TSearchContentType)

IMPORT_C CSearchContent *NewL(TSearchContentTypeaType)[static]

1st phase constructor

Parameters

TSearchContentType aType

NewL(RReadStream &)

IMPORT_C CSearchContent *NewL(RReadStream &aStream)[static]

1st phase constructor

Parameters

RReadStream & aStream

PluginId()

IMPORT_C TUidPluginId()const

Gets the plugin id

SetCaptionL(const TDesC &)

IMPORT_C voidSetCaptionL(const TDesC &aCaption)

Sets the Caption - //Only for content class & folder

Parameters

const TDesC & aCaption

SetContentId(TUid)

IMPORT_C voidSetContentId(TUidaContentId)

Sets the content id

Parameters

TUid aContentId

SetIconInfo(CSearchIconInfo *)

IMPORT_C voidSetIconInfo(CSearchIconInfo *aIconInfo)

Sets the icon

Parameters

CSearchIconInfo * aIconInfo

SetPluginId(TUid)

IMPORT_C voidSetPluginId(TUidaPluginId)

Sets the plugin id

Parameters

TUid aPluginId

SetShortCaptionL(const TDesC &)

IMPORT_C voidSetShortCaptionL(const TDesC &aCaption)

Parameters

const TDesC & aCaption

SetSnippetFormatL(const TDesC8 &)

IMPORT_C voidSetSnippetFormatL(const TDesC8 &aSnippetFormat)

Sets the snippet format

Parameters

const TDesC8 & aSnippetFormat

SetSubContentId(TInt32)

IMPORT_C voidSetSubContentId(TInt32aSubContentId)

sets the sub content id

Parameters

TInt32 aSubContentId

SnippetFormat()

IMPORT_C const TDesC8 &SnippetFormat()const

Gets the snippet format

SubContentId()

IMPORT_C TInt32SubContentId()const

returns sub content id

Member Enumerations Documentation

Enum TSearchContentType

Enumerators

ETypeContentClass
ETypeContentFolder
ETypeContentSubContent

Member Data Documentation

HBufC * iCaption

HBufC *iCaption[private]

Caption Own

RPointerArray< CSearchContent > iChildren

RPointerArray< CSearchContent >iChildren[private]

Children contents

TUid iContentId

TUid iContentId[private]

Content ID

CSearchIconInfo * iIconInfo

CSearchIconInfo *iIconInfo[private]

Icon information Own

TUid iPluginId

TUid iPluginId[private]

Plugin Id

HBufC * iShortCaption

HBufC *iShortCaption[private]

Short Caption Own

HBufC8 * iSnippetFormat

HBufC8 *iSnippetFormat[private]

Snippet format Own

TInt32 iSubContentId

TInt32 iSubContentId[private]

Sub Content ID

TSearchContentType iType

TSearchContentType iType[private]

Content type