RAgendaServ Class Reference

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
       

Inherits from

Public Member Functions
~RAgendaServ ()
void AddCategoryToListL (const TDesC &, TInt64 )
TAgnEntryId AddEntryL (CAgnEntry &, TInt64 )
void AddSessionL (const CCalSessionImpl &, TInt &)
TBool AgendaFileExistsL (const TDesC &)
void CancelChangeNotification ( TInt , TUint8 )
void CancelTask ( TInt64 )
TInt CategoryCountL ( TInt64 )
CAgnCategory * CategoryL ( TInt , TInt64 )
void CloseAgenda ( TInt )
void CommitL ( TCalCollectionId )
TInt Connect ()
void CreateAgendaFileL (const TDesC &)
CAgnSimpleEntry * CreateDumySimpleEntryL ()
TBool CreateEntryIteratorL ( TInt64 )
TInt DecreaseRef ()
void DeleteAgendaFileL (const TDesC &, TInt )
void DeleteEntryByGuidL (const TDesC8 &, TBool , TInt64 )
void DeleteEntryL ( TAgnEntryId , TCalCollectionId )
void DeleteEntryL (const RArray < TCalLocalUid > &, TCalCollectionId )
void DeleteSimpleEntry (CAgnSimpleEntry *)
void DestroyInstanceIterator ( TInt )
void DisableChangeBroadcast ( TInt64 )
void EnableChangeBroadcast ( TInt64 )
void EntriesReferencingFileAttachmentL ( RArray < TCalLocalUid > &, const CAgnAttachment &, TInt64 )
TBool EntryIteratorNextL ( TInt64 )
CAgnAttachment * FetchAttachmentByIdL ( TUint32 , TInt64 )
void FetchAttachmentsL ( CCalAttachmentIteratorImpl &, CCalAttachmentManager::TSortOrder, TInt64 )
void FetchEntryByGuidL (const TDesC8 &, RPointerArray < CAgnEntry > &, TInt64 )
CAgnEntry * FetchEntryByIteratorL ( TInt64 )
CAgnEntry * FetchEntryL ( TAgnEntryId &, TInt64 )
CAgnEntry * FetchEntryL ( TCalLocalUid , TInt64 )
void FetchFileHandleL ( RFile &, TUint32 , TInt64 )
void FetchSimpleEntriesByGuidL (const TDesC8 &, RPointerArray < CAgnSimpleEntry > &, RArray < TInt >)
void FilterCategoryL ( CArrayFixSeg < TAgnEntryId > &, TInt64 )
void FilterCategorySynchronouslyL (const CAgnCategory &, TCalCollectionId )
void FindInstancesL ( RArray < TInt64 > &, CArrayFix < TAgnInstance > &, const TFindInstanceParams &)
CCalCalendarInfoImpl * GetCalendarInfoLC (const TDesC &, CCalSessionImpl &)
void GetChangesSinceLastNotificationL ( RArray < TCalChangeEntry > &, TCalCollectionId , TCalFileId &)
void GetEntryUidsSinceDateL ( RArray < TCalLocalUid > &, const TTime &, TInt64 )
void GetFileChangesSinceLastNotificationL ( RPointerArray < CAgnFileChangeInfo > &, TInt )
HBufC8 * GetPropertyValueL (const TDesC &, TStreamId )
CAgnSimpleEntry * GetSimpleEntryL (const TAgnEntryId &, TCalCollectionId )
CAgnSimpleEntry * GetSimpleEntryL ( TCalCollectionId , TUint32 )
void GetSimpleEntryL (const RArray < TAgnInstance > &, RPointerArray < CAgnSimpleEntry > &)
void IncreaseRef ()
TInt InstanceIteratorCountL ( TInt )
TInt InstanceIteratorLocateIndexL ( TInt , TAgnInstance &)
void InstanceIteratorNextL ( TInt , CArrayFix < TAgnInstance > &, TInt )
void InstanceIteratorPreviousL ( TInt , CArrayFix < TAgnInstance > &, TInt )
CDesCArray * ListAgendaFilesL ()
RAgendaServ * NewL ()
void NextInstancesL (const RArray < TInt64 >, CArrayFix < TAgnInstance > &, const TFindInstanceParams &)
void OpenAgendaL (const CCalSessionImpl &, const TDesC &, CalCommon::TCalFileVersionSupport &, TInt64 &, TCalCollectionId &)
void PreviousInstancesL (const RArray < TInt64 >, CArrayFix < TAgnInstance > &, TFindInstanceParams &)
TBool RemoveSession (const CCalSessionImpl &)
void RequestChangeNotification ( TRequestStatus &, TInt , TUint8 )
void RequestProgress ( TRequestStatus &, TCalCollectionId )
CAgnContent * RestoreAlarmActionL ( TStreamId , TInt64 )
HBufC * RestoreTextL ( TStreamId , TInt64 )
void Rollback ( TCalCollectionId )
void SetCalendarInfoL (const TDesC &, const CCalCalendarInfoImpl &)
void SetChangeNotificationParametersL ( MCalChangeCallBack2::TChangeEntryType , TBool , TTime , TTime , TInt64 )
void SetEnablePubSubNotificationsL ( TBool , TInt64 )
TInt SetUpdateAlarm ( TBool , TInt64 )
CAgnSimpleEntryAllocator & SimpleEntryAllocator ()
void StartBuildIndex ( TBool , TRequestStatus &, TCalCollectionId )
void StartCategoryTaskL ( TBool , TRequestStatus &, const CAgnCategory &, CCalAsyncTaskManager::TAsyncAction, TCalCollectionId )
void StartTidyByDateL ( TBool , TRequestStatus &, const TAgnFilter &, const TTime &, const CalCommon::TCalTimeRange &, TCalCollectionId )
TStreamId StoreAlarmActionL (const CAgnContent &)
TTime TzRulesLastModifiedDateL ( TInt64 )
void UpdateEntryL (CAgnEntry &, TBool , TCalCollectionId )
TVersion Version ()
void WaitUntilLoadedL ( TCalCollectionId )
TInt _DebugRequestAllocatedCellsL ()
TInt _DebugRequestAllocatedHeapSizeL ()
void _DebugSetHeapFailL ( TInt , TInt )
void __dbgClearTzClientCacheL ( TBool )
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 Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::Close()
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
CBufFlat * iBuffer
RPointerArray < CCalSessionImpl > iCalSessions
TInt iLastSessionId
TInt iReferenceCount
CAgnSimpleEntryAllocator * iSimpleEntryAllocator
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RAgendaServ()

RAgendaServ ( ) [private]

~RAgendaServ()

~RAgendaServ ( )

The destructor frees all resources owned by the server, prior to its destruction.

Member Functions Documentation

AddCategoryToListL(const TDesC &, TInt64)

void AddCategoryToListL ( const TDesC & aName,
TInt64 aFileId
)
adds a category to the list
capability
WriteUserData

Parameters

const TDesC & aName
TInt64 aFileId

AddEntryL(CAgnEntry &, TInt64)

TAgnEntryId AddEntryL ( CAgnEntry & aEntry,
TInt64 aFileId
)
Add a new enty to the server
capability
WriteUserData
capability
ReadUserData

Parameters

CAgnEntry & aEntry
TInt64 aFileId

AddSessionL(const CCalSessionImpl &, TInt &)

void AddSessionL ( const CCalSessionImpl & aSession,
TInt & aSessionId
)

Parameters

const CCalSessionImpl & aSession
TInt & aSessionId

AgendaFileExistsL(const TDesC &)

TBool AgendaFileExistsL ( const TDesC & aFileName )

Parameters

const TDesC & aFileName

CancelChangeNotification(TInt, TUint8)

void CancelChangeNotification ( TInt aSessionId,
TUint8 aNotificaitonType
)

Parameters

TInt aSessionId
TUint8 aNotificaitonType

CancelTask(TInt64)

void CancelTask ( TInt64 aFileId )
capability
None

Parameters

TInt64 aFileId

CategoryCountL(TInt64)

TInt CategoryCountL ( TInt64 aFileId )
returns the number of categories in the category list
capability
None

Parameters

TInt64 aFileId

CategoryL(TInt, TInt64)

CAgnCategory * CategoryL ( TInt aIndex,
TInt64 aFileId
)
returns a category created from the category at aIndex in the category list
capability
ReadUserData

Parameters

TInt aIndex
TInt64 aFileId

CloseAgenda(TInt)

void CloseAgenda ( TInt aSessionId )
Closes the file that is open in the current agenda server session.
capability
None

Parameters

TInt aSessionId

CommitL(TCalCollectionId)

void CommitL ( TCalCollectionId aCalCollectionId )
capability
WriteUserData

Parameters

TCalCollectionId aCalCollectionId

Connect()

TInt Connect ( )

Connects the client process to the agenda server.

This function must be called before the server can be used.

ConstructL()

void ConstructL ( ) [private]

CreateAgendaFileL(const TDesC &)

void CreateAgendaFileL ( const TDesC & aFileName )
capability
WriteUserData

Parameters

const TDesC & aFileName

CreateDumySimpleEntryL()

CAgnSimpleEntry * CreateDumySimpleEntryL ( )

CreateEntryFromBufferStreamL(RReadStream &)

CAgnEntry * CreateEntryFromBufferStreamL ( RReadStream & readStream ) const [private]

Parameters

RReadStream & readStream

CreateEntryIteratorL(TInt64)

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

capability
None

Parameters

TInt64 aFileId

CreateTransmitBufferL(TInt)

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

capability
ReadUserData

Parameters

TInt aBufferSize

DecreaseRef()

TInt DecreaseRef ( )

DeleteAgendaFileL(const TDesC &, TInt)

void DeleteAgendaFileL ( const TDesC & aFileName,
TInt aSessionId
)
capability
WriteUserData

Parameters

const TDesC & aFileName
TInt aSessionId

DeleteEntryByGuidL(const TDesC8 &, TBool, TInt64)

void DeleteEntryByGuidL ( const TDesC8 & aGuid,
TBool aCommitAndNotify,
TInt64 aFileId
)
capability
WriteUserData

Parameters

const TDesC8 & aGuid
TBool aCommitAndNotify
TInt64 aFileId

DeleteEntryL(TAgnEntryId, TCalCollectionId)

void DeleteEntryL ( TAgnEntryId aEntryId,
TCalCollectionId aCalCollectionId
)
capability
WriteUserData

Parameters

TAgnEntryId aEntryId
TCalCollectionId aCalCollectionId

DeleteEntryL(const RArray< TCalLocalUid > &, TCalCollectionId)

void DeleteEntryL ( const RArray < TCalLocalUid > & aIds,
TCalCollectionId aCalCollectionId
)
capability
WriteUserData

Parameters

const RArray < TCalLocalUid > & aIds
TCalCollectionId aCalCollectionId

DeleteSimpleEntry(CAgnSimpleEntry *)

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.

Parameters

CAgnSimpleEntry * aSimpleEntry Pointer to the simple entry to delete.

DestroyInstanceIterator(TInt)

void DestroyInstanceIterator ( TInt aIteratorId )
Destroy instance iterator with specified iterator id
capability
ReadUserData

Parameters

TInt aIteratorId

DisableChangeBroadcast(TInt64)

void DisableChangeBroadcast ( TInt64 aFileId )

Parameters

TInt64 aFileId

DoConnect()

TInt DoConnect ( ) [private]

EnableChangeBroadcast(TInt64)

void EnableChangeBroadcast ( TInt64 aFileId )

Parameters

TInt64 aFileId

EntriesReferencingFileAttachmentL(RArray< TCalLocalUid > &, const CAgnAttachment &, TInt64)

void EntriesReferencingFileAttachmentL ( RArray < TCalLocalUid > & aUids,
const CAgnAttachment & aAttachment,
TInt64 aFileId
)
Fetch local UIDs of all entries that reference the attachment specified.
capability
ReadUserData

Parameters

RArray < TCalLocalUid > & aUids
const CAgnAttachment & aAttachment
TInt64 aFileId

EntryIteratorNextL(TInt64)

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

capability
None

Parameters

TInt64 aFileId

ExternalizeFilterL(const TAgnFilter &, RWriteStream &)

void ExternalizeFilterL ( const TAgnFilter & aFilter,
RWriteStream & aStream
) const [private]

Parameters

const TAgnFilter & aFilter
RWriteStream & aStream

FetchAttachmentByIdL(TUint32, TInt64)

CAgnAttachment * FetchAttachmentByIdL ( TUint32 aAttachUid,
TInt64 aFileId
)

Parameters

TUint32 aAttachUid
TInt64 aFileId

FetchAttachmentsL(CCalAttachmentIteratorImpl &, CCalAttachmentManager::TSortOrder, TInt64)

void FetchAttachmentsL ( CCalAttachmentIteratorImpl & aIteratorImpl,
CCalAttachmentManager::TSortOrder aSortOrder,
TInt64 aFileId
)
Fetch all file attachments in the order specified and add them to the iterator.
capability
ReadUserData

Parameters

CCalAttachmentIteratorImpl & aIteratorImpl
CCalAttachmentManager::TSortOrder aSortOrder
TInt64 aFileId

FetchEntryByGuidL(const TDesC8 &, RPointerArray< CAgnEntry > &, TInt64)

void FetchEntryByGuidL ( const TDesC8 & aGuid,
RPointerArray < CAgnEntry > & aList,
TInt64 aFileId
) const
capability
ReadUserData

Parameters

const TDesC8 & aGuid
RPointerArray < CAgnEntry > & aList
TInt64 aFileId

FetchEntryByIteratorL(TInt64)

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

capability
None

Parameters

TInt64 aFileId

FetchEntryL(TAgnEntryId &, TInt64)

CAgnEntry * FetchEntryL ( TAgnEntryId & aId,
TInt64 aFileId
) const
Fetches a complete entry from the server
capability
ReadUserData

Parameters

TAgnEntryId & aId
TInt64 aFileId

FetchEntryL(TCalLocalUid, TInt64)

CAgnEntry * FetchEntryL ( TCalLocalUid aId,
TInt64 aFileId
) const
Fetches a complete entry from the server
capability
ReadUserData

Parameters

TCalLocalUid aId
TInt64 aFileId

FetchFileHandleL(RFile &, TUint32, TInt64)

void FetchFileHandleL ( RFile & aFileHandle,
TUint32 aAttachmentUid,
TInt64 aFileId
)

Parameters

RFile & aFileHandle
TUint32 aAttachmentUid
TInt64 aFileId

FetchSimpleEntriesByGuidL(const TDesC8 &, RPointerArray< CAgnSimpleEntry > &, RArray< TInt >)

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)

capability
ReadUserData

Parameters

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

FilterCategoryL(CArrayFixSeg< TAgnEntryId > &, TInt64)

void FilterCategoryL ( CArrayFixSeg < TAgnEntryId > & aEntries,
TInt64 aFileId
)
package up step size and category
capability
None

Parameters

CArrayFixSeg < TAgnEntryId > & aEntries
TInt64 aFileId

FilterCategorySynchronouslyL(const CAgnCategory &, TCalCollectionId)

void FilterCategorySynchronouslyL ( const CAgnCategory & aCategory,
TCalCollectionId aCalCollectionId
)

Parameters

const CAgnCategory & aCategory
TCalCollectionId aCalCollectionId

FindInstancesL(RArray< TInt64 > &, CArrayFix< TAgnInstance > &, const TFindInstanceParams &)

void FindInstancesL ( RArray < TInt64 > & aCalCollectionIds,
CArrayFix < TAgnInstance > & aInstances,
const TFindInstanceParams & aParams
)
capability
ReadUserData

Parameters

RArray < TInt64 > & aCalCollectionIds
CArrayFix < TAgnInstance > & aInstances
const TFindInstanceParams & aParams

FindSession(const CCalSessionImpl &)

TBool FindSession ( const CCalSessionImpl & aSession ) [private]

Parameters

const CCalSessionImpl & aSession

GetCalendarInfoLC(const TDesC &, CCalSessionImpl &)

CCalCalendarInfoImpl * GetCalendarInfoLC ( const TDesC & aFilename,
CCalSessionImpl & aSessionImpl
) const
capability
ReadUserData

Parameters

const TDesC & aFilename
CCalSessionImpl & aSessionImpl

GetChangesSinceLastNotificationL(RArray< TCalChangeEntry > &, TCalCollectionId, TCalFileId &)

void GetChangesSinceLastNotificationL ( RArray < TCalChangeEntry > & aChangeItems,
TCalCollectionId aCalCollectionId,
TCalFileId & aFileId
)
capability
ReadUserData

Parameters

RArray < TCalChangeEntry > & aChangeItems
TCalCollectionId aCalCollectionId
TCalFileId & aFileId

GetEntryUidsSinceDateL(RArray< TCalLocalUid > &, const TTime &, TInt64)

void GetEntryUidsSinceDateL ( RArray < TCalLocalUid > & aUids,
const TTime & aFilter,
TInt64 aFileId
)
Place the uids of entries that have a last changed data greater than aDate and which meet the selection criteria specified in aFilter into the aUids array.
capability
None

Parameters

RArray < TCalLocalUid > & aUids
const TTime & aFilter
TInt64 aFileId

GetFileChangesSinceLastNotificationL(RPointerArray< CAgnFileChangeInfo > &, TInt)

void GetFileChangesSinceLastNotificationL ( RPointerArray < CAgnFileChangeInfo > & aAgnFileChangeInfo,
TInt aSessionId
)

Parameters

RPointerArray < CAgnFileChangeInfo > & aAgnFileChangeInfo
TInt aSessionId

GetPropertyValueL(const TDesC &, TStreamId)

HBufC8 * GetPropertyValueL ( const TDesC & aFilename,
TStreamId aStreamId
) const
capability
ReadUserData

Parameters

const TDesC & aFilename
TStreamId aStreamId

GetSimpleEntryL(const TAgnEntryId &, TCalCollectionId)

CAgnSimpleEntry * GetSimpleEntryL ( const TAgnEntryId & aId,
TCalCollectionId aCalCollectionId
) const
Get a lite entry from the server (Lite-entries are just time information, with no text, etc)
capability
ReadUserData

Parameters

const TAgnEntryId & aId
TCalCollectionId aCalCollectionId

GetSimpleEntryL(TCalCollectionId, TUint32)

CAgnSimpleEntry * GetSimpleEntryL ( TCalCollectionId aShortFileId,
TUint32 aId
) const
Get a lite entry from the server (Lite-entries are just time information, with no text, etc)
capability
ReadUserData

Parameters

TCalCollectionId aShortFileId
TUint32 aId

GetSimpleEntryL(const RArray< TAgnInstance > &, RPointerArray< CAgnSimpleEntry > &)

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)

capability
ReadUserData

Parameters

const RArray < TAgnInstance > & aEntryIds
RPointerArray < CAgnSimpleEntry > & aLiteEntries on return will contain the fetched lite entries.

IncreaseRef()

void IncreaseRef ( )

InstanceIteratorCountL(TInt)

TInt InstanceIteratorCountL ( TInt aIteratorId ) const
Get the number of instances stored in an iterator
capability
ReadUserData

Parameters

TInt aIteratorId

InstanceIteratorLocateIndexL(TInt, TAgnInstance &)

TInt InstanceIteratorLocateIndexL ( TInt aIteratorId,
TAgnInstance & aInstanceId
)
Find the index of the given instance in the iterator.
capability
ReadUserData

Parameters

TInt aIteratorId
TAgnInstance & aInstanceId

InstanceIteratorNextL(TInt, CArrayFix< TAgnInstance > &, TInt)

void InstanceIteratorNextL ( TInt aIteratorId,
CArrayFix < TAgnInstance > & aInstances,
TInt aIndex
) const
Fetch the available instances start from specified index
capability
ReadUserData

Parameters

TInt aIteratorId
CArrayFix < TAgnInstance > & aInstances
TInt aIndex

InstanceIteratorPreviousL(TInt, CArrayFix< TAgnInstance > &, TInt)

void InstanceIteratorPreviousL ( TInt aIteratorId,
CArrayFix < TAgnInstance > & aInstances,
TInt aIndex
) const
Fetch the previous instances which index are before given index
capability
ReadUserData

Parameters

TInt aIteratorId
CArrayFix < TAgnInstance > & aInstances
TInt aIndex

InternalizeSimpleEntryL(RReadStream &)

CAgnSimpleEntry * InternalizeSimpleEntryL ( RReadStream & aStream ) const [private]

Parameters

RReadStream & aStream

ListAgendaFilesL()

CDesCArray * ListAgendaFilesL ( )

LoadingInstancesFromBufferL(CArrayFix< TAgnInstance > &, TInt)

void LoadingInstancesFromBufferL ( CArrayFix < TAgnInstance > & aInstances,
TInt aBufSize
) const [private]

Parameters

CArrayFix < TAgnInstance > & aInstances
TInt aBufSize

NewL()

RAgendaServ * NewL ( ) [static]

Constructs a new RAgendaServ , initialising all member data to NULL.

NextInstancesL(const RArray< TInt64 >, CArrayFix< TAgnInstance > &, const TFindInstanceParams &)

void NextInstancesL ( const RArray < TInt64 > aFileIds,
CArrayFix < TAgnInstance > & aInstances,
const TFindInstanceParams & aParams
) const

Finds the next instances in the calendar store

capability
ReadUserData

Parameters

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

OpenAgendaL(const CCalSessionImpl &, const TDesC &, CalCommon::TCalFileVersionSupport &, TInt64 &, TCalCollectionId &)

void OpenAgendaL ( const CCalSessionImpl & aSession,
const TDesC & aFileName,
CalCommon::TCalFileVersionSupport & status,
TInt64 & aFileId,
TCalCollectionId & aCollectionId
)
capability
None

Parameters

const CCalSessionImpl & aSession
const TDesC & aFileName
CalCommon::TCalFileVersionSupport & status
TInt64 & aFileId
TCalCollectionId & aCollectionId

Panic(TAgnClientPanic)

void Panic ( TAgnClientPanic aPanic ) const [private]

Parameters

TAgnClientPanic aPanic

PreviousInstancesL(const RArray< TInt64 >, CArrayFix< TAgnInstance > &, TFindInstanceParams &)

void PreviousInstancesL ( const RArray < TInt64 > aFileIds,
CArrayFix < TAgnInstance > & aInstances,
TFindInstanceParams & aParams
) const

Finds previous instances in the calendar store

capability
ReadUserData

Parameters

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

ReadEntryFromServerSessionL(TInt)

CAgnEntry * ReadEntryFromServerSessionL ( TInt aBufferSize ) const [private]

Parameters

TInt aBufferSize

RemoveSession(const CCalSessionImpl &)

TBool RemoveSession ( const CCalSessionImpl & aSession )

Parameters

const CCalSessionImpl & aSession

RequestChangeNotification(TRequestStatus &, TInt, TUint8)

void RequestChangeNotification ( TRequestStatus & aStatus,
TInt aSessionId,
TUint8 aNotificaitonType
)

Parameters

TRequestStatus & aStatus
TInt aSessionId
TUint8 aNotificaitonType

RequestProgress(TRequestStatus &, TCalCollectionId)

void RequestProgress ( TRequestStatus & aStatus,
TCalCollectionId aCalCollectionId
)

Parameters

TRequestStatus & aStatus
TCalCollectionId aCalCollectionId

RestoreAlarmActionL(TStreamId, TInt64)

CAgnContent * RestoreAlarmActionL ( TStreamId aId,
TInt64 aFileId
)
capability
ReadUserData

Parameters

TStreamId aId
TInt64 aFileId

RestoreTextL(TStreamId, TInt64)

HBufC * RestoreTextL ( TStreamId aId,
TInt64 aFileId
)
Restore the notes text from the server
capability
ReadUserData

Parameters

TStreamId aId
TInt64 aFileId

Rollback(TCalCollectionId)

void Rollback ( TCalCollectionId aCalCollectionId )
capability
WriteUserData

Parameters

TCalCollectionId aCalCollectionId

SendFileAttachmentHandlesL(CAgnEntry &, TInt64)

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

Parameters

CAgnEntry & aEntry
TInt64 aFileId

ServerRequestL(TInt, TAny *, TAny *, TAny *, TAny *)

TInt ServerRequestL ( TInt aCommand,
TAny * aArg1 = NULL,
TAny * aArg2 = NULL,
TAny * aArg3 = NULL,
TAny * aArg4 = NULL
) const [private]

Parameters

TInt aCommand
TAny * aArg1 = NULL
TAny * aArg2 = NULL
TAny * aArg3 = NULL
TAny * aArg4 = NULL

SetCalendarInfoL(const TDesC &, const CCalCalendarInfoImpl &)

void SetCalendarInfoL ( const TDesC & aFilename,
const CCalCalendarInfoImpl & aCalendarInfo
) const
capability
WriteUserData

Parameters

const TDesC & aFilename
const CCalCalendarInfoImpl & aCalendarInfo

SetChangeNotificationParametersL(MCalChangeCallBack2::TChangeEntryType, TBool, TTime, TTime, TInt64)

void SetChangeNotificationParametersL ( MCalChangeCallBack2::TChangeEntryType aEntryType,
TBool aIncludeUndatedTodos,
TTime aFilterStartTimeUtc,
TTime aFilterEndTimeUtc,
TInt64 aFileId
)

Parameters

MCalChangeCallBack2::TChangeEntryType aEntryType
TBool aIncludeUndatedTodos
TTime aFilterStartTimeUtc
TTime aFilterEndTimeUtc
TInt64 aFileId

SetEnablePubSubNotificationsL(TBool, TInt64)

void SetEnablePubSubNotificationsL ( TBool aEnablePubSubNotifacation,
TInt64 aFileId
)

Parameters

TBool aEnablePubSubNotifacation
TInt64 aFileId

SetUpdateAlarm(TBool, TInt64)

TInt SetUpdateAlarm ( TBool aUpdateAlarm,
TInt64 aFileId
)

Parameters

TBool aUpdateAlarm
TInt64 aFileId

SimpleEntryAllocator()

CAgnSimpleEntryAllocator & SimpleEntryAllocator ( ) const

StartBuildIndex(TBool, TRequestStatus &, TCalCollectionId)

void StartBuildIndex ( TBool aNeedProgressReport,
TRequestStatus & aStatus,
TCalCollectionId aCalCollectionId
)

Start building the Indexes asynchronously.

Parameters

TBool aNeedProgressReport
TRequestStatus & aStatus
TCalCollectionId aCalCollectionId

StartCategoryTaskL(TBool, TRequestStatus &, const CAgnCategory &, CCalAsyncTaskManager::TAsyncAction, TCalCollectionId)

void StartCategoryTaskL ( TBool aReportProgress,
TRequestStatus & aStatus,
const CAgnCategory & aCategory,
CCalAsyncTaskManager::TAsyncAction aTask,
TCalCollectionId aCalCollectionId
)
capability
WriteUserData

Parameters

TBool aReportProgress
TRequestStatus & aStatus
const CAgnCategory & aCategory
CCalAsyncTaskManager::TAsyncAction aTask
TCalCollectionId aCalCollectionId

StartServer()

TInt StartServer ( ) [private, static]

StartTidyByDateL(TBool, TRequestStatus &, const TAgnFilter &, const TTime &, const CalCommon::TCalTimeRange &, TCalCollectionId)

void StartTidyByDateL ( TBool aReportProgress,
TRequestStatus & aStatus,
const TAgnFilter & aFilter,
const TTime & aTodaysDate,
const CalCommon::TCalTimeRange & aCalTimeRange,
TCalCollectionId aCalCollectionId
)
Start tidying by ToDo list asynchronously.
capability
WriteUserData
capability
ReadUserData

Parameters

TBool aReportProgress
TRequestStatus & aStatus
const TAgnFilter & aFilter
const TTime & aTodaysDate
const CalCommon::TCalTimeRange & aCalTimeRange
TCalCollectionId aCalCollectionId

StoreAlarmActionL(const CAgnContent &)

TStreamId StoreAlarmActionL ( const CAgnContent & aAlarmAction )

Parameters

const CAgnContent & aAlarmAction

TransferFileHandleToServerL(TCalLocalUid, TInt, CAgnAttachmentFile &, TInt64)

void TransferFileHandleToServerL ( TCalLocalUid aLocalUid,
TInt aAttachmentIndex,
CAgnAttachmentFile & aFileAttachment,
TInt64 aFileId
) [private]
Store a new attachment with a file handle. The file handle is transferred to the Calendar server, which moves the file to the Calendar store. On the server-side, this will also update the entry containing this attachment with the new attachment metadata.
capability
WriteUserData

Parameters

TCalLocalUid aLocalUid
TInt aAttachmentIndex
CAgnAttachmentFile & aFileAttachment
TInt64 aFileId

TzRulesLastModifiedDateL(TInt64)

TTime TzRulesLastModifiedDateL ( TInt64 aFileId )
Get the last modified time for tz rules from time zone server It is called when the client getting the last modified date for an entry since the last modified time of an entry is not updated when tz database is updated.
capability
none

Parameters

TInt64 aFileId

UpdateEntryL(CAgnEntry &, TBool, TCalCollectionId)

void UpdateEntryL ( CAgnEntry & aEntry,
TBool aDeleteChildren,
TCalCollectionId aCalCollectionId
)
Updates an existing entry on the server
capability
WriteUserData
capability
ReadUserData
leave

Parameters

CAgnEntry & aEntry
TBool aDeleteChildren
TCalCollectionId aCalCollectionId

Version()

TVersion Version ( ) const

WaitUntilLoadedL(TCalCollectionId)

void WaitUntilLoadedL ( TCalCollectionId aCalCollectionId )

Parameters

TCalCollectionId aCalCollectionId

WriteBinaryDataToNewAttachmentFileL(CAgnEntry &, TInt, TInt64)

void WriteBinaryDataToNewAttachmentFileL ( CAgnEntry & aEntry,
TInt aAttachmentIndex,
TInt64 aFileId
) [private]
Store a new attachment from binary data. A new file handle is created on the Calendar server, and this is transferred to the client side so that the binary data can be written directly. On the server-side, this will also update the entry containing this attachment with the new attachment metadata.
capability
WriteUserData

Parameters

CAgnEntry & aEntry
TInt aAttachmentIndex
TInt64 aFileId

_DebugRequestAllocatedCellsL()

TInt _DebugRequestAllocatedCellsL ( )
Gets the number of allocated cells in the server space, debug only.
capability
None

_DebugRequestAllocatedHeapSizeL()

TInt _DebugRequestAllocatedHeapSizeL ( )
Gets the number of allocated cells in the server space, debug only.
capability
None

_DebugSetHeapFailL(TInt, TInt)

void _DebugSetHeapFailL ( TInt aHeapAllocationFailureFlag,
TInt aCount
)
Set heap allocation failure according the arguments, debug only.
capability
None

Parameters

TInt aHeapAllocationFailureFlag heap allocation failure flags (RAllocator::TAllocFail)
TInt aCount Fail at allocation number aCount

__dbgClearTzClientCacheL(TBool)

void __dbgClearTzClientCacheL ( TBool aRestartCaching )
capability
none

Parameters

TBool aRestartCaching

Member Data Documentation

CBufFlat * iBuffer

CBufFlat * iBuffer [private]

RPointerArray< CCalSessionImpl > iCalSessions

RPointerArray < CCalSessionImpl > iCalSessions [private]

TInt iLastSessionId

TInt iLastSessionId [private]

TInt iReferenceCount

TInt iReferenceCount [private]

CAgnSimpleEntryAllocator * iSimpleEntryAllocator

CAgnSimpleEntryAllocator * iSimpleEntryAllocator [private]