class CAgnEntry : public CAgnSimpleEntry |
Class representing a full agenda entry.
CAgnEntry adds common entry information including summary, description, location, categories and attendees to CAgnSimpleEntry.
To find the type of an entry or instance, use CAgnSimpleEntry::Type().
On the client-side, a CAgnEntry is created whenever CCalEntry::NewL is called, and whenever a CCalEntry is fetched from the calendar store. When a CCalInstance is fetched from the calendar store, it will contain a 'light entry' (i.e. a CAgnSimpleEntry), but if any operation is made on that light entry which cannot be handled by CAgnSimpleEntry, the full CAgnEntry will be loaded.
On the server-side, CAgnEntry is externalized and internalized to streams in the calendar file. CAgnEntry is not used in any of the indexes.
Private Member Functions | |
---|---|
CAgnEntry(CCalEntry::TType) | |
void | ConstructL(HBufC8 *, CCalEntry::TMethod, TUint) |
void | ConstructL(HBufC8 *, CCalEntry::TMethod, TUint, const TAgnCalendarTime &, CalCommon::TRecurrenceRange) |
void | ExternalizeEntryL(RWriteStream &, TBool) |
void | ExternalizeGsDataL(RWriteStream &, TBool) |
void | InternalizeEntryL(RReadStream &, TBool) |
void | InternalizeGsDataL(RReadStream &, TBool) |
TBool | IsFlagSet(TFlags) |
void | SetFlagOff(TFlags) |
void | SetFlagOn(TFlags) |
Public Member Enumerations | |
---|---|
enum | TAgnDataChange { EAgnDataNoChange, EAgnDataDeleted, EAgnDataAdded, EAgnDataUpdated } |
Private Member Enumerations | |
---|---|
enum | TFlags { EAgnAlarmActionDeleted = 0x01 } |
CAgnEntry | ( | CCalEntry::TType | aType | ) | [private] |
CCalEntry::TType aType |
IMPORT_C | ~CAgnEntry | ( | ) |
The destructor frees all resources owned by the entry, prior to its destruction.
IMPORT_C void | AddAttachmentL | ( | CAgnAttachment * | aAttachment | ) |
CAgnAttachment * aAttachment |
IMPORT_C void | AddAttendeeL | ( | CAgnAttendee * | aAttendee | ) |
Appends an attendee to the entry's list of attendees.
CAgnAttendee * aAttendee | Pointer to the attendee details. |
IMPORT_C void | AddCategoryL | ( | CAgnCategory * | aCategory | ) |
Appends a category to the entry's list of categories.
The entry takes ownership of the category specified.
leave
KErrAlreadyExists if category already present
CAgnCategory * aCategory | The category to be added |
IMPORT_C void | AddChildIdL | ( | const TGsChildRefData & | aChildRefData | ) |
const TGsChildRefData & aChildRefData |
IMPORT_C TAgnDataChange | AlarmActionChange | ( | ) | const |
Check if the alarm action changed
1. If iAlarmActionDeleted is true, alarm has been deleted 2. If iAlarmActionStreamId is KNullStreamId and iAlarmAction is not NULL, alarm has been added 3. If iAlarmActionStreamId is not KNullStreamId and iAlarmAction is not KNullDesC, The AlarmAction could be updated
TAgnAlarmActionChange value indicating the type of change
IMPORT_C TBool | AlarmActionIsLoaded | ( | ) | const |
Check if Alarm action object is loaded from the stream
IMPORT_C const TStreamId & | AlarmActionStreamId | ( | ) | const |
Get the Alarm action stream id
IMPORT_C const TDesC & | AlarmSoundName | ( | ) | const |
Gets the name of the alarm sound as set by SetAlarmSoundName().
Returns NULL if the entry isn't alarmed.
The name of the alarm sound.
IMPORT_C TInt | AttendeeCount | ( | ) | const |
Gets the number of attendees that have been added to the entry.
Number of attendees added.
IMPORT_C TInt | CategoryCount | ( | ) | const |
Gets the number of categories owned by the entry.
The number of categories.
TBool | CategoryExist | ( | CAgnCategory & | aSearchCategory | ) | const |
Check if category is already present
CAgnCategory & aSearchCategory |
IMPORT_C TBool | CompareL | ( | const CAgnEntry & | aEntry | ) | const |
Compares another entry for equality with this one.
The entries' instance IDs and unique IDs are also compared.
ETrue if aEntry is the same as this entry, EFalse if not. Note. Replication data is not included in the comparison, except for the replication status.
const CAgnEntry & aEntry | Pointer to an entry. |
void | ConstructL | ( | HBufC8 * | aUid, |
CCalEntry::TMethod | aMethod, | |||
TUint | aSeqNum | |||
) | [private] |
HBufC8 * aUid | |
CCalEntry::TMethod aMethod | |
TUint aSeqNum |
void | ConstructL | ( | HBufC8 * | aUid, |
CCalEntry::TMethod | aMethod, | |||
TUint | aSeqNum, | |||
const TAgnCalendarTime & | aRecurrenceId, | |||
CalCommon::TRecurrenceRange | aRange | |||
) | [private] |
HBufC8 * aUid | |
CCalEntry::TMethod aMethod | |
TUint aSeqNum | |
const TAgnCalendarTime & aRecurrenceId | |
CalCommon::TRecurrenceRange aRange |
IMPORT_C void | CopyFromL | ( | const CAgnEntry & | aSource, |
CCalEntry::TCopyType | aCopyType | |||
) |
Copy the details common to all entry types from aSource. If aCopyType is EShallowCopy it indicates that if aSources rich text is stored out of line and its not loaded then it isn't loaded and copied
const CAgnEntry & aSource | |
CCalEntry::TCopyType aCopyType |
IMPORT_C TInt | DeleteAttachmentL | ( | const CAgnAttachment & | aAttachment | ) |
const CAgnAttachment & aAttachment |
IMPORT_C void | DeleteAttendee | ( | TInt | aIndex | ) |
Deletes the attendee at the index specified from the entry's list of attendees.
If there is no attendee at the index specified, a panic occurs.
TInt aIndex | Index of the attendee to delete. |
IMPORT_C void | DeleteCategory | ( | TInt | aIndex | ) |
Deletes the indexed category.
TInt aIndex | Index into the entry's list of categories. Must be valid or a panic occurs. |
IMPORT_C const TDesC & | Description | ( | ) | const |
Gets the notes text.
If no notes text has been set, a empty descriptor (KNullDesC) is returned.
capability
ReadUserData
The notes text.
IMPORT_C TAgnDataChange | DescriptionChange | ( | ) | const |
Check if the notes changed
1. If iDescription is NULL, The description has never been added or never been loaded - No Change 2. If iDescriptionStreamId is not KNullStreamId and iDecription is KNullDesC, The descrioption has been deleted (CAgnEntry::SetDescrioprion() can be used to delete description) 3. If iDescriptionStreamId is not KNullStreamId and iDecription is not KNullDesC, The descrioption could be updated 4. If iDescriptionStreamId is KNullStreamId and iDescription is not KNullDesC, The description has been added
TAgnDescriptionChange value indicating the type of change
IMPORT_C TBool | DescriptionIsLoaded | ( | ) | const |
Check notes is loaded
capability
ReadUserData
Boolean to indicate if loaded or not
IMPORT_C const TStreamId & | DescriptionStreamId | ( | ) | const |
Gets the ID of the embedded stream store in which the description has been stored.
The ID for the stream store in which the description has been stored.
void | ExternalizeEntryL | ( | RWriteStream & | aStream, |
TBool | aToBuffer = EFalse | |||
) | const [private] |
RWriteStream & aStream | |
TBool aToBuffer = EFalse |
void | ExternalizeGsDataL | ( | RWriteStream & | aStream, |
TBool | aToBuffer | |||
) | const [private] |
RWriteStream & aStream | |
TBool aToBuffer |
IMPORT_C void | ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Externalises an entry's details and attributes, but not its rich text to a write stream.
The presence of this function means that the standard templated operator<<() (defined in s32strm.h) is available to externalise objects of this class.
RWriteStream & aStream | Stream to which the object should be externalised. |
IMPORT_C void | ExternalizeToBufferL | ( | RWriteStream & | aStream | ) | const |
Used for passing the data to the between client and server
RWriteStream & aStream |
IMPORT_C CAgnAttendee & | FetchAttendee | ( | TInt | aIndex | ) | const |
Gets the attendee at the specified index within the entry's list of attendees.
1), otherwise a panic occurs.
The attendee details.
TInt aIndex | Index to identify the specified attendee. |
IMPORT_C CAgnCategory & | FetchCategory | ( | TInt | aIndex | ) | const |
Gets the indexed category.
Pointer to the category located at the index specified.
TInt aIndex | Index into the entry's list of categories. Must be valid or a panic occurs. |
TAgnCalendarTime | GetChildRecurrenceId | ( | TCalLocalUid | aChildId | ) | const |
TCalLocalUid aChildId |
void | InternalizeEntryL | ( | RReadStream & | aStream, |
TBool | aFromBuffer = EFalse | |||
) | [private] |
Internalises an entry's details and attributes, but not its rich text from a read stream.
The presence of this function means that the standard templated operator>>() (defined in s32strm.h) is available to internalise objects of this class.
RReadStream & aStream | Stream from which the object should be internalised. |
TBool aFromBuffer = EFalse |
IMPORT_C void | InternalizeFromBufferL | ( | RReadStream & | aStream | ) |
Used for passing the data to the between client and server
RReadStream & aStream |
void | InternalizeGsDataL | ( | RReadStream & | aStream, |
TBool | aFromBuffer | |||
) | [private] |
RReadStream & aStream | |
TBool aFromBuffer |
IMPORT_C void | InternalizeL | ( | RReadStream & | aStream | ) |
RReadStream & aStream |
IMPORT_C const TDesC & | Location | ( | ) | const |
Gets the contents of the entry's location field.
The location field. NULL if the entry has no location field.
IMPORT_C CAgnEntry * | NewL | ( | CCalEntry::TType | aType | ) | [static] |
CCalEntry::TType aType |
IMPORT_C CAgnEntry * | NewL | ( | RReadStream & | aStream | ) | [static] |
RReadStream & aStream |
IMPORT_C CAgnEntry * | NewL | ( | CCalEntry::TType | aType, |
HBufC8 * | aUid, | |||
CCalEntry::TMethod | aMethod, | |||
TUint | aSeqNum | |||
) | [static] |
CCalEntry::TType aType | |
HBufC8 * aUid | |
CCalEntry::TMethod aMethod | |
TUint aSeqNum |
IMPORT_C CAgnEntry * | NewL | ( | CCalEntry::TType | aType, |
HBufC8 * | aUid, | |||
CCalEntry::TMethod | aMethod, | |||
TUint | aSeqNum, | |||
const TAgnCalendarTime & | aRecurrenceId, | |||
CalCommon::TRecurrenceRange | aRange | |||
) | [static] |
CCalEntry::TType aType | |
HBufC8 * aUid | |
CCalEntry::TMethod aMethod | |
TUint aSeqNum | |
const TAgnCalendarTime & aRecurrenceId | |
CalCommon::TRecurrenceRange aRange |
IMPORT_C void | PruneRDatesL | ( | const TAgnCalendarTime & | aRecurrenceId, |
CalCommon::TRecurrenceRange | aRange | |||
) |
Used when adding a repeating child to a parent entry. Removes all sporadic dates either after or before the specified recurrence ID.
const TAgnCalendarTime & aRecurrenceId | |
CalCommon::TRecurrenceRange aRange |
IMPORT_C CCalEntry::TReplicationStatus | ReplicationStatus | ( | ) | const |
Get ReplicationStatus
IMPORT_C void | SetAlarmAction | ( | CAgnContent * | aAlarmAction | ) |
Set an alarm action object to the Agenda entry. The Agenda Entry takes ownership of the passed object.
CAgnContent * aAlarmAction |
IMPORT_C void | SetAlarmActionStreamId | ( | const TStreamId & | aStreamId | ) |
Set the Alarm action stream id
const TStreamId & aStreamId |
IMPORT_C void | SetAlarmSoundNameL | ( | const TDesC & | aAlarmSoundName | ) |
Sets the name of the alarm sound.
Note: if the length of the new alarm sound name is greater than KMaxAlarmSoundName characters, it will be ignored.
const TDesC & aAlarmSoundName | The name of the alarm sound. |
IMPORT_C void | SetBusyStatusL | ( | CCalEntry::TTransp | aBusyStatus | ) |
Set transparency value leave
KErrArgument if passed parameter is negative
CCalEntry::TTransp aBusyStatus |
IMPORT_C void | SetDTStampUtcL | ( | const TTime & | aDTStampUtc | ) |
const TTime & aDTStampUtc |
IMPORT_C void | SetDescription | ( | HBufC * | aText | ) |
Sets the notes text.
This object takes ownership of aNotes.
HBufC * aText |
IMPORT_C void | SetDescriptionStreamId | ( | const TStreamId & | aStreamId | ) |
Sets the ID of the embedded stream store in which the description has been stored.
const TStreamId & aStreamId |
IMPORT_C void | SetGeoValueL | ( | const TReal & | aLatitude, |
const TReal & | aLongitude | |||
) |
Set GEO - Latitude and Longitude values for the entry Latitude is bound between +-0-90 degrees Longitude is bound between +-0-180 degrees leave
KErrArgument if passed parameter is out of bounds.
IMPORT_C void | SetLocationL | ( | const TDesC & | aLocation | ) |
Sets the contents of the entry's location field.
Sets the entry's 'has extended' property.
const TDesC & aLocation | Descriptor containing a location, e.g. for a meeting. |
IMPORT_C void | SetMethod | ( | CCalEntry::TMethod | aMethod | ) |
CCalEntry::TMethod aMethod |
IMPORT_C void | SetOrganizerL | ( | CAgnAttendee * | aAttendee | ) |
Set attendee as organiser
CAgnAttendee * aAttendee |
IMPORT_C void | SetParentId | ( | TCalLocalUid | aParentId | ) |
TCalLocalUid aParentId |
IMPORT_C void | SetPhoneOwnerL | ( | CAgnAttendee * | aOwner | ) |
Set Phone owner as attendee, this must be an existing attendee
leave
KErrNotFound if the passed attendee is not matching anyone in the current list
CAgnAttendee * aOwner |
IMPORT_C void | SetRecurrenceIdFromParentL | ( | const CAgnEntry & | aParentEntry | ) |
const CAgnEntry & aParentEntry |
IMPORT_C void | SetRecurrenceRangeL | ( | CalCommon::TRecurrenceRange | aRange | ) |
CalCommon::TRecurrenceRange aRange |
IMPORT_C void | SetReplicationStatusL | ( | CCalEntry::TReplicationStatus | aReplicationStatus | ) |
Set ReplicationStatus
leave
KErrArgument if passed parameter exceeds boundaries
CCalEntry::TReplicationStatus aReplicationStatus |
IMPORT_C void | SetSummaryStreamId | ( | const TStreamId & | aStreamId | ) |
Sets the ID of the embedded stream store in which the summary has been stored.
const TStreamId & aStreamId |
IMPORT_C void | SetUserInt | ( | TUint32 | aUserInt | ) |
Sets the user integer for this entry.
TUint32 aUserInt | The new value of the user integer. |
IMPORT_C const TDesC & | Summary | ( | ) | const |
Gets a pointer to the rich text object owned by the entry.
Pointer to the rich text object. The caller does not take ownership.
IMPORT_C TAgnDataChange | SummaryChange | ( | ) | const |
Check if the summary changed
1. If iSummary is NULL, The Summary has never been added or laoded- No Change 2. If iSummaryStreamId is not KNullStreamId and iSummary is KNullDesC, The Summary has been deleted (CAgnEntry::SetSummary() can be used to delete description) 3. If iSummaryStreamId is not KNullStreamId and iSummary is not KNullDesC, The Summary could be updated 4. If iSummaryStreamId is KNullStreamId and iSummary is not KNullDesC, The Summary has been added
TAgnSummaryChange value indicating the type of change
IMPORT_C const TStreamId & | SummaryStreamId | ( | ) | const |
Gets the ID of the embedded stream store in which the summary has been stored.
The ID for the stream store in which the summary has been stored.
IMPORT_C void | UpdateRecurrenceIdL | ( | const TAgnCalendarTime & | aRecId | ) |
const TAgnCalendarTime & aRecId |
Used with summary, description and alarm action to indicate if the data has changed. These items are all stored on file in separate streams to the entry that owns them.
EAgnDataNoChange | |
EAgnDataDeleted | |
EAgnDataAdded | |
EAgnDataUpdated |
RPointerArray< CAgnAttachment > * | iAttachments | [private] |