williamr@2: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@4: // under the terms of "Eclipse Public License v1.0" williamr@2: // which accompanies this distribution, and is available williamr@4: // at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __CALCOMMON_H__ williamr@2: #define __CALCOMMON_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: /** This system-wide #define is for version 2 of the Calendar component. williamr@2: V1 is the CalInterimAPI. V2 is the refactored Calendar component which includes williamr@2: support for Attachments, GEO, TRANSP, instance iterator, extended text searching. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: #define SYMBIAN_CALENDAR_V2 williamr@2: williamr@2: /** Calendar local entry ID. williamr@2: This entry ID is assigned by the calendar server when an entry is created. williamr@2: It will remain unchanged for the lifetime of that entry. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef TUint32 TCalLocalUid; williamr@2: williamr@2: /** Calendar file ID. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef TInt64 TCalFileId; williamr@2: williamr@4: /** Calendar Collection ID. williamr@4: It identifies the same file as TCalFileId does williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: typedef TUint8 TCalCollectionId; williamr@4: williamr@4: /** Calendar NULL file ID. williamr@4: The file ID will be set to KNullFileId if the file is not opened. williamr@4: @publishedAll williamr@4: @released williamr@4: */ williamr@4: const TCalFileId KNullFileId = 0; williamr@4: williamr@2: /** Utility class containing common calendar-related enums. williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@4: williamr@4: williamr@4: williamr@2: class CalCommon williamr@2: { williamr@2: public: williamr@2: williamr@2: /** Entry filter used in the entry view and instance view, filter flags are defined by TCalViewFilterFlags williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: typedef TUint TCalViewFilter; williamr@2: williamr@2: /** Entry filter flags used in the entry view and instance view. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TCalViewFilterFlags williamr@2: { williamr@2: /** Include appointments. */ williamr@2: EIncludeAppts=0x01, williamr@2: /** Include reminders. */ williamr@2: EIncludeReminder=0x02, williamr@2: /** Include all-day events. */ williamr@2: EIncludeEvents=0x04, williamr@2: /** Include anniversaries. */ williamr@2: EIncludeAnnivs=0x08, williamr@2: /** Include completed todos. */ williamr@2: EIncludeCompletedTodos=0x10, williamr@2: /** Include incompleted todos. */ williamr@2: EIncludeIncompletedTodos=0x20, williamr@2: /** Remove non-alarmed entries. This flag cannot be used by itself. */ williamr@2: EIncludeAlarmedOnly=0x40, williamr@2: /** Include next only instance of a repeat entry. */ williamr@2: EIncludeRptsNextInstanceOnly=0x80, williamr@2: williamr@2: /** By default all instances which overlap the time range are found. Use the EInstanceStartTimeWithinRange williamr@2: flag to only include instances whose start time is inside the search time range. williamr@2: williamr@2: Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will williamr@2: only include instances which are completely within the search time range. */ williamr@2: EInstanceStartTimeWithinRange=0x100, williamr@2: williamr@2: /** By default all instances which overlap the time range are found. Use the EInstanceEndTimeWithinRange williamr@2: flag to only include instances whose end time is inside the search time range. williamr@2: williamr@2: Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will williamr@2: only include instances which are completely within the search time range. williamr@2: */ williamr@2: EInstanceEndTimeWithinRange=0x200, williamr@2: williamr@2: /** By default all instances which adjoin the search range are found. Use the EExcludeInstanceAdjoiningRange williamr@2: flag to exclude instances that are outside, but adjoin the search range. williamr@2: williamr@2: Instances that are outside, but adjoin the search start or end time are excluded. williamr@2: Instances that both start and end on the search start time are included. williamr@2: Instances that both start and end on the search end time are excluded. williamr@2: */ williamr@2: EExcludeInstanceAdjoiningRange=0x400, williamr@2: williamr@2: /** Include all entries (appointments, day events, reminders, anniversaries and todos). */ williamr@2: EIncludeAll=EIncludeAppts|EIncludeReminder|EIncludeEvents|EIncludeAnnivs| williamr@2: EIncludeCompletedTodos|EIncludeIncompletedTodos, williamr@2: }; williamr@2: williamr@2: /** The range of instances referred to in a recurrence ID or instance view. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TRecurrenceRange williamr@2: { williamr@2: /** Only this instance is referenced. williamr@2: If the user set EThisOnly when a repeating child entry is created and stored to the file, only the parent instance williamr@2: referred to by the child's recurrence ID will be replaced. */ williamr@2: EThisOnly, williamr@2: /** This and all other instances are referenced. */ williamr@2: EThisAndAll, williamr@2: /** This and all future instances are referenced. */ williamr@2: EThisAndFuture, williamr@2: /** This and all previous instances are referenced. */ williamr@2: EThisAndPrior williamr@2: }; williamr@2: williamr@2: williamr@2: /** Search filter for use in the CCalInstanceView::FindInstanceL() function. williamr@2: Note that a folded text search is used if exact text search is not specified. williamr@2: The summary text field is always searched. It is possible to specify additional text fields to be williamr@2: searched as well. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TCalSearchBehaviour williamr@2: { williamr@2: /** Search for folded text. */ williamr@2: EFoldedTextSearch=0x0, williamr@2: williamr@2: /** Search for the exact text. */ williamr@2: EExactTextSearch=0x1, williamr@2: williamr@2: /** Search location during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchEntryLocation=0x2, williamr@2: williamr@2: /** Search description during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchEntryDescription=0x4, williamr@2: williamr@2: /** Search attendee addresses during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchAttendeeAddress=0x8, williamr@2: williamr@2: /** Search attendee sent by addresses during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchAttendeeSentByAddress=0x10, williamr@2: williamr@2: /** Search attendee common names during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchAttendeeCommonName=0x20, williamr@2: williamr@2: /** Search organizer's address during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchOrganizerAddress=0x40, williamr@2: williamr@2: /** Search organizer's sent by address during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchOrganizerSentByAddress=0x80, williamr@2: williamr@2: /** Search organizer's common name during a text search. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: ESearchOrganizerCommonName=0x100, williamr@2: williamr@2: /** Include all possible text fields during a text search. */ williamr@2: ESearchAllTextFields=ESearchEntryLocation|ESearchEntryDescription| williamr@2: ESearchAttendeeAddress|ESearchAttendeeSentByAddress|ESearchAttendeeCommonName| williamr@2: ESearchOrganizerAddress|ESearchOrganizerSentByAddress|ESearchOrganizerCommonName, williamr@2: }; williamr@2: williamr@2: /** Class to implement a time range in the Instance view and Entry view. williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: class TCalTimeRange williamr@2: { williamr@2: public: williamr@2: IMPORT_C TCalTimeRange(TCalTime aStartTime, TCalTime aEndTime); williamr@2: williamr@2: IMPORT_C TCalTime StartTime() const; williamr@2: IMPORT_C TCalTime EndTime() const; williamr@2: williamr@2: private: williamr@2: TCalTime iStartTime; williamr@2: TCalTime iEndTime; williamr@2: }; williamr@2: williamr@2: /** Enumeration returned when opening a file to indicate whether the file is the current version, williamr@2: needs converting, or is unsupported. williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: enum TCalFileVersionSupport williamr@2: { williamr@2: /** The file is the current version and can be loaded immediately. */ williamr@2: EFileIsCurrentVersion, williamr@2: /** The file is an older version and will be converted when it is used. */ williamr@2: EFileNeedsConverting, williamr@2: /** The file is an old version that is not supported. */ williamr@2: EUnsupportedFileVersion williamr@2: }; williamr@4: williamr@4: /** Class to implement a priority range. This is used to set a priority range when using williamr@4: CCalFindInstanceSettings. williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: class TCalPriorityRange williamr@4: { williamr@4: public: williamr@4: IMPORT_C TCalPriorityRange(); williamr@4: IMPORT_C TCalPriorityRange(TUint aHighestPriority, TUint aLowestPriority); williamr@4: williamr@4: IMPORT_C TUint LowestPriority() const; williamr@4: IMPORT_C TUint HighestPriority() const; williamr@4: williamr@4: private: williamr@4: TUint iHighestPriority; williamr@4: TUint iLowestPriority; williamr@4: }; williamr@4: williamr@4: /** Enumeration to define the sort-able attributes that can be sorted on in the williamr@4: * instance view williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: enum TCalSortAttribute williamr@4: { williamr@4: ESortAttrStartTime, williamr@4: ESortAttrEndTime, williamr@4: ESortAttrLastModified, williamr@4: ESortAttrPriority, williamr@4: ESortAttrType williamr@4: }; williamr@4: williamr@4: /** Enumeration to define the sort directions that can be used in sort criteria, williamr@4: @publishedAll williamr@4: @prototype williamr@4: */ williamr@4: enum TCalSortDirection williamr@4: { williamr@4: /** Sort by ascending order */ williamr@4: EAscendingOrder, williamr@4: /** Sort by descending order */ williamr@4: EDescendingOrder williamr@4: }; williamr@4: williamr@2: }; williamr@2: #endif // __CALCOMMON_H__