epoc32/include/app/calcommon.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/calcommon.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __CALCOMMON_H__
    17 #define __CALCOMMON_H__
    18 
    19 #include <caltime.h>
    20 
    21 /** This system-wide #define is for version 2 of the Calendar component. 
    22 V1 is the CalInterimAPI. V2 is the refactored Calendar component which includes 
    23 support for Attachments, GEO, TRANSP, instance iterator, extended text searching.
    24 @publishedAll
    25 @released
    26 */
    27 #define SYMBIAN_CALENDAR_V2
    28 
    29 /** Calendar local entry ID. 
    30 This entry ID is assigned by the calendar server when an entry is created. 
    31 It will remain unchanged for the lifetime of that entry.
    32 @publishedAll
    33 @released
    34 */
    35 typedef TUint32 TCalLocalUid;
    36 
    37 /** Calendar file ID.
    38 @publishedAll
    39 @released
    40 */
    41 typedef TInt64 TCalFileId;
    42 
    43 /** Utility class containing common calendar-related enums.
    44 
    45 @publishedAll
    46 @released
    47 */
    48 class CalCommon
    49 	{
    50 public:
    51 
    52 	/** Entry filter used in the entry view and instance view, filter flags are defined by TCalViewFilterFlags
    53 	@publishedAll
    54 	@released
    55 	*/
    56 	typedef TUint TCalViewFilter;
    57 	
    58 	/** Entry filter flags used in the entry view and instance view. 
    59 	@publishedAll
    60 	@released
    61 	*/
    62 	enum TCalViewFilterFlags	
    63 		{
    64 		/** Include appointments. */
    65 		EIncludeAppts=0x01,				
    66 		/** Include reminders. */	
    67 		EIncludeReminder=0x02,				
    68 		/** Include all-day events. */
    69 		EIncludeEvents=0x04,				
    70 		/** Include anniversaries. */
    71 		EIncludeAnnivs=0x08,				
    72 		/** Include completed todos. */
    73 		EIncludeCompletedTodos=0x10,					
    74 		/** Include incompleted todos. */
    75 		EIncludeIncompletedTodos=0x20,	
    76 		/** Remove non-alarmed entries. This flag cannot be used by itself. */
    77 		EIncludeAlarmedOnly=0x40,
    78 		/** Include next only instance of a repeat entry. */
    79 		EIncludeRptsNextInstanceOnly=0x80,
    80 		
    81 		/** By default all instances which overlap the time range are found. Use the EInstanceStartTimeWithinRange
    82 		flag to only include instances whose start time is inside the search time range. 
    83 		
    84 		Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will 
    85 		only include instances which are completely within the search time range. */
    86 		EInstanceStartTimeWithinRange=0x100,
    87 
    88 		/** By default all instances which overlap the time range are found. Use the EInstanceEndTimeWithinRange
    89 		flag to only include instances whose end time is inside the search time range. 
    90 		
    91 		Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will 
    92 		only include instances which are completely within the search time range.
    93 		*/
    94 		EInstanceEndTimeWithinRange=0x200,
    95 		
    96 		/** By default all instances which adjoin the search range are found. Use the EExcludeInstanceAdjoiningRange
    97 		flag to exclude instances that are outside, but adjoin the search range.
    98 		
    99 		Instances that are outside, but adjoin the search start or end time are excluded.
   100 		Instances that both start and end on the search start time are included.
   101 		Instances that both start and end on the search end time are excluded.
   102 		*/
   103 		EExcludeInstanceAdjoiningRange=0x400,
   104 		
   105 		/** Include all entries (appointments, day events, reminders, anniversaries and todos). */
   106 		EIncludeAll=EIncludeAppts|EIncludeReminder|EIncludeEvents|EIncludeAnnivs|
   107 		EIncludeCompletedTodos|EIncludeIncompletedTodos,
   108 		};
   109 		
   110 	/** The range of instances referred to in a recurrence ID or instance view. 
   111 	@publishedAll
   112 	@released
   113 	*/
   114 	enum TRecurrenceRange
   115 		{
   116 		/** Only this instance is referenced. 
   117 		If the user set EThisOnly when a repeating child entry is created and stored to the file, only the parent instance
   118 		referred to by the child's recurrence ID will be replaced. */
   119 		EThisOnly,
   120 		/** This and all other instances are referenced. */
   121 		EThisAndAll,
   122 		/** This and all future instances are referenced. */
   123 		EThisAndFuture,
   124 		/** This and all previous instances are referenced. */
   125 		EThisAndPrior
   126 		};
   127 		
   128 	
   129 	/** Search filter for use in the CCalInstanceView::FindInstanceL() function.
   130 	Note that a folded text search is used if exact text search is not specified.
   131 	The summary text field is always searched. It is possible to specify additional text fields to be 
   132 	searched as well.
   133 	@publishedAll
   134 	@released
   135 	*/
   136 	enum TCalSearchBehaviour
   137 		{
   138 		/** Search for folded text. */
   139 		EFoldedTextSearch=0x0,
   140 
   141 		/** Search for the exact text. */
   142 		EExactTextSearch=0x1,
   143 		
   144 		/** Search location during a text search. 
   145 		@publishedPartner
   146 		@released
   147 		*/
   148 		ESearchEntryLocation=0x2,
   149 		
   150 		/** Search description during a text search. 
   151 		@publishedPartner
   152 		@released
   153 		*/
   154 		ESearchEntryDescription=0x4,
   155 		
   156 		/** Search attendee addresses during a text search.
   157 		@publishedPartner
   158 		@released
   159 		*/
   160 		ESearchAttendeeAddress=0x8,
   161 		
   162 		/** Search attendee sent by addresses during a text search.
   163 		@publishedPartner
   164 		@released
   165 		*/
   166 		ESearchAttendeeSentByAddress=0x10,
   167 		
   168 		/** Search attendee common names during a text search. 
   169 		@publishedPartner
   170 		@released
   171 		*/
   172 		ESearchAttendeeCommonName=0x20,
   173 		
   174 		/** Search organizer's address during a text search. 
   175 		@publishedPartner
   176 		@released
   177 		*/
   178 		ESearchOrganizerAddress=0x40,
   179 		
   180 		/** Search organizer's sent by address during a text search. 
   181 		@publishedPartner
   182 		@released
   183 		*/
   184 		ESearchOrganizerSentByAddress=0x80,
   185 		
   186 		/** Search organizer's common name during a text search. 
   187 		@publishedPartner
   188 		@released
   189 		*/
   190 		ESearchOrganizerCommonName=0x100,
   191 		
   192 		/** Include all possible text fields during a text search. */
   193 		ESearchAllTextFields=ESearchEntryLocation|ESearchEntryDescription|
   194 			ESearchAttendeeAddress|ESearchAttendeeSentByAddress|ESearchAttendeeCommonName|
   195 			ESearchOrganizerAddress|ESearchOrganizerSentByAddress|ESearchOrganizerCommonName,
   196 		};
   197 		
   198 	/** Class to implement a time range in the Instance view and Entry view.
   199 	@publishedAll
   200 	@released
   201 	*/	
   202 	class TCalTimeRange
   203 		{
   204 	public:
   205 		IMPORT_C TCalTimeRange(TCalTime aStartTime, TCalTime aEndTime);		
   206 			
   207 		IMPORT_C TCalTime StartTime() const;
   208 		IMPORT_C TCalTime EndTime() const;
   209 		
   210 	private:
   211 		TCalTime iStartTime;
   212 		TCalTime iEndTime;
   213 		};
   214 		
   215 	/** Enumeration returned when opening a file to indicate whether the file is the current version, 
   216 	needs converting, or is unsupported.
   217 	@publishedPartner
   218 	@released
   219 	*/
   220 	enum TCalFileVersionSupport
   221 		{
   222 		/** The file is the current version and can be loaded immediately. */
   223 		EFileIsCurrentVersion,
   224 		/** The file is an older version and will be converted when it is used. */
   225 		EFileNeedsConverting,
   226 		/** The file is an old version that is not supported. */
   227 		EUnsupportedFileVersion
   228 		};
   229 	};
   230 #endif // __CALCOMMON_H__