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