![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Section Contents
CBase |
Abstract: CBase behaviour |
MAgnActiveStep |
Specifies the callback interface for communication between the active object and the Agenda model. |
agmmodel.h
agnmodel.lib
The API through which a user interface accesses the data stored in an Agenda file. Base class for CAgnIndexedModel and for CAgnModel.
This topic describes the functions which have been added to CAgnEntryModel in EPOC Release 5. For more information about the CAgnEntryModel class, see Model classes.
Note that many of the existing CAgnEntryModel functions have been re-written in EPOC Release 5 so that if the model is in client mode, calls will be routed to the Agenda server, and if the model is not in client mode, the function will work as it did before ER5. This ensures that existing applications will continue to work in the new ER5 architecture, without modification.
All of the following CAgnEntryModel functions apart from SetServer() and CreateL() use the Agenda server, and should only be called after the model has been assigned a server pointer.
void SetServer(RAgendaServ* aServer);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Sets the server to use for all agenda operations and sets the model's mode of operation to EClient. The server must be connected (using RAgendaServ::Connect()) before use.
RAgendaServ* aServer |
Pointer to an agenda server. |
void CreateL(RFs& aFs, TFileName aFileName, const TDesC& aDefaultTodoListName, const CParaFormatLayer* aParaFormatLayer, const CCharFormatLayer* aCharFormatLayer);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Creates a new, empty Agenda file with a valid Agenda stream structure. Also creates an empty default to-do list. This function should be called before the model has been assigned a server pointer. If the model is in EClient mode when this function is called, a panic will occur.
Note that this functions is provided for testing purposes only using this function, it may be possible to create files which do not operate correctly in the Agenda application.
RFs& aFs |
A session with the file server. |
TFileName aFileName |
The name of the file to create. |
const TDesC& aDefaultTodoListName |
The name for the default to-do list which will be created. Can have up to KAgnMaxTodoListNameLength (=50) characters. |
const CParaFormatLayer* aParaFormatLayer |
The format layer on which the paragraph formatting for entries in the file will be based. |
const CCharFormatLayer* aCharFormatLayer |
The format layer on which the character formatting for entries in the file will be based. |
This function should be used in conjunction with OpenL(), described below. When file opening and closing is carried out using the server, filenames rather than stream stores must be specified.
void OpenL(const TDesC& aFileName, TTimeIntervalMinutes aDefaultEventDisplayTime, TTimeIntervalMinutes aDefaultAnnivDisplayTime,
TTimeIntervalMinutes aDefaultDayNoteDisplayTime);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Uses the server to open an Agenda file. If another Agenda file is open in the same server session, it will be closed.
The three TTimeIntervalMinutes arguments specify the default display times for the different entry types. The display time values are numbers of minutes from midnight between zero and 1439 inclusive.
const TDesC& aFileName |
The Agenda file to open. |
TTimeIntervalMinutes aDefaultEventDisplayTime |
The default display time for events. |
TTimeIntervalMinutes aDefaultAnnivDisplayTime |
The default display time for anniversaries. |
TTimeIntervalMinutes aDefaultDayNoteDisplayTime |
The default display time for day notes. |
The default entry time for events, anniversaries and day notes can be overridden using the relevant class's SetDisplayTime() function, (see classes CAgnEvent, CAgnAnniv, CAgnAppt).
TStreamId StreamId(TUid aUid);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves the stream ID for the specified unique identifier.
TUid aUid |
The unique identifier. |
TStreamId |
The stream id associated with the unique identifier aUid. |
RReadStream& GetReadStreamL(TStreamId aStreamId);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
This function retrieves a read stream directly from the server. It enables the other stream information e.g. general preferences to be made available to the application.
TStreamId aStreamId |
The id identifying the read stream. |
RReadStream& |
The stream from which the information can be read. |
CStreamStore* GetEmbeddedStore(TStreamId aId);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves an embedded store from a stream, based on stream id.
This function is used to retrieve embedded objects.
TStreamId aId |
The id identifying the stream store. |
CStreamStore* |
The stream store from which the embedded objects can be restored. |
TStreamId SaveTodoListsL(TFileName aFileName) const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Saves the to-do list settings in the current model to the Agenda file specified. The file specified in aFileName must exist, must be closed and must not be read-only.
Used for example by the Agenda application's Create new file command.
TFileName aFileName |
The agenda file to which to save the current file's to-do lists |
TStreamId |
The ID of the stream to which the to-do lists have been saved. |
void SetMode(TModelMode aMode);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Sets the mode of operation for the model to server or client.
This function is called by CAgnEntryModel::SetServer() which sets the mode to client, so normally it should only be used in test code.
TModelMode aMode |
ENormal, EClient or EServer. |
TBool IsClient() const;
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves whether the model is running as a client of the Agenda server.
TBool |
ETrue if the model is a client of the server, EFalse if not. |
void GetDayListFromExtractorL(TAgnInstanceExtractor* aExtractor, TAgnDate aDay, CArrayFixFlat<TAgnSortInstance>* aDayInfoList, TAgnDate aToday);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves a list of entries for the specified day, using a previously set up instance extractor
TAgnInstanceExtractor* aExtractor |
The instance extractor. |
TAgnDate aDay |
The date for which entries will be retrieved. |
CArrayFixFlat<TAgnSortInstance>* aDayInfoList |
On return, pointer to the filtered list of instances. |
TAgnDate aToday |
Today's date. |
The aToday parameter is used to determine if to-do items should be returned in the list, i.e. if the aToday and aDate parameters have the same value, then any undated to-do items are also returned as part of the list, at the default display time.
This mechanism is used to display to-do items in the Agenda day and week views.
void GetSymbolInstanceList(CAgnSymbolList* aList,TTime& aToday, TAgnFilter& aFilter);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves a filtered list of entries for the specified date which have entry symbols.
Used by the Agenda application's year view for example.
CAgnSymbolList* aList |
Pointer to an existing CAgnSymbolList object. |
TTime& aToday |
The day for which entries will be retrieved. |
TAgnFilter& aFilter |
Specifies the entry types of interest. Not changed on return. |
TBool CheckNotifier();
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
This function tests whether the currently open file has been updated by another client. May be used by the UI to test whether it needs to be updated in response to changes made to the model by other applications.
TBool |
ETrue if the file has been updated by another client. EFalse if not. Also returns EFalse if the model is not operating in client mode, or if no agenda file is currently open. |
CAgnEntry* FetchEntryL(TAgnGlobalId aGlobalId);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves an entry based on its global ID.
TAgnGlobalId aGlobalId |
The global ID of the entry to retrieve. |
CAgnEntry* |
Pointer to the entry. |
This function will leave if no entry matching aGlobalId is found.
CAgnEntry* FetchEntryL(TAgnUniqueId aUniqueId);
Applications that call this member function will not work correctly on a version of EPOC earlier than ER5.
Retrieves an entry based on its UID.
TAgnUniqueId aUniqueId |
The UID of the entry to retrieve. |
CAgnEntry* |
Pointer to the entry. |
This function will leave if no entry matching aUniqueId is found.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |