class RAgendaServ : public RSessionBase |
The client interface to the agenda server.
This class accesses agenda data by sending messages synchronously to the server. This allows shared access to an agenda file by more than one client.
Most functions in this class should not be used directly. If there is a corresponding version of the function in the model class, that should be used instead.
Note that a separate instance of the RAgendaServ class is required for each agenda file that is open. Only one file can be open at any one time in the same server session.
The API is used as follows:
RAgendaServ* agnServer = RAgendaServ::NewL(); // allocate and construct server session CleanupStack::PushL(agnServer); // ensure object is deleted agnServer->Connect(); // connect to the server CleanupClosePushL(*agnServer); // ensure that the session's Close() method gets called CAgnEntryModel* model = CAgnEntryModel::NewL(); // allocate and construct model CleanupStack::PushL(model); model->SetServer(agnServer); // set model's server session pointer model->OpenL(fileName) // open file using server // ...Use agenda model API as normal - invokes corresponding server functions CleanupStack::PopAndDestroy(3); // model, close session with server, agnServer
Private Member Functions | |
---|---|
RAgendaServ () | |
void | ConstructL () |
CAgnEntry * | CreateEntryFromBufferStreamL ( RReadStream &) |
CBufFlat * | CreateTransmitBufferL ( TInt ) |
TInt | DoConnect () |
void | ExternalizeFilterL (const TAgnFilter &, RWriteStream &) |
TBool | FindSession (const CCalSessionImpl &) |
CAgnSimpleEntry * | InternalizeSimpleEntryL ( RReadStream &) |
void | LoadingInstancesFromBufferL ( CArrayFix < TAgnInstance > &, TInt ) |
void | Panic ( TAgnClientPanic ) |
CAgnEntry * | ReadEntryFromServerSessionL ( TInt ) |
void | SendFileAttachmentHandlesL (CAgnEntry &, TInt64 ) |
TInt | ServerRequestL ( TInt , TAny *, TAny *, TAny *, TAny *) |
TInt | StartServer () |
void | TransferFileHandleToServerL ( TCalLocalUid , TInt , CAgnAttachmentFile &, TInt64 ) |
void | WriteBinaryDataToNewAttachmentFileL (CAgnEntry &, TInt , TInt64 ) |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes | |
RSessionBase:TAttachMode |
Private Attributes | |
---|---|
CBufFlat * | iBuffer |
RPointerArray < CCalSessionImpl > | iCalSessions |
TInt | iLastSessionId |
TInt | iReferenceCount |
CAgnSimpleEntryAllocator * | iSimpleEntryAllocator |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
~RAgendaServ | ( | ) |
The destructor frees all resources owned by the server, prior to its destruction.
void | AddCategoryToListL | ( | const TDesC & | aName, |
TInt64 | aFileId | |||
) |
TAgnEntryId | AddEntryL | ( | CAgnEntry & | aEntry, |
TInt64 | aFileId | |||
) |
CAgnEntry & aEntry | |
TInt64 aFileId |
void | AddSessionL | ( | const CCalSessionImpl & | aSession, |
TInt & | aSessionId | |||
) |
const CCalSessionImpl & aSession | |
TInt & aSessionId |
TBool | AgendaFileExistsL | ( | const TDesC & | aFileName | ) |
const TDesC & aFileName |
void | CancelChangeNotification | ( | TInt | aSessionId, |
TUint8 | aNotificaitonType | |||
) |
TInt | CategoryCountL | ( | TInt64 | aFileId | ) |
TInt64 aFileId |
CAgnCategory * | CategoryL | ( | TInt | aIndex, |
TInt64 | aFileId | |||
) |
void | CloseAgenda | ( | TInt | aSessionId | ) |
TInt aSessionId |
void | CommitL | ( | TCalCollectionId | aCalCollectionId | ) |
TCalCollectionId aCalCollectionId |
TInt | Connect | ( | ) |
Connects the client process to the agenda server.
This function must be called before the server can be used.
void | CreateAgendaFileL | ( | const TDesC & | aFileName | ) |
const TDesC & aFileName |
CAgnEntry * | CreateEntryFromBufferStreamL | ( | RReadStream & | readStream | ) | const [private] |
RReadStream & readStream |
TBool | CreateEntryIteratorL | ( | TInt64 | aFileId | ) |
Creates an iterator for iterating though all the entries in the file.
This may be used for activities such as merging or finding. The function returns EFalse if no entries are available. If any entries are available, the iterator is set to the first one.
Although this API does not have a trailing L it can leave
TInt64 aFileId |
CBufFlat * | CreateTransmitBufferL | ( | TInt | aBufferSize | ) | const [private] |
Checks the size of the incoming buffer, and if it is larger than the size of the buffer already defined, allocates enough space in aBuffer, and transfers the data from the server
TInt aBufferSize |
void | DeleteAgendaFileL | ( | const TDesC & | aFileName, |
TInt | aSessionId | |||
) |
void | DeleteEntryByGuidL | ( | const TDesC8 & | aGuid, |
TBool | aCommitAndNotify, | |||
TInt64 | aFileId | |||
) |
void | DeleteEntryL | ( | TAgnEntryId | aEntryId, |
TCalCollectionId | aCalCollectionId | |||
) |
TAgnEntryId aEntryId | |
TCalCollectionId aCalCollectionId |
void | DeleteEntryL | ( | const RArray < TCalLocalUid > & | aIds, |
TCalCollectionId | aCalCollectionId | |||
) |
const RArray < TCalLocalUid > & aIds | |
TCalCollectionId aCalCollectionId |
void | DeleteSimpleEntry | ( | CAgnSimpleEntry * | aSimpleEntry | ) |
Deletes a sort entry from the sort entry allocator (a specialised memory handler for sort entry objects).
A sort entry is an entry in an agenda index. The function frees the sort entry object and puts it on the free list.
CAgnSimpleEntry * aSimpleEntry | Pointer to the simple entry to delete. |
void | DestroyInstanceIterator | ( | TInt | aIteratorId | ) |
TInt aIteratorId |
void | DisableChangeBroadcast | ( | TInt64 | aFileId | ) |
TInt64 aFileId |
void | EnableChangeBroadcast | ( | TInt64 | aFileId | ) |
TInt64 aFileId |
void | EntriesReferencingFileAttachmentL | ( | RArray < TCalLocalUid > & | aUids, |
const CAgnAttachment & | aAttachment, | |||
TInt64 | aFileId | |||
) |
RArray < TCalLocalUid > & aUids | |
const CAgnAttachment & aAttachment | |
TInt64 aFileId |
TBool | EntryIteratorNextL | ( | TInt64 | aFileId | ) |
Moves the entry iterator to the next entry.
Returns EFalse if no more entries exist.
Although this API does not have a trailing L it can leave
TInt64 aFileId |
void | ExternalizeFilterL | ( | const TAgnFilter & | aFilter, |
RWriteStream & | aStream | |||
) | const [private] |
const TAgnFilter & aFilter | |
RWriteStream & aStream |
CAgnAttachment * | FetchAttachmentByIdL | ( | TUint32 | aAttachUid, |
TInt64 | aFileId | |||
) |
void | FetchAttachmentsL | ( | CCalAttachmentIteratorImpl & | aIteratorImpl, |
CCalAttachmentManager::TSortOrder | aSortOrder, | |||
TInt64 | aFileId | |||
) |
CCalAttachmentIteratorImpl & aIteratorImpl | |
CCalAttachmentManager::TSortOrder aSortOrder | |
TInt64 aFileId |
void | FetchEntryByGuidL | ( | const TDesC8 & | aGuid, |
RPointerArray < CAgnEntry > & | aList, | |||
TInt64 | aFileId | |||
) | const |
const TDesC8 & aGuid | |
RPointerArray < CAgnEntry > & aList | |
TInt64 aFileId |
CAgnEntry * | FetchEntryByIteratorL | ( | TInt64 | aFileId | ) |
Retrieves the ID for the entry at the current iterator position.
The ID can be used to retrieve the entry using CAgnEntryModel::FetchEntryL().
TInt64 aFileId |
CAgnEntry * | FetchEntryL | ( | TAgnEntryId & | aId, |
TInt64 | aFileId | |||
) | const |
TAgnEntryId & aId | |
TInt64 aFileId |
CAgnEntry * | FetchEntryL | ( | TCalLocalUid | aId, |
TInt64 | aFileId | |||
) | const |
TCalLocalUid aId | |
TInt64 aFileId |
void | FetchFileHandleL | ( | RFile & | aFileHandle, |
TUint32 | aAttachmentUid, | |||
TInt64 | aFileId | |||
) |
void | FetchSimpleEntriesByGuidL | ( | const TDesC8 & | aUid, |
RPointerArray < CAgnSimpleEntry > & | aLiteEntries, | |||
RArray < TInt > | aCalCollectionIds | |||
) | const |
Get an array of lite entries from the server
On return the instance ids and lite entries will have corresponding indices in the arrays (Lite-entries are just time information, with no text, etc)
const TDesC8 & aUid | The UID of the lite entries to fetch |
RPointerArray < CAgnSimpleEntry > & aLiteEntries | on return will contain the fetched lite entries. |
RArray < TInt > aCalCollectionIds |
void | FilterCategoryL | ( | CArrayFixSeg < TAgnEntryId > & | aEntries, |
TInt64 | aFileId | |||
) |
CArrayFixSeg < TAgnEntryId > & aEntries | |
TInt64 aFileId |
void | FilterCategorySynchronouslyL | ( | const CAgnCategory & | aCategory, |
TCalCollectionId | aCalCollectionId | |||
) |
const CAgnCategory & aCategory | |
TCalCollectionId aCalCollectionId |
void | FindInstancesL | ( | RArray < TInt64 > & | aCalCollectionIds, |
CArrayFix < TAgnInstance > & | aInstances, | |||
const TFindInstanceParams & | aParams | |||
) |
RArray < TInt64 > & aCalCollectionIds | |
CArrayFix < TAgnInstance > & aInstances | |
const TFindInstanceParams & aParams |
TBool | FindSession | ( | const CCalSessionImpl & | aSession | ) | [private] |
const CCalSessionImpl & aSession |
CCalCalendarInfoImpl * | GetCalendarInfoLC | ( | const TDesC & | aFilename, |
CCalSessionImpl & | aSessionImpl | |||
) | const |
const TDesC & aFilename | |
CCalSessionImpl & aSessionImpl |
void | GetChangesSinceLastNotificationL | ( | RArray < TCalChangeEntry > & | aChangeItems, |
TCalCollectionId | aCalCollectionId, | |||
TCalFileId & | aFileId | |||
) |
RArray < TCalChangeEntry > & aChangeItems | |
TCalCollectionId aCalCollectionId | |
TCalFileId & aFileId |
void | GetEntryUidsSinceDateL | ( | RArray < TCalLocalUid > & | aUids, |
const TTime & | aFilter, | |||
TInt64 | aFileId | |||
) |
RArray < TCalLocalUid > & aUids | |
const TTime & aFilter | |
TInt64 aFileId |
void | GetFileChangesSinceLastNotificationL | ( | RPointerArray < CAgnFileChangeInfo > & | aAgnFileChangeInfo, |
TInt | aSessionId | |||
) |
RPointerArray < CAgnFileChangeInfo > & aAgnFileChangeInfo | |
TInt aSessionId |
HBufC8 * | GetPropertyValueL | ( | const TDesC & | aFilename, |
TStreamId | aStreamId | |||
) | const |
CAgnSimpleEntry * | GetSimpleEntryL | ( | const TAgnEntryId & | aId, |
TCalCollectionId | aCalCollectionId | |||
) | const |
const TAgnEntryId & aId | |
TCalCollectionId aCalCollectionId |
CAgnSimpleEntry * | GetSimpleEntryL | ( | TCalCollectionId | aShortFileId, |
TUint32 | aId | |||
) | const |
TCalCollectionId aShortFileId | |
TUint32 aId |
void | GetSimpleEntryL | ( | const RArray < TAgnInstance > & | aEntryIds, |
RPointerArray < CAgnSimpleEntry > & | aLiteEntries | |||
) | const |
Get an array of lite entries from the server
On return the instance ids and lite entries will have corresponding indices in the arrays (Lite-entries are just time information, with no text, etc)
const RArray < TAgnInstance > & aEntryIds | |
RPointerArray < CAgnSimpleEntry > & aLiteEntries | on return will contain the fetched lite entries. |
TInt | InstanceIteratorCountL | ( | TInt | aIteratorId | ) | const |
TInt aIteratorId |
TInt | InstanceIteratorLocateIndexL | ( | TInt | aIteratorId, |
TAgnInstance & | aInstanceId | |||
) |
TInt aIteratorId | |
TAgnInstance & aInstanceId |
void | InstanceIteratorNextL | ( | TInt | aIteratorId, |
CArrayFix < TAgnInstance > & | aInstances, | |||
TInt | aIndex | |||
) | const |
TInt aIteratorId | |
CArrayFix < TAgnInstance > & aInstances | |
TInt aIndex |
void | InstanceIteratorPreviousL | ( | TInt | aIteratorId, |
CArrayFix < TAgnInstance > & | aInstances, | |||
TInt | aIndex | |||
) | const |
TInt aIteratorId | |
CArrayFix < TAgnInstance > & aInstances | |
TInt aIndex |
CAgnSimpleEntry * | InternalizeSimpleEntryL | ( | RReadStream & | aStream | ) | const [private] |
RReadStream & aStream |
void | LoadingInstancesFromBufferL | ( | CArrayFix < TAgnInstance > & | aInstances, |
TInt | aBufSize | |||
) | const [private] |
CArrayFix < TAgnInstance > & aInstances | |
TInt aBufSize |
RAgendaServ * | NewL | ( | ) | [static] |
Constructs a new RAgendaServ , initialising all member data to NULL.
void | NextInstancesL | ( | const RArray < TInt64 > | aFileIds, |
CArrayFix < TAgnInstance > & | aInstances, | |||
const TFindInstanceParams & | aParams | |||
) | const |
Finds the next instances in the calendar store
const RArray < TInt64 > aFileIds | |
CArrayFix < TAgnInstance > & aInstances | The next instances. Note that the instances will be appended to the end of the array |
const TFindInstanceParams & aParams | The filter settings to use when finding the next instances |
void | OpenAgendaL | ( | const CCalSessionImpl & | aSession, |
const TDesC & | aFileName, | |||
CalCommon::TCalFileVersionSupport & | status, | |||
TInt64 & | aFileId, | |||
TCalCollectionId & | aCollectionId | |||
) |
const CCalSessionImpl & aSession | |
const TDesC & aFileName | |
CalCommon::TCalFileVersionSupport & status | |
TInt64 & aFileId | |
TCalCollectionId & aCollectionId |
void | Panic | ( | TAgnClientPanic | aPanic | ) | const [private] |
TAgnClientPanic aPanic |
void | PreviousInstancesL | ( | const RArray < TInt64 > | aFileIds, |
CArrayFix < TAgnInstance > & | aInstances, | |||
TFindInstanceParams & | aParams | |||
) | const |
Finds previous instances in the calendar store
const RArray < TInt64 > aFileIds | |
CArrayFix < TAgnInstance > & aInstances | The previous instances. Note that the instances will be inserted at the begining of the array |
TFindInstanceParams & aParams | The filter settings to use when fidning the previous instances |
CAgnEntry * | ReadEntryFromServerSessionL | ( | TInt | aBufferSize | ) | const [private] |
TInt aBufferSize |
TBool | RemoveSession | ( | const CCalSessionImpl & | aSession | ) |
const CCalSessionImpl & aSession |
void | RequestChangeNotification | ( | TRequestStatus & | aStatus, |
TInt | aSessionId, | |||
TUint8 | aNotificaitonType | |||
) |
TRequestStatus & aStatus | |
TInt aSessionId | |
TUint8 aNotificaitonType |
void | RequestProgress | ( | TRequestStatus & | aStatus, |
TCalCollectionId | aCalCollectionId | |||
) |
TRequestStatus & aStatus | |
TCalCollectionId aCalCollectionId |
CAgnContent * | RestoreAlarmActionL | ( | TStreamId | aId, |
TInt64 | aFileId | |||
) |
HBufC * | RestoreTextL | ( | TStreamId | aId, |
TInt64 | aFileId | |||
) |
void | Rollback | ( | TCalCollectionId | aCalCollectionId | ) |
TCalCollectionId aCalCollectionId |
void | SendFileAttachmentHandlesL | ( | CAgnEntry & | aEntry, |
TInt64 | aFileId | |||
) | [private] |
For all attachments on this entry, find out whether they are file attachments. If it contains a file handle, then it must be transferred to the server through a separate IPC call (TransferFileHandleToServerL). If it contains binary data, then a file handle must be fetched from the server, to which the binary data will be written directly (WriteBinaryDataToNewAttachmentFileL).
CAgnEntry & aEntry | |
TInt64 aFileId |
TInt | ServerRequestL | ( | TInt | aCommand, |
TAny * | aArg1 = NULL, | |||
TAny * | aArg2 = NULL, | |||
TAny * | aArg3 = NULL, | |||
TAny * | aArg4 = NULL | |||
) | const [private] |
void | SetCalendarInfoL | ( | const TDesC & | aFilename, |
const CCalCalendarInfoImpl & | aCalendarInfo | |||
) | const |
const TDesC & aFilename | |
const CCalCalendarInfoImpl & aCalendarInfo |
void | SetChangeNotificationParametersL | ( | MCalChangeCallBack2::TChangeEntryType | aEntryType, |
TBool | aIncludeUndatedTodos, | |||
TTime | aFilterStartTimeUtc, | |||
TTime | aFilterEndTimeUtc, | |||
TInt64 | aFileId | |||
) |
MCalChangeCallBack2::TChangeEntryType aEntryType | |
TBool aIncludeUndatedTodos | |
TTime aFilterStartTimeUtc | |
TTime aFilterEndTimeUtc | |
TInt64 aFileId |
void | SetEnablePubSubNotificationsL | ( | TBool | aEnablePubSubNotifacation, |
TInt64 | aFileId | |||
) |
void | StartBuildIndex | ( | TBool | aNeedProgressReport, |
TRequestStatus & | aStatus, | |||
TCalCollectionId | aCalCollectionId | |||
) |
Start building the Indexes asynchronously.
TBool aNeedProgressReport | |
TRequestStatus & aStatus | |
TCalCollectionId aCalCollectionId |
void | StartCategoryTaskL | ( | TBool | aReportProgress, |
TRequestStatus & | aStatus, | |||
const CAgnCategory & | aCategory, | |||
CCalAsyncTaskManager::TAsyncAction | aTask, | |||
TCalCollectionId | aCalCollectionId | |||
) |
TBool aReportProgress | |
TRequestStatus & aStatus | |
const CAgnCategory & aCategory | |
CCalAsyncTaskManager::TAsyncAction aTask | |
TCalCollectionId aCalCollectionId |
void | StartTidyByDateL | ( | TBool | aReportProgress, |
TRequestStatus & | aStatus, | |||
const TAgnFilter & | aFilter, | |||
const TTime & | aTodaysDate, | |||
const CalCommon::TCalTimeRange & | aCalTimeRange, | |||
TCalCollectionId | aCalCollectionId | |||
) |
TBool aReportProgress | |
TRequestStatus & aStatus | |
const TAgnFilter & aFilter | |
const TTime & aTodaysDate | |
const CalCommon::TCalTimeRange & aCalTimeRange | |
TCalCollectionId aCalCollectionId |
TStreamId | StoreAlarmActionL | ( | const CAgnContent & | aAlarmAction | ) |
const CAgnContent & aAlarmAction |
void | TransferFileHandleToServerL | ( | TCalLocalUid | aLocalUid, |
TInt | aAttachmentIndex, | |||
CAgnAttachmentFile & | aFileAttachment, | |||
TInt64 | aFileId | |||
) | [private] |
TCalLocalUid aLocalUid | |
TInt aAttachmentIndex | |
CAgnAttachmentFile & aFileAttachment | |
TInt64 aFileId |
TTime | TzRulesLastModifiedDateL | ( | TInt64 | aFileId | ) |
TInt64 aFileId |
void | UpdateEntryL | ( | CAgnEntry & | aEntry, |
TBool | aDeleteChildren, | |||
TCalCollectionId | aCalCollectionId | |||
) |
CAgnEntry & aEntry | |
TBool aDeleteChildren | |
TCalCollectionId aCalCollectionId |
void | WaitUntilLoadedL | ( | TCalCollectionId | aCalCollectionId | ) |
TCalCollectionId aCalCollectionId |
void | WriteBinaryDataToNewAttachmentFileL | ( | CAgnEntry & | aEntry, |
TInt | aAttachmentIndex, | |||
TInt64 | aFileId | |||
) | [private] |
TInt | _DebugRequestAllocatedCellsL | ( | ) |
TInt | _DebugRequestAllocatedHeapSizeL | ( | ) |
void | _DebugSetHeapFailL | ( | TInt | aHeapAllocationFailureFlag, |
TInt | aCount | |||
) |
void | __dbgClearTzClientCacheL | ( | TBool | aRestartCaching | ) |
TBool aRestartCaching |
RPointerArray < CCalSessionImpl > | iCalSessions | [private] |
CAgnSimpleEntryAllocator * | iSimpleEntryAllocator | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.