1.1 --- a/epoc32/include/msvstd.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/msvstd.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,616 @@
1.4 -msvstd.h
1.5 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef __MSVSTD_H__
1.21 +#define __MSVSTD_H__
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +#include <e32base.h>
1.27 +#include <s32file.h>
1.28 +
1.29 +/**
1.30 +Specifies an entry in the Message Server index.
1.31 +@publishedAll
1.32 +@released
1.33 +@see #KMsvNullIndexEntryId
1.34 +@see #KMsvTempIndexEntryId
1.35 +@see #KMsvRootIndexEntryId
1.36 +@see #KMsvLocalServiceIndexEntryId
1.37 +@see #KMsvGlobalInBoxIndexEntryId
1.38 +@see #KMsvGlobalOutBoxIndexEntryId
1.39 +@see #KMsvDraftEntryId
1.40 +@see #KMsvSentEntryId
1.41 +@see #KMsvDeletedEntryFolderEntryId
1.42 +@see #KMsvUnknownServiceIndexEntryId
1.43 +*/
1.44 +typedef TInt32 TMsvId;
1.45 +
1.46 +/** Identifies an asynchronous messaging operation.
1.47 +
1.48 +This ID is unique within a
1.49 +Message Server session. The ID of an operation can be obtained from CMsvOperation::Id(). */
1.50 +typedef TInt32 TMsvOp;
1.51 +
1.52 +/** Supplies the standard values for the message priority index entry field.
1.53 +@publishedAll
1.54 +@released
1.55 +*/
1.56 +enum TMsvPriority {
1.57 + /** High message priority */
1.58 + EMsvHighPriority,
1.59 + /** Medium message priority */
1.60 + EMsvMediumPriority,
1.61 + /** Low message priority */
1.62 + EMsvLowPriority};
1.63 +
1.64 +class CRichText;
1.65 +class CMsvStore;
1.66 +class CMsvEntry;
1.67 +class CMsvMove;
1.68 +class CMsvServer;
1.69 +class CMsvServerEntry;
1.70 +
1.71 +_LIT(KMsvDefaultFolder, "\\Private\\1000484b\\Mail\\");
1.72 +_LIT(KMsvDefaultIndexFile, "\\Private\\1000484b\\Mail\\Index");
1.73 +_LIT(KMsvDefaultFolder2, "\\Private\\1000484b\\Mail2\\");
1.74 +_LIT(KMsvDefaultIndexFile2, "\\Private\\1000484b\\Mail2\\Index");
1.75 +_LIT(KMsvDirectoryExt, "_S\\");
1.76 +_LIT(KMsvBinaryFolderExt, "_F\\");
1.77 +
1.78 +const TInt KFileNameFixedWidth=8;
1.79 +const TInt KMaxSubjectSkipStringLength=8; // For subject based email thread sorting
1.80 +_LIT(KSendAsRenderedImage, "Image");
1.81 +
1.82 +// Server name and moving semaphore
1.83 +_LIT(KMsvServerName, "!MsvServer");
1.84 +_LIT(KMsvMovingSemaphore, "MsvMovingSemaphore");
1.85 +
1.86 +_LIT_SECURE_ID(KMsvServerId, 0x1000484B);
1.87 +
1.88 +
1.89 +/** Represents an entry in the Message Server index.
1.90 +
1.91 +MTM implementations and message client applications use it to access and manipulate
1.92 +index entry values. Note that a TMsvEntry is effectively a local cache of
1.93 +the index entry, and changes to it are not automatically written into the
1.94 +index. To commit changes to the Message Server, you need to call CMsvEntry::ChangeL()
1.95 +(or CMsvServerEntry::ChangeEntry()).
1.96 +
1.97 +To avoid repetition, the functions and data members are simply listed here,
1.98 +without detailed explanation of the fields. The public data members can be
1.99 +used to get and set the values of some index entry fields.
1.100 +@publishedAll
1.101 +@released
1.102 +*/
1.103 +class TMsvEntry
1.104 + {
1.105 +public:
1.106 + IMPORT_C TMsvEntry();
1.107 + IMPORT_C TMsvEntry(const TMsvEntry& aEntry);
1.108 + IMPORT_C TMsvEntry& operator=(const TMsvEntry& aEntry);
1.109 + IMPORT_C TBool operator==(const TMsvEntry& aEntry) const;
1.110 + IMPORT_C TBool PermanentDataUnchanged(const TMsvEntry& aEntry) const;
1.111 + //
1.112 + IMPORT_C TMsvPriority Priority() const;
1.113 + IMPORT_C void SetPriority(TMsvPriority aPriority);
1.114 + //
1.115 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.116 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.117 + // Read only for clients
1.118 + inline TMsvId Id() const;
1.119 + inline TMsvId Parent() const;
1.120 + inline TBool Owner() const;
1.121 + inline TBool Deleted() const;
1.122 + // Read & write for clients
1.123 + inline TBool Complete() const;
1.124 + inline void SetComplete(TBool aComplete);
1.125 + inline TBool New() const;
1.126 + inline void SetNew(TBool aNew);
1.127 + inline TBool Unread() const;
1.128 + inline void SetUnread(TBool aUnread);
1.129 + inline TBool Failed() const;
1.130 + inline void SetFailed(TBool aFailed);
1.131 + inline TBool Operation() const;
1.132 + inline void SetOperation(TBool aOperation);
1.133 + inline TBool Visible() const;
1.134 + inline void SetVisible(TBool aVisble);
1.135 + inline TBool MultipleRecipients() const;
1.136 + inline void SetMultipleRecipients(TBool aMultipleRecipient);
1.137 + inline TBool ReadOnly() const;
1.138 + inline void SetReadOnly(TBool aReadOnly);
1.139 + inline TBool StandardFolder() const;
1.140 + inline void SetStandardFolder(TBool aStanardFolder);
1.141 + inline TBool Attachment() const;
1.142 + inline void SetAttachment(TBool aAttachmentFlag);
1.143 + inline TBool Connected() const;
1.144 + inline void SetConnected(TBool aConnected);
1.145 + inline TBool InPreparation() const;
1.146 + inline void SetInPreparation(TBool aInPreparation);
1.147 + //
1.148 + inline TInt PcSyncCount() const;
1.149 + inline void DecPcSyncCount();
1.150 + inline void IncPcSyncCount();
1.151 + //
1.152 + inline TBool OffPeak() const;
1.153 + inline void SetOffPeak(TBool aOffPeak);
1.154 + inline TBool Scheduled() const;
1.155 + inline void SetScheduled(TBool aScheduled);
1.156 + inline TUint SendingState() const;
1.157 + inline void SetSendingState(TUint aSendingState);
1.158 + inline TBool PendingDelete() const;
1.159 + inline void SetPendingDelete(TBool aPendingDelete);
1.160 +
1.161 + /** This method sets bit 24 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
1.162 + inline void SetDeleteProtected(TBool aDeleteProtected);
1.163 + inline TBool DeleteProtected() const;
1.164 + /** This method sets bit 31 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
1.165 + inline void SetForwarded(TBool aForwarded);
1.166 + inline TBool Forwarded() const;
1.167 + /** This method sets bit 32 of iMtmData1, if you are using this bit elsewhere don't call this method.*/
1.168 + inline void SetLocallyDeleted(TBool aLocallyDeleted);
1.169 + inline TBool LocallyDeleted() const;
1.170 +
1.171 + IMPORT_C TBool PendingConditions() const;
1.172 + IMPORT_C void SetPendingConditions(TBool aPendingConditions);
1.173 + //
1.174 + IMPORT_C TInt32 MtmData1() const;
1.175 + IMPORT_C TInt32 MtmData2() const;
1.176 + IMPORT_C TInt32 MtmData3() const;
1.177 +
1.178 + /**
1.179 + @internalTechnology
1.180 + */
1.181 + IMPORT_C void SetMtmData1(TInt32 aMtmData);
1.182 + /**
1.183 + @internalTechnology
1.184 + */
1.185 + IMPORT_C void SetMtmData2(TInt32 aMtmData);
1.186 + /**
1.187 + @internalTechnology
1.188 + */
1.189 + IMPORT_C void SetMtmData3(TInt32 aMtmData);
1.190 + //
1.191 +protected:
1.192 + // only the server will be able to set the following
1.193 + inline void SetId(TMsvId aId);
1.194 + inline void SetParent(TMsvId aId);
1.195 + inline void SetOwner(TBool aAttachment);
1.196 + inline void SetDeleted(TBool aDeletedFlag);
1.197 + //
1.198 + inline TUint PersistedFlags() const;
1.199 + inline TUint TemporaryFlags() const;
1.200 + //
1.201 +private:
1.202 + void Copy(const TMsvEntry& aEntry);
1.203 + //
1.204 +private:
1.205 + TMsvId iId;
1.206 + TMsvId iParentId;
1.207 + TInt32 iData;
1.208 + TInt32 iPcSyncCount;
1.209 + TInt32 iReserved; // reserved for future proofing
1.210 +public:
1.211 + /** Service ID. */
1.212 + TMsvId iServiceId;
1.213 + /** Related folder ID. */
1.214 + TMsvId iRelatedId;
1.215 + /** Entry type */
1.216 + TUid iType;
1.217 + /** MTM */
1.218 + TUid iMtm;
1.219 + /** Time */
1.220 + TTime iDate;
1.221 + /** Size */
1.222 + TInt32 iSize;
1.223 + /** Error */
1.224 + TInt32 iError;
1.225 + /** BIO message type */
1.226 + TInt32 iBioType;
1.227 + // following three can be used by MTM
1.228 + /** MTM data 1: this can be used for any purpose by an MTM. This member must
1.229 + only be accessed through the predefined set and get functions. If you must
1.230 + write data to a bit that has no meaning in the predefined derived classes
1.231 + then you must derive your own class from TMsvEntry.
1.232 + */
1.233 + TInt32 iMtmData1;
1.234 + /** MTM data 2: this can be used for any purpose by an MTM. This member must
1.235 + only be accessed through the predefined set and get functions. If you must
1.236 + write data to a bit that has no meaning in the predefined derived classes
1.237 + then you must derive your own class from TMsvEntry.
1.238 + */
1.239 + TInt32 iMtmData2;
1.240 + /** MTM data 3: this can be used for any purpose by an MTM. This member must
1.241 + only be accessed through the predefined set and get functions. If you must
1.242 + write data to a bit that has no meaning in the predefined derived classes
1.243 + then you must derive your own class from TMsvEntry.
1.244 + */
1.245 + TInt32 iMtmData3;
1.246 +public:
1.247 + // The TPtrC must be kept at end of class to simplify comparisons and initialisation
1.248 + /** Description */
1.249 + TPtrC iDescription;
1.250 + /** Details */
1.251 + TPtrC iDetails;
1.252 + //
1.253 + //
1.254 +private:
1.255 + //
1.256 +friend class CMsvEntry;
1.257 +friend class CMsvServer;
1.258 +friend class CMsvServerEntry;
1.259 +friend class CMsvClientEntry;
1.260 +friend class CMsvServerSession;
1.261 +friend class TMsvServerEntry;
1.262 +friend class CMsvServerIndex;
1.263 +friend class RMsvServerSession;
1.264 +friend class CMsvLocalCopyOperation;
1.265 +friend class CMsvMove;
1.266 +friend class CMsvIndexRebuild;
1.267 +friend class CMsvCopyEntry;
1.268 +friend class CMsvDelete;
1.269 +friend class CMsvIndexContext;
1.270 +friend class CMsvEntryArray;
1.271 + //
1.272 +private:
1.273 + //
1.274 +enum { KMsvEntryPriorityMask= 0x00000003,
1.275 + KMsvEntryHighPriority= 0x00000002,
1.276 + KMsvEntryMediumPriority= 0x00000001,
1.277 + KMsvEntryLowPriority= 0x00000000,
1.278 + KMsvEntryClearFlag= 0x00000000,
1.279 + KMsvOffPeakFlag= 0x00000004,
1.280 + KMsvEntryNotCompleteFlag= 0x00000008,
1.281 + KMsvEntryNewFlag= 0x00000010,
1.282 + KMsvEntryUnreadFlag= 0x00000020,
1.283 + KMsvEntryFailedFlag= 0x00000040,
1.284 + KMsvEntryOperationFlag= 0x00000080,
1.285 + KMsvEntryOwnerFlag= 0x00000100,
1.286 + KMsvEntryInvisibleFlag= 0x00000200,
1.287 + KMsvEntryMultipleRecipientFlag= 0x00000400,
1.288 + KMsvScheduledFlag= 0x00000800,
1.289 + KMsvEntryReadOnlyFlag= 0x00001000,
1.290 + KMsvEntryDeletedFlag= 0x00002000,
1.291 + KMsvEntryStandardFolderFlag= 0x00004000,
1.292 + KMsvEntryAttachmentFlag= 0x00008000,
1.293 + KMsvEntryInPreparationFlag= 0x00010000,
1.294 + KMsvSendingStateFlags= 0x001E0000, // Note: Sending state is shifted KMsvSendingStateShift places left
1.295 + KMsvEntryPersistedFlags= 0x00FFFFFF,
1.296 + KMsvEntryPendingConditionsFlag= 0x00800000,
1.297 + KMsvEntryTemporaryFlags= 0xFF000000,
1.298 + KMsvEntryConnectedFlag= 0x01000000,
1.299 + KMsvEntryPendingDeleteFlag= 0x02000000};
1.300 + };
1.301 +enum
1.302 + {
1.303 + KMsvEntryDeleteProtected= 0x800000,
1.304 + KMsvEntryForwarded= 0x40000000,
1.305 + KMsvEntryLocallyDeleted= 0x80000000
1.306 + };
1.307 +
1.308 +const TUint KMsvSendingStateShift=0x11; // Places to shift sending state
1.309 +
1.310 +/** Defines sending state flags.
1.311 +@publishedAll
1.312 +@released
1.313 +*/
1.314 +enum TMsvSendState
1.315 + {
1.316 + /** State unknown. */
1.317 + KMsvSendStateUnknown = 0x0,
1.318 + /** Message will be sent on request. */
1.319 + KMsvSendStateUponRequest = 0x1,
1.320 + /** Waiting to be sent.
1.321 +
1.322 + Messages in the outbox with this state can be sent automatically by the relevant
1.323 + MTM once an appropriate connection is established. */
1.324 + KMsvSendStateWaiting = 0x2,
1.325 + /** Sending in progress. */
1.326 + KMsvSendStateSending = 0x3,
1.327 + /** Sending scheduled. */
1.328 + KMsvSendStateScheduled = 0x4,
1.329 + /** Resending. */
1.330 + KMsvSendStateResend = 0x5,
1.331 + /** Sending suspended. */
1.332 + KMsvSendStateSuspended = 0x6,
1.333 + /** Sending failed. */
1.334 + KMsvSendStateFailed = 0x7,
1.335 + /** Sending complete. */
1.336 + KMsvSendStateSent = 0x8,
1.337 + /** Not applicable. */
1.338 + KMsvSendStateNotApplicable = 0x9
1.339 + };
1.340 +
1.341 +const TUint KMsvSendStateLast = KMsvSendStateNotApplicable;
1.342 +const TUint KMsvSendStateMax = 0x0F;
1.343 +
1.344 +/** Supplies values for bitmasks that allows the rapid setting or clearing of a
1.345 +number of TMsvEntry fields.
1.346 +
1.347 +The fields that can be manipulated are:
1.348 +
1.349 +1. PC synchronisation
1.350 +
1.351 +2. Visibility flag
1.352 +
1.353 +3. Read flag
1.354 +
1.355 +4. In-preparation flag
1.356 +
1.357 +5. Connected flag
1.358 +
1.359 +6. Pending deletion flag.
1.360 +
1.361 +7. New flag
1.362 +
1.363 +@see TMsvEntry
1.364 +@see CMsvSession::ChangeAttributesL()
1.365 +@see CMsvServerEntry::ChangeAttributes()
1.366 +@publishedAll
1.367 +@released
1.368 +*/
1.369 +enum TMsvAttribute {
1.370 + /** PC synchronisation field. */
1.371 + KMsvPcSyncCountAttribute =0x00000001,
1.372 + /** Visibility flag field. */
1.373 + KMsvVisibilityAttribute =0x00000200,
1.374 + /** Read flag field. */
1.375 + KMsvUnreadAttribute =0x00000020,
1.376 + /** In-preparation field. */
1.377 + KMsvInPreparationAttribute =0x00010000,
1.378 + /** Connected flag field. */
1.379 + KMsvConnectedAttribute =0x01000000,
1.380 + /** Pending deletion flag. */
1.381 + KMsvPendingDeleteAttribute =0x02000000,
1.382 + /** New flag field. */
1.383 + KMsvNewAttribute =0x00000010};
1.384 +
1.385 +/** Defines the sort order options for a TMsvSelectionOrdering object. Options
1.386 +are set through TMsvSelectionOrdering::SetSorting().
1.387 +
1.388 +@see TMsvSelectionOrdering
1.389 +@publishedAll
1.390 +@released
1.391 +*/
1.392 +enum TMsvSorting
1.393 + {
1.394 + /** Don't sort */
1.395 + EMsvSortByNone=0, // Don't sort
1.396 + /** Date (earliest-latest) */
1.397 + EMsvSortByDate, // Date (earliest-latest)
1.398 + /** Date (latest-earliest) */
1.399 + EMsvSortByDateReverse, // Date (latest-earliest)
1.400 + /** Size (smallest-largest) */
1.401 + EMsvSortBySize, // Size (smallest-largest)
1.402 + /** Size (largest-smallest) */
1.403 + EMsvSortBySizeReverse, // Size (largest-smallest)
1.404 + /** To/From (A-Z folded) */
1.405 + EMsvSortByDetails, // ToFrom (A-Z collated)
1.406 + /** To/From (Z-A folded) */
1.407 + EMsvSortByDetailsReverse, // ToFrom (Z-A collated)
1.408 + /** Description (A-Z folded) */
1.409 + EMsvSortByDescription, // Description (A-Z collated)
1.410 + /** Description (Z-A folded) */
1.411 + EMsvSortByDescriptionReverse, // Description (Z-A collated)
1.412 + /** Sort by message ID. */
1.413 + EMsvSortById, // Id (lowest-highest)
1.414 + /** Sort in reverse order by message ID. */
1.415 + EMsvSortByIdReverse // Id (highest-lowest)
1.416 + };
1.417 +
1.418 +/** Defines grouping order options for a TMsvEntrySelection object. Grouping options
1.419 +can be combined in a bitmask and set through the TMsvEntrySelection constructor
1.420 +@publishedAll
1.421 +@released
1.422 +*/
1.423 +enum TMsvGrouping
1.424 + {
1.425 + /** No grouping */
1.426 + KMsvNoGrouping=0, // No grouping
1.427 + /** Group by entry type, in order, services, folders, messages, attachments */
1.428 + KMsvGroupByType=0x2, // Folder, Message, Attachment
1.429 + /** Place standard folders first, in the order they were created */
1.430 + KMsvGroupByStandardFolders=0x6, // Standrad folders first (must have sorting by type set aswell)
1.431 + /** Group by message priority, in order, high, medium, then low */
1.432 + KMsvGroupByPriority=0x8, // High, Mediem, Low
1.433 + /** Group by MTM, either in the order set by CMsvEntry::SetMtmListL() or by MTM
1.434 + Uid value */
1.435 + KMsvGroupByMtm=0x10, // By increasing uid value
1.436 + };
1.437 +
1.438 +/** Defines the sorting and grouping rules used to prepare a selection of entries.
1.439 +
1.440 +It is used in the interfaces of CMsvEntry and CMsvServerEntry to set the ordering
1.441 +of an entry's children.
1.442 +
1.443 +Firstly, the entries will be grouped, if the appropriate grouping option is
1.444 +set, by:
1.445 +
1.446 +1. Standard folders: any entries marked as standard folders are placed first,
1.447 +in the order they were created.
1.448 +
1.449 +2. Entry type: in the order services, folders, messages, attachments, unknown
1.450 +
1.451 +3. Priority: in the order high, medium, then low
1.452 +
1.453 +4. MTM: either in the MTM order set by CMsvEntry::SetMtmListL() or just in MTM
1.454 +Uid value
1.455 +
1.456 +Grouping options are simply Boolean flags that can be set on or off by functions
1.457 +of this class.
1.458 +
1.459 +Secondly, the order of entries within these groups is defined by a sorting
1.460 +order option.
1.461 +
1.462 +@see CMsvEntry
1.463 +@see CMsvServerEntry
1.464 +@publishedAll
1.465 +@released
1.466 +*/
1.467 +class TMsvSelectionOrdering
1.468 + {
1.469 +public:
1.470 + IMPORT_C TMsvSelectionOrdering();
1.471 + IMPORT_C TMsvSelectionOrdering(TInt aGroupingKey, TMsvSorting aSorting, TBool aShowInvisible=EFalse);
1.472 + IMPORT_C void InternalizeL(RReadStream& aStream);
1.473 + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.474 + IMPORT_C TBool operator==(const TMsvSelectionOrdering& aOrdering) const;
1.475 + IMPORT_C void SetSubjectSkipString(const TDesC& aSubjectSkipString);
1.476 + IMPORT_C const TDesC& SubjectSkipString() const;
1.477 +
1.478 + //
1.479 + inline TMsvSorting Sorting() const;
1.480 + inline TBool GroupByType() const;
1.481 + inline TBool GroupStandardFolders() const;
1.482 + inline TBool GroupByPriority() const;
1.483 + inline TBool GroupByMtm() const;
1.484 + inline TBool ShowInvisibleEntries() const;
1.485 + inline TBool GroupingOn() const;
1.486 + //
1.487 + inline void SetGroupByType(TBool aFlag);
1.488 + inline void SetGroupStandardFolders(TBool aFlag);
1.489 + inline void SetGroupByPriority(TBool aFlag);
1.490 + inline void SetGroupByMtm(TBool aFlag);
1.491 + inline void SetShowInvisibleEntries(TBool aFlag);
1.492 + inline void SetSorting(TMsvSorting aSortType);
1.493 +
1.494 + //
1.495 + //
1.496 +private:
1.497 +
1.498 + enum TMsvGroupingPrivate
1.499 + {
1.500 + KMsvInvisibleFlag=0x1,
1.501 + KMsvStandardFolders=0x4,
1.502 + KMsvAllGroupingFlags=0x1e
1.503 + };
1.504 + TInt iGrouping;
1.505 + TMsvSorting iSortType;
1.506 + TBuf<KMaxSubjectSkipStringLength> iSubjectSkipString;
1.507 + };
1.508 +
1.509 +const TInt KMsvInvisibleFlag=1;
1.510 +
1.511 +/** Encapsulates an array of entry IDs.
1.512 +
1.513 +An object of this type is commonly passed to a function to indicate the set
1.514 +of entries on which the function should operate. The array base class (CArrayFixFlat<TMsvId>)
1.515 +provide methods to access, sort, and manipulate members of the array.
1.516 +
1.517 +@publishedAll
1.518 +@released
1.519 +*/
1.520 +class CMsvEntrySelection : public CArrayFixFlat<TMsvId>
1.521 + {
1.522 +public:
1.523 + IMPORT_C CMsvEntrySelection();
1.524 + IMPORT_C CMsvEntrySelection* CopyL() const;
1.525 + IMPORT_C CMsvEntrySelection* CopyLC() const;
1.526 + IMPORT_C TInt Find(TMsvId aId) const;
1.527 + };
1.528 +
1.529 +/** Specifies a default service for a MTM.
1.530 +
1.531 +@publishedAll
1.532 +@released
1.533 +*/
1.534 +class TMsvDefaultService
1.535 + {
1.536 +public:
1.537 + /** MTM for which the default service is specified. */
1.538 + TUid iMtm;
1.539 + /** ID of the default service. */
1.540 + TMsvId iService;
1.541 + };
1.542 +
1.543 +
1.544 +
1.545 +/** Used to query the Message Server for entries that match the specification defined
1.546 +in the filter.
1.547 +
1.548 +It allows a query to be performed on service, MTM, type and last change date.
1.549 +The filter also enables the specification of the order in which the entries
1.550 +are returned.
1.551 +
1.552 +@see CMsvSession::GetChildIdsL()
1.553 +@publishedAll
1.554 +@released
1.555 +*/
1.556 +class CMsvEntryFilter : public CBase
1.557 + {
1.558 +public:
1.559 + IMPORT_C static CMsvEntryFilter* NewLC();
1.560 + IMPORT_C static CMsvEntryFilter* NewL();
1.561 + //
1.562 +public:
1.563 + inline TMsvId Service() const;
1.564 + inline void SetService(TMsvId aServiceId);
1.565 + //
1.566 + inline TUid Mtm() const;
1.567 + inline void SetMtm(TUid aMtm);
1.568 + //
1.569 + inline TUid Type() const;
1.570 + inline void SetType(TUid aType);
1.571 + //
1.572 + inline const TTime& LastChangeDate() const;
1.573 + inline void SetLastChangeDate(const TTime& aLastChange);
1.574 + //
1.575 + inline const TMsvSelectionOrdering& Order() const;
1.576 + inline void SetOrder(const TMsvSelectionOrdering& aOrder);
1.577 + //
1.578 + inline TUid SortMtm() const;
1.579 + inline void SetSortMtm(TUid aSortMtm);
1.580 + //
1.581 +private:
1.582 + CMsvEntryFilter();
1.583 + //
1.584 +private:
1.585 + TMsvId iServiceId;
1.586 + TUid iMtm;
1.587 + TUid iType;
1.588 + TTime iLastChange;
1.589 + TMsvSelectionOrdering iOrdering;
1.590 + TUid iSortMtm;
1.591 + };
1.592 +
1.593 +// Error resolver leave codes -7000 to -7127
1.594 +/** Defines error codes that relate to the Message Server.
1.595 +
1.596 +@see MMsvEntryObserver::EMsvContextInvalid
1.597 +@publishedAll
1.598 +@released
1.599 +*/
1.600 +enum TMsvResolverLeave
1.601 + {
1.602 + /** There is no disk in the drive containing the Message Server index. */
1.603 + KMsvMediaUnavailable = -7000,
1.604 + /** There is a disk in the drive containing the Message Server index, but it is
1.605 + the wrong one. */
1.606 + KMsvMediaIncorrect = -7001,
1.607 + /** A CMsvEntry context is no longer valid because the location of the Message Server's
1.608 + index has changed.
1.609 +
1.610 + Such contexts will need refreshing by the client.
1.611 +
1.612 + @see MMsvEntryObserver::EMsvContextInvalid */
1.613 + KMsvMediaChanged = -7002,
1.614 + KMsvIndexBackup = -7003,
1.615 + KMsvIndexRestore = -7004
1.616 + };
1.617 +
1.618 +#include <msvstd.inl>
1.619 +
1.620 +#endif