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 void AddChildL ( CSearchContent *)
IMPORT_C const TDesC & Caption ()
IMPORT_C TUid ContentId ()
IMPORT_C TSearchContentType ContentType ()
IMPORT_C void ExternalizeL ( RWriteStream &)
IMPORT_C const CSearchContent * FindChildL ( TUid )
IMPORT_C const CSearchContent * FindSubContentL (const CSearchLightResult &)
IMPORT_C void GetChildrenL ( RPointerArray < const CSearchContent > &)
IMPORT_C const CSearchIconInfo * IconInfo ()
IMPORT_C CSearchContent * NewL ( TSearchContentType )
IMPORT_C CSearchContent * NewL ( RReadStream &)
IMPORT_C TUid PluginId ()
IMPORT_C void SetCaptionL (const TDesC &)
IMPORT_C void SetContentId ( TUid )
IMPORT_C void SetIconInfo (CSearchIconInfo *)
IMPORT_C void SetPluginId ( TUid )
IMPORT_C void SetShortCaptionL (const TDesC &)
IMPORT_C void SetSnippetFormatL (const TDesC8 &)
IMPORT_C void SetSubContentId ( TInt32 )
IMPORT_C const TDesC8 & SnippetFormat ()
IMPORT_C TInt32 SubContentId ()
Protected Member Functions
CSearchContent ( TSearchContentType )
void ConstructL ( 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
enum TSearchContentType { 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 ( TSearchContentType aType ) [protected]

Constructor

Parameters

TSearchContentType aType

~CSearchContent()

~CSearchContent ( ) [virtual]

Destructor

Member Functions Documentation

AddChildL(CSearchContent *)

IMPORT_C void AddChildL ( 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 &)

void ConstructL ( RReadStream & aStream ) [protected]

2nd phase constructor

Parameters

RReadStream & aStream

ContentId()

IMPORT_C TUid ContentId ( ) const

Gets the content id

ContentType()

IMPORT_C TSearchContentType ContentType ( ) const

Returns the content type

ExternalizeL(RWriteStream &)

IMPORT_C void ExternalizeL ( RWriteStream & aStream ) const

Externalizes the object

Parameters

RWriteStream & aStream

FindChildL(TUid)

IMPORT_C const CSearchContent * FindChildL ( TUid aContentId ) 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 void GetChildrenL ( 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 ( TSearchContentType aType ) [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 TUid PluginId ( ) const

Gets the plugin id

SetCaptionL(const TDesC &)

IMPORT_C void SetCaptionL ( const TDesC & aCaption )

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

Parameters

const TDesC & aCaption

SetContentId(TUid)

IMPORT_C void SetContentId ( TUid aContentId )

Sets the content id

Parameters

TUid aContentId

SetIconInfo(CSearchIconInfo *)

IMPORT_C void SetIconInfo ( CSearchIconInfo * aIconInfo )

Sets the icon

Parameters

CSearchIconInfo * aIconInfo

SetPluginId(TUid)

IMPORT_C void SetPluginId ( TUid aPluginId )

Sets the plugin id

Parameters

TUid aPluginId

SetShortCaptionL(const TDesC &)

IMPORT_C void SetShortCaptionL ( const TDesC & aCaption )

Parameters

const TDesC & aCaption

SetSnippetFormatL(const TDesC8 &)

IMPORT_C void SetSnippetFormatL ( const TDesC8 & aSnippetFormat )

Sets the snippet format

Parameters

const TDesC8 & aSnippetFormat

SetSubContentId(TInt32)

IMPORT_C void SetSubContentId ( TInt32 aSubContentId )

sets the sub content id

Parameters

TInt32 aSubContentId

SnippetFormat()

IMPORT_C const TDesC8 & SnippetFormat ( ) const

Gets the snippet format

SubContentId()

IMPORT_C TInt32 SubContentId ( ) 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