Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: HLPMODEL.h
Link against: HLPMODEL.LIB

Class CHlpModel

class CHlpModel : public CBase, public MHlpDbObserver, public MPictureFactory, public MRichTextStoreResolver

Support

Supported from 6.0

Description

Help model interface.

It provides functions to search help files in various ways.

The interface implements MHlpDbObserver for help database events, and MRichTextStoreResolver and MPictureFactory to obtain pictures from rich text stores.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CHlpModelHelp model interface
MHlpDbObserverThis is internal and not intended for use
MPictureFactoryAbstract interface for instantiating and restoring new CPicture derived objects
MRichTextStoreResolver 

Defined in CHlpModel:
BuildListForDriveLC(), CHlpModel(), CancelSearch(), CategoryListL(), CategoryUIDSearchL(), CloseFileL(), CloseL(), ConstructL(), ContextSearchL(), CurrentDatabase(), CurrentSearchType(), CurrentView(), CurrentZoomFactor(), DatabaseCount(), DiskPresent(), DoNextSearchL(), DoSearchL(), HandleDbEventL(), IndexSearchL(), LoadListL(), LoadTopicL(), LoadTopicL(), LoadTopicL(), MatchUidL(), NewL(), NewLC(), NewPictureL(), NotifyHelpModelDestructionToPictures(), OpenFileL(), OpenL(), RemoveHelpPicture(), ReportEventToObserverL(), ResetAndDestroyArrayOfCHlpFileEntry(), ResetReadyForSearch(), ResetViews(), SearchL(), SearchL(), SearchL(), SetCriterionL(), SetObserver(), SetSearchType(), SetZoomFactors(), SetZoomSizeL(), StreamStoreL(), TopicSearchL(), ZoomSize(), iCriterion, iCurrentDb, iCurrentRichTextStore, iDatabases, iFound, iFsSession, iObserver, iPictures, iSearch, iSearchType, iTransientCategoryUid, iZoomFactors, iZoomSize, ~CHlpModel()

Inherited from CBase:
operator new()


Construction and destruction


NewL()

static CHlpModel* NewL(RFs& aFs, MHlpModelObserver* aObserver);

Description

Allocates and creates a help model object.

Parameters

RFs& aFs

Open file server handle

MHlpModelObserver* aObserver

Client callback interface to handle messages from the help model

Return value

CHlpModel*

New help model object


NewLC()

static CHlpModel* NewLC(RFs& aFs, MHlpModelObserver* aObserver);

Description

Allocates and creates a help model object, leaving the object on the cleanup stack.

Parameters

RFs& aFs

Open file server handle

MHlpModelObserver* aObserver

Client callback interface to handle messages from the help model

Return value

CHlpModel*

New help model object


~CHlpModel()

~CHlpModel();

Description

Destructor.

[Top]


Member functions


OpenL()

void OpenL();

Description

Opens all the help files in \System\Help.


CloseL()

void CloseL();

Description

Closes all open help files.


OpenFileL()

void OpenFileL(const TDesC& aFileName);

Description

Opens a specified help file.

Parameters

const TDesC& aFileName

Help file to open


CloseFileL()

void CloseFileL(const TDesC& aFileName);

Description

Closes a specified help file.

Parameters

const TDesC& aFileName

Help file to close


ContextSearchL()

void ContextSearchL(TCoeHelpContext& aContext);

Description

Searches for a topic with the specified help context.

A successful search generates a ETopicAvailable event. The topic can then be retrieved using LoadTopicL().

A unsuccessful search generates a ETopicNotFound event.

Parameters

TCoeHelpContext& aContext

Help context to search for


CategoryUIDSearchL()

void CategoryUIDSearchL(TUid aCategoryUID);

Description

Searches for topics with the specified help category UID.

A successful search generates a ETopicListAvailable event. The list can then be retrieved using LoadListL().

An unsuccessful search generates a ETopicListNoneFound event.

Parameters

TUid aCategoryUID

Category UID to search for


TopicSearchL()

void TopicSearchL(const CHlpItem& aHelpItem);

Description

Searches for a topic for the specified help item.

A successful search generates a ETopicAvailable event. The topic can then be retrieved using LoadTopicL().

A unsuccessful search generates a ETopicNotFound event.

Parameters

const CHlpItem& aHelpItem

Help item to search for


IndexSearchL()

void IndexSearchL(const CHlpItem& aHelpItem);

Description

Searches for index entries for the specified help item.

A successful search generates a ETopicListAvailable event. The list can then be retrieved using LoadListL().

An unsuccessful search generates a ETopicListNoneFound event.

Parameters

const CHlpItem& aHelpItem

Help item to search for


SearchL()

void SearchL(TInt aType, TUint32 aId);

Description

Searches using a specified type of search with a numeric criterion.

Parameters

TInt aType

Type of search. This is a search type (EIndexList etc.) enum value.

TUint32 aId

Numeric search criterion


SearchL()

void SearchL(TInt aType, HBufC* aCriterion=NULL);

Description

Searches using a specified type of search, allowing a NULL seach criterion.

Parameters

TInt aType

Type of search. This is a search type (EIndexList etc.) enum value.

HBufC* aCriterion=NULL

String search criterion. This can be NULL if the search type requires no search criterion.


SearchL()

void SearchL(TInt aType, const TDesC& aCriterion);

Description

Searches using a specified type of search with a string search criterion.

Note that the full text search, EFullTextSearch, is asynchronous.

Parameters

TInt aType

Type of search. This is a search type (EIndexList etc.) enum value.

const TDesC& aCriterion

String search criterion


CancelSearch()

TInt CancelSearch();

Description

Cancels a full text search.

Return value

TInt

KErrNone if successful, KErrArgument if a search is not in progress


LoadTopicL()

void LoadTopicL(CRichText& aRichText, TDes& aTitle);

Description

Gets the current help topic text and title.

The function assumes that a successful search has already been performed.

Parameters

CRichText& aRichText

On return, the help topic text

TDes& aTitle

On return, the help topic title


LoadTopicL()

void LoadTopicL(CRichText& aRichText);

Description

Gets the current help topic text.

The function assumes that a successful search has already been performed.

Parameters

CRichText& aRichText

On return, the help topic text


LoadTopicL()

void LoadTopicL(CHlpTopic* aTopic);

Description

Gets the current help topic.

The function assumes that a successful search has already been performed.

Parameters

CHlpTopic* aTopic

On return, the help topic. This is caller allocated.


LoadListL()

void LoadListL(CHlpList* aList);

Description

Gets the current help list.

The function assumes that a successful search has already been performed.

Parameters

CHlpList* aList

On return, the help list. This is caller allocated.


CategoryListL()

void CategoryListL(CDesCArray* aList);

Description

Populates a list of available help categories.

This can be called without needing to perform a prior search.

Parameters

CDesCArray* aList

On return, the list of available help categories. This is caller allocated.


SetZoomSizeL()

void SetZoomSizeL(THlpZoomState aState=EHlpZoomStateMedium);

Support

Supported from 7.0

Description

Sets the zoom size to use for help text and pictures.

Parameters

THlpZoomState aState=EHlpZoomStateMedium

Zoom size


ZoomSize()

THlpZoomState ZoomSize() const;

Description

Gets the zoom size used for help text and pictures.

Return value

THlpZoomState

Zoom size


SetZoomFactors()

void SetZoomFactors(THlpZoomState aZoomState, TInt aFactor);

Description

Sets a zoom factor for a logical zoom size.

Parameters

THlpZoomState aZoomState

Logical zoom size for which to set the factor

TInt aFactor

Zoom factor. For example, 2 specifies double size.


StreamStoreL()

const CStreamStore& StreamStoreL(TInt aPos) const;

Description

Gets the current rich text store.

Parameters

TInt aPos

Unused

Return value

const CStreamStore&

Current rich text store


MatchUidL()

TInt MatchUidL(TUid aUid);

Description

Searches the open help databases for the specified topic UID.

Parameters

TUid aUid

Topic UID to search for

Return value

TInt

Index of the database if the item was found, or KErrNotFound if not


SetObserver()

void SetObserver(MHlpModelObserver* aObserver);

Description

Sets the client callback interface.

Parameters

MHlpModelObserver* aObserver

Client callback interface

[Top]


Internal members


CHlpModel()

private: CHlpModel(RFs& aFs, MHlpModelObserver& aObserver);

Description

This member is internal and not intended for use.


ConstructL()

private: void ConstructL();

Description

This member is internal and not intended for use.


CurrentZoomFactor()

TInt CurrentZoomFactor() const;

Description

This member is internal and not intended for use.


RemoveHelpPicture()

void RemoveHelpPicture(CHlpPicture* aHelpPicture);

Description

This member is internal and not intended for use.


NewPictureL()

void NewPictureL(TPictureHeader& aHdr, const CStreamStore& aDeferredPictureStore) const;

Description

This member is internal and not intended for use.


NotifyHelpModelDestructionToPictures()

void NotifyHelpModelDestructionToPictures();

Description

This member is internal and not intended for use.


DoSearchL()

private: void DoSearchL(TInt aType, const TDesC& aCriterion);

Description

This member is internal and not intended for use.


DoNextSearchL()

private: void DoNextSearchL();

Description

This member is internal and not intended for use.


ResetReadyForSearch()

private: void ResetReadyForSearch();

Description

This member is internal and not intended for use.


ResetViews()

private: void ResetViews();

Description

This member is internal and not intended for use.


SetCriterionL()

private: void SetCriterionL(const TDesC& aCriterion);

Description

This member is internal and not intended for use.


HandleDbEventL()

private: void HandleDbEventL(TInt aEvent);

Description

This member is internal and not intended for use.


ReportEventToObserverL()

private: void ReportEventToObserverL(TInt aEvent);

Description

This member is internal and not intended for use.


CurrentDatabase()

private: inline CHlpDatabase* CurrentDatabase() const;

Description

This member is internal and not intended for use.


DatabaseCount()

private: inline TInt DatabaseCount() const;

Description

This member is internal and not intended for use.


SetSearchType()

private: inline void SetSearchType(TInt aSearchType);

Description

This member is internal and not intended for use.


CurrentSearchType()

private: inline TInt CurrentSearchType() const;

Description

This member is internal and not intended for use.


CurrentView()

private: RDbView* CurrentView() const;

Description

This member is internal and not intended for use.


DiskPresent()

private: TBool DiskPresent(TInt aDrive) const;

Description

This member is internal and not intended for use.


BuildListForDriveLC()

private: CHlpFileList* BuildListForDriveLC(TDriveUnit aDrive, RFs& aFsSession) const;

Description

This member is internal and not intended for use.


ResetAndDestroyArrayOfCHlpFileEntry()

private: static void ResetAndDestroyArrayOfCHlpFileEntry(TAny* aObject);

Description

This member is internal and not intended for use.


iFsSession

private: RFs& iFsSession;

Description

This member is internal and not intended for use.


iCurrentRichTextStore

private: CStreamStore* iCurrentRichTextStore;

Description

This member is internal and not intended for use.


iSearch

private: CHlpSQLSearch* iSearch;

Description

This member is internal and not intended for use.


iDatabases

private: CHlpDatabases* iDatabases;

Description

This member is internal and not intended for use.


iObserver

private: MHlpModelObserver* iObserver;

Description

This member is internal and not intended for use.


iFound

private: TBool iFound;

Description

This member is internal and not intended for use.


iCriterion

private: HBufC* iCriterion;

Description

This member is internal and not intended for use.


iSearchType

private: TInt iSearchType;

Description

This member is internal and not intended for use.


iCurrentDb

private: TInt iCurrentDb;

Description

This member is internal and not intended for use.


iTransientCategoryUid

private: TUid iTransientCategoryUid;

Description

This member is internal and not intended for use.


iZoomSize

private: THlpZoomState iZoomSize;

Description

This member is internal and not intended for use.


iPictures

private: CArrayPtr<CHlpPicture>* iPictures;

Description

This member is internal and not intended for use.


iZoomFactors

private: CArrayFix<TInt>* iZoomFactors;

Description

This member is internal and not intended for use.