Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: apparc.h
Link against: apparc.lib

Class CApaRecentFile

CApaRecentFile

Support

Supported from 5.0

Description

A set of static functions which manages a list of last used documents.

The list is a set of entries, each of which encapsulates a file name. The list is in file name order with the most recently used document at the beginning of the list.

Defined in CApaRecentFile:
AddLastUsedEntryL(), GetRecentFileL(), GetRecentFileListL()

See also:


Add a name to the list


AddLastUsedEntryL()

static void AddLastUsedEntryL(RFs& aFs, const TDesC& aFileName, TUid aAppUid);

Description

Adds an entry for the specified document file name to the beginning of the list.

If an entry with the same name already exists in the list, then that entry is moved from its current position to the beginning of the list.

This entry represents the most recently used document.

Parameters

RFs& aFs

Handle to a file server session.

const TDesC& aFileName

The document file name to be added to the list.

TUid aAppUid

The application specific UID associated with this document.

See also:


GetRecentFileL()

static TApaLastUsedEntry GetRecentFileL(RFs& aFs, TUid aAppUid, TInt aIndex);

Description

Returns the entry for a recently used document which matches the specified criteria.

The function can return the most recently used document, or the second most recently used, or the third most recently used etc. within the set of documents associated with the specified application UID.

Parameters

RFs& aFs

Handle to a file server session.

TUid aAppUid

An application specific UID. If KNullUid, then all documents in the list are eligible, otherwise only those documents associated with this UID are eligible.

TInt aIndex

A number describing which of the most recent document files, which match the UID criterion, is to be returned. This value is relative to zero, where 0 means return the most recent, 1 means return the next most recent etc.

Return value

TApaLastUsedEntry

The entry for the most recently used document. If no suitable entry exists, then this is an empty entry.

See also:


GetRecentFileListL()

static CArrayFixFlat<TApaLastUsedEntry>* GetRecentFileListL(RFs& aFs, TUid aAppUid);

Description

Returns all entries for those last used documents which match the specified criteria.

The first entry in the returned array represents the most recently used document, the second entry represents the second most recently used etc.

Parameters

RFs& aFs

Handle to a file server session.

TUid aAppUid

An application specific UID. If KNullUid, then all documents in the list are eligible, otherwise only those documents associated with this UID are eligible.

Return value

CArrayFixFlat<TApaLastUsedEntry>*

A pointer to an array of entries for the last used documents.

See also: