Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: HLPMODEL.H
Link against: hlpmodel.lib

Class CHlpModel

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

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

Members

Defined in CHlpModel:
CancelSearch(), CategoryListL(), CategoryUIDSearchL(), CloseFileL(), CloseL(), ContextSearchL(), HandleDbEventL(), IndexSearchL(), LoadListL(), LoadTopicL(), LoadTopicL(), LoadTopicL(), MatchUidL(), NewL(), NewLC(), NewPictureL(), OpenFileL(), OpenL(), SearchL(), SearchL(), SearchL(), SetObserver(), SetZoomFactors(), SetZoomSizeL(), StreamStoreL(), TopicSearchL(), ZoomSize(), ~CHlpModel()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

static IMPORT_C 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 IMPORT_C 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()

IMPORT_C ~CHlpModel();

Description

Destructor.

[Top]


Member functions


OpenL()

IMPORT_C void OpenL();

Description

Opens all the help files in \Resource\Help.


CloseL()

IMPORT_C void CloseL();

Description

Closes all open help files.


OpenFileL()

IMPORT_C void OpenFileL(const TDesC &aFileName);

Description

Opens a specified help file.

Parameters

const TDesC &aFileName

Help file to open


CloseFileL()

IMPORT_C void CloseFileL(const TDesC &aFileName);

Description

Closes a specified help file.

Parameters

const TDesC &aFileName

Help file to close


ContextSearchL()

IMPORT_C void ContextSearchL(TCoeHelpContext &aContext);

Description

Searches for a topic with the specified help context.

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

An unsuccessful search generates an ETopicNotFound event.

Parameters

TCoeHelpContext &aContext

Help context to search for


CategoryUIDSearchL()

IMPORT_C void CategoryUIDSearchL(TUid aCategoryUID);

Description

Searches for topics with the specified help category UID.

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

An unsuccessful search generates an ETopicListNoneFound event.

Parameters

TUid aCategoryUID

Category UID to search for


TopicSearchL()

IMPORT_C void TopicSearchL(const CHlpItem &aHelpItem);

Description

Searches for a topic for the specified help item.

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

An unsuccessful search generates an ETopicNotFound event.

Parameters

const CHlpItem &aHelpItem

Help item to search for


IndexSearchL()

IMPORT_C void IndexSearchL(const CHlpItem &aHelpItem);

Description

Searches for index entries for the specified help item.

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

An unsuccessful search generates an ETopicListNoneFound event.

Parameters

const CHlpItem &aHelpItem

Help item to search for


SearchL()

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

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

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

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


SearchL()

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

IMPORT_C TInt CancelSearch();

Description

Cancels a full text search.

Return value

TInt

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


LoadTopicL()

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

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

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

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

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

IMPORT_C void SetZoomSizeL(THlpZoomState aState=EHlpZoomStateMedium);

Description

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

Parameters

THlpZoomState aState

Zoom size


ZoomSize()

IMPORT_C THlpZoomState ZoomSize() const;

Description

Gets the zoom size used for help text and pictures.

Return value

THlpZoomState

Zoom size


SetZoomFactors()

IMPORT_C 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.


NewPictureL()

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

Description

Interface to the picture restoration process that ensures that a picture of the correct type is restored.

The class of the object to be restored is determined by the UID of the stored picture, contained in the specified picture header.

The function can allow the restoration of:

just one CPicture-derived class, returning an error if the UID indicates that the stored picture is not of the required type

many different CPicture-derived classes, using the UID to choose which of the possible CPicture-derived classes should be instantiated

Parameters

TPictureHeader &aHdr

The picture header that should be restored.

const CStreamStore &aDeferredPictureStore

The store in which both the header and picture reside.


StreamStoreL()

virtual IMPORT_C 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()

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

IMPORT_C void SetObserver(MHlpModelObserver *aObserver);

Description

Sets the client callback interface.

Parameters

MHlpModelObserver *aObserver

Client callback interface


HandleDbEventL()

private: virtual void HandleDbEventL(TInt aEvent);

Description

Parameters

TInt aEvent