epoc32/include/mw/msvstd.h
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 2fe1408b6811
child 4 837f303aceeb
equal deleted inserted replaced
2:2fe1408b6811 3:e1b950c65cb4
       
     1 // Copyright (c) 1998-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 __MSVSTD_H__
       
    17 #define __MSVSTD_H__
       
    18 
       
    19  
       
    20 
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <s32file.h>
       
    24 
       
    25 /**
       
    26 Specifies an entry in the Message Server index.
       
    27 @publishedAll
       
    28 @released
       
    29 @see #KMsvNullIndexEntryId
       
    30 @see #KMsvTempIndexEntryId
       
    31 @see #KMsvRootIndexEntryId
       
    32 @see #KMsvLocalServiceIndexEntryId
       
    33 @see #KMsvGlobalInBoxIndexEntryId
       
    34 @see #KMsvGlobalOutBoxIndexEntryId
       
    35 @see #KMsvDraftEntryId
       
    36 @see #KMsvSentEntryId
       
    37 @see #KMsvDeletedEntryFolderEntryId
       
    38 @see #KMsvUnknownServiceIndexEntryId
       
    39 */
       
    40 typedef TInt32 TMsvId;
       
    41 
       
    42 /** Identifies an asynchronous messaging operation. 
       
    43 
       
    44 This ID is unique within a 
       
    45 Message Server session. The ID of an operation can be obtained from CMsvOperation::Id(). */
       
    46 typedef TInt32 TMsvOp;
       
    47 
       
    48 /** Supplies the standard values for the message priority index entry field. 
       
    49 @publishedAll
       
    50 @released
       
    51 */
       
    52 enum TMsvPriority {	
       
    53 	/** High message priority */
       
    54 					EMsvHighPriority,
       
    55 	/** Medium message priority */
       
    56 					EMsvMediumPriority,
       
    57 	/** Low message priority */
       
    58 					EMsvLowPriority};	
       
    59 
       
    60 class CRichText;
       
    61 class CMsvStore;
       
    62 class CMsvEntry;
       
    63 class CMsvMove;
       
    64 class CMsvServer;
       
    65 class CMsvServerEntry;
       
    66 
       
    67 _LIT(KMsvDefaultFolder, "\\Private\\1000484b\\Mail\\");
       
    68 _LIT(KMsvDefaultIndexFile, "\\Private\\1000484b\\Mail\\Index");
       
    69 _LIT(KMsvDefaultFolder2, "\\Private\\1000484b\\Mail2\\");
       
    70 _LIT(KMsvDefaultIndexFile2, "\\Private\\1000484b\\Mail2\\Index");
       
    71 _LIT(KMsvDirectoryExt, "_S\\");
       
    72 _LIT(KMsvBinaryFolderExt, "_F\\");
       
    73 
       
    74 const TInt KFileNameFixedWidth=8;
       
    75 const TInt KMaxSubjectSkipStringLength=8; // For subject based email thread sorting
       
    76 _LIT(KSendAsRenderedImage, "Image");
       
    77 
       
    78 // Server name and moving semaphore
       
    79 _LIT(KMsvServerName, "!MsvServer");
       
    80 _LIT(KMsvMovingSemaphore, "MsvMovingSemaphore");
       
    81 
       
    82 _LIT_SECURE_ID(KMsvServerId, 0x1000484B);
       
    83 
       
    84 
       
    85 /** Represents an entry in the Message Server index.
       
    86 
       
    87 MTM implementations and message client applications use it to access and manipulate 
       
    88 index entry values. Note that a TMsvEntry is effectively a local cache of 
       
    89 the index entry, and changes to it are not automatically written into the 
       
    90 index. To commit changes to the Message Server, you need to call CMsvEntry::ChangeL() 
       
    91 (or CMsvServerEntry::ChangeEntry()).
       
    92 
       
    93 To avoid repetition, the functions and data members are simply listed here, 
       
    94 without detailed explanation of the fields. The public data members can be 
       
    95 used to get and set the values of some index entry fields. 
       
    96 @publishedAll
       
    97 @released
       
    98 */
       
    99 class TMsvEntry
       
   100 	{
       
   101 public: 
       
   102 	IMPORT_C TMsvEntry(); 
       
   103 	IMPORT_C TMsvEntry(const TMsvEntry& aEntry);
       
   104 	IMPORT_C TMsvEntry& operator=(const TMsvEntry& aEntry);
       
   105 	IMPORT_C TBool operator==(const TMsvEntry& aEntry) const;
       
   106 	IMPORT_C TBool PermanentDataUnchanged(const TMsvEntry& aEntry) const;
       
   107 	//
       
   108 	IMPORT_C TMsvPriority Priority() const;
       
   109 	IMPORT_C void SetPriority(TMsvPriority aPriority);
       
   110 	// 
       
   111 	IMPORT_C void InternalizeL(RReadStream& aStream);
       
   112 	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
       
   113 	// Read only for clients
       
   114 	inline TMsvId Id() const;
       
   115 	inline TMsvId Parent() const;
       
   116 	inline TBool Owner() const;
       
   117 	inline TBool Deleted() const;
       
   118 	// Read & write for clients
       
   119 	inline TBool Complete() const;
       
   120 	inline void SetComplete(TBool aComplete);
       
   121 	inline TBool New() const;
       
   122 	inline void SetNew(TBool aNew);
       
   123 	inline TBool Unread() const;
       
   124 	inline void SetUnread(TBool aUnread);
       
   125 	inline TBool Failed() const;
       
   126 	inline void SetFailed(TBool aFailed);
       
   127 	inline TBool Operation() const;
       
   128 	inline void SetOperation(TBool aOperation);
       
   129 	inline TBool Visible() const;
       
   130 	inline void SetVisible(TBool aVisble);
       
   131 	inline TBool MultipleRecipients() const;
       
   132 	inline void SetMultipleRecipients(TBool aMultipleRecipient);
       
   133 	inline TBool ReadOnly() const;
       
   134 	inline void SetReadOnly(TBool aReadOnly);
       
   135 	inline TBool StandardFolder() const;
       
   136 	inline void SetStandardFolder(TBool aStanardFolder);
       
   137 	inline TBool Attachment() const;
       
   138 	inline void SetAttachment(TBool aAttachmentFlag);
       
   139 	inline TBool Connected() const;
       
   140 	inline void SetConnected(TBool aConnected);
       
   141 	inline TBool InPreparation() const;
       
   142 	inline void SetInPreparation(TBool aInPreparation);
       
   143 	//
       
   144 	inline TInt PcSyncCount() const;
       
   145 	inline void DecPcSyncCount();
       
   146 	inline void IncPcSyncCount();
       
   147 	//
       
   148 	inline TBool OffPeak() const;
       
   149 	inline void SetOffPeak(TBool aOffPeak);
       
   150 	inline TBool Scheduled() const;
       
   151 	inline void SetScheduled(TBool aScheduled);
       
   152 	inline TUint SendingState() const;
       
   153 	inline void SetSendingState(TUint aSendingState);
       
   154 	inline TBool PendingDelete() const;
       
   155 	inline void SetPendingDelete(TBool aPendingDelete);
       
   156 	
       
   157 	/** This method sets bit 24 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
       
   158 	inline void SetDeleteProtected(TBool aDeleteProtected);
       
   159 	inline TBool DeleteProtected() const;
       
   160 	/** This method sets bit 31 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
       
   161 	inline void SetForwarded(TBool aForwarded);
       
   162 	inline TBool Forwarded() const;
       
   163 	/** This method sets bit 32 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
       
   164 	inline void SetLocallyDeleted(TBool aLocallyDeleted);
       
   165 	inline TBool LocallyDeleted() const;
       
   166 	
       
   167 	IMPORT_C TBool PendingConditions() const;
       
   168 	IMPORT_C void SetPendingConditions(TBool aPendingConditions);
       
   169 	//
       
   170 	IMPORT_C TInt32 MtmData1() const;
       
   171 	IMPORT_C TInt32 MtmData2() const;
       
   172 	IMPORT_C TInt32 MtmData3() const;
       
   173 	
       
   174 	/** 
       
   175 	@internalTechnology
       
   176 	*/
       
   177 	IMPORT_C void SetMtmData1(TInt32 aMtmData);
       
   178 	/** 
       
   179 	@internalTechnology
       
   180 	*/
       
   181 	IMPORT_C void SetMtmData2(TInt32 aMtmData);
       
   182 	/** 
       
   183 	@internalTechnology
       
   184 	*/
       
   185 	IMPORT_C void SetMtmData3(TInt32 aMtmData);
       
   186 	//
       
   187 protected:
       
   188 	// only the server will be able to set the following
       
   189 	inline void SetId(TMsvId aId);
       
   190 	inline void SetParent(TMsvId aId);
       
   191 	inline void SetOwner(TBool aAttachment);
       
   192 	inline void SetDeleted(TBool aDeletedFlag);
       
   193 	//
       
   194 	inline TUint PersistedFlags() const;
       
   195 	inline TUint TemporaryFlags() const;
       
   196 	//
       
   197 private:
       
   198 	void Copy(const TMsvEntry& aEntry);
       
   199 	//
       
   200 private:
       
   201 	TMsvId iId;
       
   202 	TMsvId iParentId;  
       
   203 	TInt32 iData;         
       
   204 	TInt32 iPcSyncCount;
       
   205 	TInt32 iReserved; // reserved for future proofing
       
   206 public: 
       
   207 	/** Service ID. */
       
   208 	TMsvId iServiceId; 
       
   209 	/** Related folder ID. */
       
   210 	TMsvId iRelatedId; 
       
   211 	/** Entry type */
       
   212 	TUid   iType;        
       
   213 	/** MTM */
       
   214 	TUid   iMtm;     
       
   215 	/** Time */
       
   216 	TTime  iDate;       
       
   217 	/** Size */
       
   218 	TInt32 iSize;      
       
   219 	/** Error */
       
   220 	TInt32 iError;
       
   221 	/** BIO message type */
       
   222 	TInt32 iBioType;
       
   223 	// following three can be used by MTM
       
   224 	/** MTM data 1: this can be used for any purpose by an MTM. This member must 
       
   225 	only be accessed through the predefined set and get functions. If you must 
       
   226 	write data to a bit that has no meaning in the predefined derived classes 
       
   227 	then you must derive your own class from TMsvEntry.
       
   228 	*/
       
   229 	TInt32 iMtmData1; 
       
   230 	/** MTM data 2: this can be used for any purpose by an MTM. This member must 
       
   231 	only be accessed through the predefined set and get functions. If you must 
       
   232 	write data to a bit that has no meaning in the predefined derived classes 
       
   233 	then you must derive your own class from TMsvEntry.
       
   234 	*/
       
   235 	TInt32 iMtmData2; 
       
   236 	/** MTM data 3: this can be used for any purpose by an MTM. This member must 
       
   237 	only be accessed through the predefined set and get functions. If you must 
       
   238 	write data to a bit that has no meaning in the predefined derived classes 
       
   239 	then you must derive your own class from TMsvEntry.
       
   240 	*/
       
   241 	TInt32 iMtmData3; 
       
   242 public:
       
   243 	// The TPtrC must be kept at end of class to simplify comparisons and initialisation
       
   244 	/** Description */
       
   245 	TPtrC iDescription;
       
   246 	/** Details */
       
   247 	TPtrC iDetails;    
       
   248 	//
       
   249 	//
       
   250 private:
       
   251 	//
       
   252 friend class CMsvEntry;
       
   253 friend class CMsvServer;
       
   254 friend class CMsvServerEntry;
       
   255 friend class CMsvClientEntry;
       
   256 friend class CMsvServerSession;
       
   257 friend class TMsvServerEntry; 
       
   258 friend class CMsvServerIndex;
       
   259 friend class RMsvServerSession;
       
   260 friend class CMsvLocalCopyOperation;
       
   261 friend class CMsvMove;
       
   262 friend class CMsvIndexRebuild;
       
   263 friend class CMsvCopyEntry;
       
   264 friend class CMsvDelete;
       
   265 friend class CMsvIndexContext;
       
   266 friend class CMsvEntryArray;
       
   267 	//
       
   268 private:
       
   269 	//
       
   270 enum {	KMsvEntryPriorityMask=			0x00000003,
       
   271 		KMsvEntryHighPriority=			0x00000002,
       
   272 		KMsvEntryMediumPriority=		0x00000001,
       
   273 		KMsvEntryLowPriority=			0x00000000,
       
   274 		KMsvEntryClearFlag=				0x00000000,
       
   275 		KMsvOffPeakFlag=				0x00000004,
       
   276 		KMsvEntryNotCompleteFlag=		0x00000008,
       
   277 		KMsvEntryNewFlag=				0x00000010,
       
   278 		KMsvEntryUnreadFlag=			0x00000020,
       
   279 		KMsvEntryFailedFlag=			0x00000040,
       
   280 		KMsvEntryOperationFlag=			0x00000080,
       
   281 		KMsvEntryOwnerFlag=				0x00000100,
       
   282 		KMsvEntryInvisibleFlag=			0x00000200,
       
   283 		KMsvEntryMultipleRecipientFlag=	0x00000400,
       
   284 		KMsvScheduledFlag=				0x00000800,
       
   285 		KMsvEntryReadOnlyFlag=			0x00001000,
       
   286 		KMsvEntryDeletedFlag=			0x00002000,
       
   287 		KMsvEntryStandardFolderFlag=	0x00004000,
       
   288 		KMsvEntryAttachmentFlag=		0x00008000,
       
   289 		KMsvEntryInPreparationFlag=		0x00010000,
       
   290 		KMsvSendingStateFlags=			0x001E0000, // Note: Sending state is shifted KMsvSendingStateShift places left
       
   291 		KMsvEntryPersistedFlags=		0x00FFFFFF,
       
   292 		KMsvEntryPendingConditionsFlag=	0x00800000,		
       
   293 		KMsvEntryTemporaryFlags=		0xFF000000,
       
   294 		KMsvEntryConnectedFlag=			0x01000000,
       
   295 		KMsvEntryPendingDeleteFlag=		0x02000000};
       
   296 	};
       
   297 enum 
       
   298 	{
       
   299 		KMsvEntryDeleteProtected=		0x800000,
       
   300 		KMsvEntryForwarded=				0x40000000,
       
   301 		KMsvEntryLocallyDeleted=		0x80000000
       
   302 	};
       
   303 
       
   304 const TUint KMsvSendingStateShift=0x11; // Places to shift sending state
       
   305 
       
   306 /** Defines sending state flags. 
       
   307 @publishedAll
       
   308 @released
       
   309 */
       
   310 enum TMsvSendState
       
   311 	{
       
   312 	/** State unknown. */
       
   313 	KMsvSendStateUnknown		= 0x0,
       
   314 	/** Message will be sent on request. */
       
   315 	KMsvSendStateUponRequest	= 0x1,
       
   316 	/** Waiting to be sent.
       
   317 	
       
   318 	Messages in the outbox with this state can be sent automatically by the relevant 
       
   319 	MTM once an appropriate connection is established. */
       
   320 	KMsvSendStateWaiting		= 0x2,
       
   321 	/** Sending in progress. */
       
   322 	KMsvSendStateSending		= 0x3,
       
   323 	/** Sending scheduled. */
       
   324 	KMsvSendStateScheduled		= 0x4,
       
   325 	/** Resending. */
       
   326 	KMsvSendStateResend			= 0x5,
       
   327 	/** Sending suspended. */
       
   328 	KMsvSendStateSuspended		= 0x6,
       
   329 	/** Sending failed. */
       
   330 	KMsvSendStateFailed			= 0x7,
       
   331 	/** Sending complete. */
       
   332 	KMsvSendStateSent			= 0x8,
       
   333 	/** Not applicable. */
       
   334 	KMsvSendStateNotApplicable	= 0x9
       
   335 	};
       
   336 
       
   337 const TUint KMsvSendStateLast = KMsvSendStateNotApplicable;
       
   338 const TUint KMsvSendStateMax = 0x0F;
       
   339 
       
   340 /** Supplies values for bitmasks that allows the rapid setting or clearing of a 
       
   341 number of TMsvEntry fields.
       
   342 
       
   343 The fields that can be manipulated are:
       
   344 
       
   345 1. PC synchronisation
       
   346 
       
   347 2. Visibility flag
       
   348 
       
   349 3. Read flag
       
   350 
       
   351 4. In-preparation flag
       
   352 
       
   353 5. Connected flag
       
   354 
       
   355 6. Pending deletion flag.
       
   356 
       
   357 7. New flag
       
   358 
       
   359 @see TMsvEntry
       
   360 @see CMsvSession::ChangeAttributesL()
       
   361 @see CMsvServerEntry::ChangeAttributes() 
       
   362 @publishedAll
       
   363 @released
       
   364 */
       
   365 enum TMsvAttribute    { 
       
   366 	/** PC synchronisation field. */
       
   367 						KMsvPcSyncCountAttribute	=0x00000001,
       
   368 	/** Visibility flag field. */
       
   369 						KMsvVisibilityAttribute		=0x00000200,
       
   370 	/** Read flag field. */
       
   371 						KMsvUnreadAttribute			=0x00000020,
       
   372 	/** In-preparation field. */
       
   373 						KMsvInPreparationAttribute	=0x00010000,
       
   374 	/** Connected flag field. */
       
   375 						KMsvConnectedAttribute		=0x01000000,
       
   376 	/** Pending deletion flag. */
       
   377 						KMsvPendingDeleteAttribute	=0x02000000,
       
   378 	/** New flag field. */
       
   379 						KMsvNewAttribute			=0x00000010};
       
   380 
       
   381 /** Defines the sort order options for a TMsvSelectionOrdering object. Options 
       
   382 are set through TMsvSelectionOrdering::SetSorting().
       
   383 
       
   384 @see TMsvSelectionOrdering 
       
   385 @publishedAll
       
   386 @released
       
   387 */
       
   388 enum TMsvSorting 
       
   389 	{
       
   390 	/** Don't sort */
       
   391 	EMsvSortByNone=0,				// Don't sort
       
   392 	/** Date (earliest-latest) */
       
   393 	EMsvSortByDate,					// Date (earliest-latest)
       
   394 	/** Date (latest-earliest) */
       
   395 	EMsvSortByDateReverse,			// Date (latest-earliest)
       
   396 	/** Size (smallest-largest) */
       
   397 	EMsvSortBySize,					// Size (smallest-largest)
       
   398 	/** Size (largest-smallest) */
       
   399 	EMsvSortBySizeReverse,			// Size (largest-smallest)
       
   400 	/** To/From (A-Z folded) */
       
   401 	EMsvSortByDetails,				// ToFrom (A-Z collated)
       
   402 	/** To/From (Z-A folded) */
       
   403 	EMsvSortByDetailsReverse,		// ToFrom (Z-A collated)
       
   404 	/** Description (A-Z folded) */
       
   405 	EMsvSortByDescription,			// Description (A-Z collated)
       
   406 	/** Description (Z-A folded) */
       
   407 	EMsvSortByDescriptionReverse,	// Description (Z-A collated)
       
   408 	/** Sort by message ID. */
       
   409 	EMsvSortById,			        // Id (lowest-highest)
       
   410 	/** Sort in reverse order by message ID. */
       
   411 	EMsvSortByIdReverse	            // Id (highest-lowest)
       
   412 	};
       
   413 
       
   414 /** Defines grouping order options for a TMsvEntrySelection object. Grouping options 
       
   415 can be combined in a bitmask and set through the TMsvEntrySelection constructor 
       
   416 @publishedAll
       
   417 @released
       
   418 */
       
   419 enum TMsvGrouping
       
   420 	{
       
   421 	/** No grouping */
       
   422 	KMsvNoGrouping=0,				// No grouping
       
   423 	/** Group by entry type, in order, services, folders, messages, attachments */
       
   424 	KMsvGroupByType=0x2,			// Folder, Message, Attachment
       
   425 	/** Place standard folders first, in the order they were created */
       
   426 	KMsvGroupByStandardFolders=0x6,	// Standrad folders first (must have sorting by type set aswell)
       
   427 	/** Group by message priority, in order, high, medium, then low */
       
   428 	KMsvGroupByPriority=0x8,		// High, Mediem, Low
       
   429 	/** Group by MTM, either in the order set by CMsvEntry::SetMtmListL() or by MTM 
       
   430 	Uid value */
       
   431 	KMsvGroupByMtm=0x10,			// By increasing uid value
       
   432 	};
       
   433 
       
   434 /** Defines the sorting and grouping rules used to prepare a selection of entries.
       
   435  
       
   436 It is used in the interfaces of CMsvEntry and CMsvServerEntry to set the ordering 
       
   437 of an entry's children.
       
   438 
       
   439 Firstly, the entries will be grouped, if the appropriate grouping option is 
       
   440 set, by:
       
   441 
       
   442 1. Standard folders: any entries marked as standard folders are placed first, 
       
   443 in the order they were created.
       
   444 
       
   445 2. Entry type: in the order services, folders, messages, attachments, unknown
       
   446 
       
   447 3. Priority: in the order high, medium, then low
       
   448 
       
   449 4. MTM: either in the MTM order set by CMsvEntry::SetMtmListL() or just in MTM 
       
   450 Uid value
       
   451 
       
   452 Grouping options are simply Boolean flags that can be set on or off by functions 
       
   453 of this class.
       
   454 
       
   455 Secondly, the order of entries within these groups is defined by a sorting 
       
   456 order option.
       
   457 
       
   458 @see CMsvEntry
       
   459 @see CMsvServerEntry 
       
   460 @publishedAll
       
   461 @released
       
   462 */
       
   463 class TMsvSelectionOrdering
       
   464 	{
       
   465 public:
       
   466 	IMPORT_C TMsvSelectionOrdering();
       
   467 	IMPORT_C TMsvSelectionOrdering(TInt aGroupingKey, TMsvSorting aSorting, TBool aShowInvisible=EFalse);
       
   468 	IMPORT_C void InternalizeL(RReadStream& aStream);
       
   469 	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
       
   470 	IMPORT_C TBool operator==(const TMsvSelectionOrdering& aOrdering) const;
       
   471 	IMPORT_C void SetSubjectSkipString(const TDesC& aSubjectSkipString);
       
   472 	IMPORT_C const TDesC& SubjectSkipString() const;
       
   473 
       
   474 	//
       
   475 	inline TMsvSorting Sorting() const;
       
   476 	inline TBool GroupByType() const;
       
   477 	inline TBool GroupStandardFolders() const;
       
   478 	inline TBool GroupByPriority() const;
       
   479 	inline TBool GroupByMtm() const;
       
   480 	inline TBool ShowInvisibleEntries() const;
       
   481 	inline TBool GroupingOn() const;
       
   482 	// 
       
   483 	inline void SetGroupByType(TBool aFlag);
       
   484 	inline void SetGroupStandardFolders(TBool aFlag);
       
   485 	inline void SetGroupByPriority(TBool aFlag);
       
   486 	inline void SetGroupByMtm(TBool aFlag);
       
   487 	inline void SetShowInvisibleEntries(TBool aFlag);
       
   488 	inline void SetSorting(TMsvSorting aSortType);
       
   489 
       
   490 	//
       
   491 	//
       
   492 private:
       
   493 
       
   494 	enum TMsvGroupingPrivate
       
   495 		{
       
   496 		KMsvInvisibleFlag=0x1,
       
   497 		KMsvStandardFolders=0x4,
       
   498 		KMsvAllGroupingFlags=0x1e
       
   499 		};
       
   500 	TInt iGrouping;
       
   501 	TMsvSorting iSortType;
       
   502  	TBuf<KMaxSubjectSkipStringLength>	iSubjectSkipString;
       
   503 	};
       
   504 
       
   505 const TInt KMsvInvisibleFlag=1;
       
   506 
       
   507 /** Encapsulates an array of entry IDs. 
       
   508 
       
   509 An object of this type is commonly passed to a function to indicate the set 
       
   510 of entries on which the function should operate. The array base class (CArrayFixFlat<TMsvId>) 
       
   511 provide methods to access, sort, and manipulate members of the array.
       
   512  
       
   513 @publishedAll
       
   514 @released
       
   515 */
       
   516 class CMsvEntrySelection : public CArrayFixFlat<TMsvId>
       
   517 	{ 
       
   518 public: 
       
   519 	IMPORT_C CMsvEntrySelection();
       
   520 	IMPORT_C CMsvEntrySelection* CopyL()  const;
       
   521 	IMPORT_C CMsvEntrySelection* CopyLC() const;
       
   522 	IMPORT_C TInt Find(TMsvId aId) const;
       
   523 	};
       
   524 
       
   525 /** Specifies a default service for a MTM.
       
   526 
       
   527 @publishedAll
       
   528 @released
       
   529 */
       
   530 class TMsvDefaultService
       
   531 	{
       
   532 public:
       
   533 	/** MTM for which the default service is specified. */
       
   534 	TUid iMtm;
       
   535 	/** ID of the default service. */
       
   536 	TMsvId iService;
       
   537 	};
       
   538 
       
   539 
       
   540 
       
   541 /** Used to query the Message Server for entries that match the specification defined 
       
   542 in the filter. 
       
   543 
       
   544 It allows a query to be performed on service, MTM, type and last change date. 
       
   545 The filter also enables the specification of the order in which the entries 
       
   546 are returned. 
       
   547 
       
   548 @see CMsvSession::GetChildIdsL() 
       
   549 @publishedAll
       
   550 @released
       
   551 */
       
   552 class CMsvEntryFilter : public CBase
       
   553 	{
       
   554 public:
       
   555 	IMPORT_C static CMsvEntryFilter* NewLC();
       
   556 	IMPORT_C static CMsvEntryFilter* NewL();
       
   557 	//
       
   558 public:
       
   559 	inline TMsvId Service() const;
       
   560 	inline void SetService(TMsvId aServiceId);
       
   561 	//
       
   562 	inline TUid Mtm() const;
       
   563 	inline void SetMtm(TUid aMtm);
       
   564 	//
       
   565 	inline TUid Type() const;
       
   566 	inline void SetType(TUid aType);
       
   567 	//
       
   568 	inline const TTime& LastChangeDate() const;
       
   569 	inline void SetLastChangeDate(const TTime& aLastChange);
       
   570 	//
       
   571 	inline const TMsvSelectionOrdering& Order() const;
       
   572 	inline void SetOrder(const TMsvSelectionOrdering& aOrder);
       
   573 	//
       
   574 	inline TUid SortMtm() const;
       
   575 	inline void SetSortMtm(TUid aSortMtm);
       
   576 	//
       
   577 private:
       
   578 	CMsvEntryFilter();
       
   579 	//
       
   580 private:
       
   581 	TMsvId iServiceId;
       
   582 	TUid iMtm;
       
   583 	TUid iType;
       
   584 	TTime iLastChange;
       
   585 	TMsvSelectionOrdering iOrdering;
       
   586 	TUid iSortMtm;
       
   587 	};
       
   588 
       
   589 // Error resolver leave codes -7000 to -7127
       
   590 /** Defines error codes that relate to the Message Server.
       
   591 
       
   592 @see MMsvEntryObserver::EMsvContextInvalid 
       
   593 @publishedAll
       
   594 @released
       
   595 */
       
   596 enum TMsvResolverLeave
       
   597 	{
       
   598 	/** There is no disk in the drive containing the Message Server index. */
       
   599 	KMsvMediaUnavailable = -7000,
       
   600 	/** There is a disk in the drive containing the Message Server index, but it is 
       
   601 	the wrong one. */
       
   602 	KMsvMediaIncorrect = -7001,
       
   603 	/** A CMsvEntry context is no longer valid because the location of the Message Server's 
       
   604 	index has changed.
       
   605 	
       
   606 	Such contexts will need refreshing by the client.
       
   607 	
       
   608 	@see MMsvEntryObserver::EMsvContextInvalid */
       
   609 	KMsvMediaChanged = -7002,
       
   610 	KMsvIndexBackup      = -7003,
       
   611 	KMsvIndexRestore     = -7004
       
   612 	};
       
   613 
       
   614 #include <msvstd.inl>
       
   615 
       
   616 #endif