emailservices/emailframework/commonlib/inc/CFSMailCommon.h
branchRCL_3
changeset 25 3533d4323edc
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
       
     1 /*
       
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  email framework common definitions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __CFSMAILCOMMON_H
       
    20 #define __CFSMAILCOMMON_H
       
    21 
       
    22 /** folder type definitions */  
       
    23 enum TFSFolderType
       
    24     {
       
    25     EFSInbox = 1,
       
    26     EFSOutbox,
       
    27     EFSDraftsFolder,
       
    28     EFSSentFolder,
       
    29     EFSDeleted,
       
    30     EFSOther
       
    31     };
       
    32     
       
    33 /** email flags */  
       
    34 enum TFSMsgFlag
       
    35     {
       
    36     EFSMsgFlag_Read = 1,                 // Message is read (or "seen") on the server
       
    37     EFSMsgFlag_Read_Locally = 2,         // Message is read on the client
       
    38     EFSMsgFlag_Low = 4,                  // Message has low priority
       
    39     EFSMsgFlag_Important = 8,            // Message has high priority
       
    40     EFSMsgFlag_FollowUpComplete = 16,    // The message follow-up is complete
       
    41     EFSMsgFlag_FollowUp = 32,            // Message is flagged (a flag is showing next to msg in Outlook)
       
    42     EFSMsgFlag_Attachments = 64,         // Message has attachments
       
    43     EFSMsgFlag_Multiple = 128,           // Message has more than one recipient
       
    44     EFSMsgFlag_CalendarMsg = 256,        // Message is a calendar message
       
    45     EFSMsgFlag_Answered = 512,           // The message was replied to
       
    46     EFSMsgFlag_Forwarded = 1024,         // The message was forwarded
       
    47     EFSMsgFlag_OnlyToMe = 2048,          // The message was sent only to this user
       
    48     EFSMsgFlag_RemoteDeleted = 4096,     // The message has been deleted on the server
       
    49     EFSMsgFlag_HasMsgSender = 8192,      // The message has one or more senders 
       
    50     EFSMsgFlag_BodyTruncated = 16384,    // The message body has exceeded the maximum size and was truncated 
       
    51     };
       
    52 
       
    53 /** email list sorting options */  
       
    54 enum TFSMailSortField
       
    55     {
       
    56     EFSMailDontCare,            // user accepts any sort order
       
    57     EFSMailSortByDate,          // sorting is done by date
       
    58     EFSMailSortBySender,        // sorting is done by sender
       
    59     EFSMailSortByRecipient,     // sorting is done by recipients
       
    60     EFSMailSortBySubject,       // sorting is done by subject
       
    61     EFSMailSortByPriority,      // sorting is done by priority
       
    62     EFSMailSortByFlagStatus,    // follow up and completed   
       
    63     EFSMailSortByUnread,        // sorting is based on unread
       
    64     EFSMailSortBySize,          // sorting is done by size
       
    65     EFSMailSortByAttachment     // sorting is based on if message has attachments
       
    66     };
       
    67 
       
    68 /** email list sort order */  
       
    69 enum TFSMailSortOrder
       
    70     {
       
    71     EFSMailDescending,
       
    72     EFSMailAscending    
       
    73     };
       
    74 
       
    75 /** email list sort criteria definition */  
       
    76 class TFSMailSortCriteria
       
    77     {
       
    78     public:
       
    79         TFSMailSortField iField;
       
    80         TFSMailSortOrder iOrder;
       
    81     };
       
    82 
       
    83 /** mailbox status */
       
    84 enum TFSMailBoxStatus
       
    85     {
       
    86     EFSMailBoxOffline = 1,
       
    87     EFSMailBoxOnline
       
    88     };
       
    89 
       
    90 /** mailbox capabilities */
       
    91 enum TFSMailBoxCapabilities
       
    92     {
       
    93     // Mailbox supports creating subfolders.
       
    94     // Not supported by UI in 1.0 release.
       
    95     EFSMBoxCapaCreateSubfolder = 1,
       
    96     
       
    97     // Mailbox supports responding to meeting requests.
       
    98     EFSMBoxCapaMeetingRequestRespond,
       
    99     
       
   100     // Mailbox supports meeting request creation.
       
   101     EFSMBoxCapaMeetingRequestCreate,
       
   102     
       
   103     // Mailbox supports meeting request update.
       
   104     EFSMBoxCapaCanUpdateMeetingRequest,     
       
   105     
       
   106     // Mailbox supports user folder manipulation (rename and delete).
       
   107     // Not supported by UI in 1.0 release.
       
   108     EFSMBoxCapaManipulateUserFolders,
       
   109     
       
   110     // Mailbox supports moving messages to and from user folders.
       
   111     // Not supported in 1.0 release. 
       
   112     // (NOT USED. To be defined in the future.)
       
   113     EFSMBoxCapaMoveMessageToUserFolder,
       
   114     
       
   115     // Mailbox can move messages in offline or handle go online itself
       
   116     EFSMBoxCapaMoveMessageNoConnectNeeded,
       
   117     
       
   118     // Mailbox supports moving messages between folders.
       
   119     EFSMBoxCapaMoveToFolder,
       
   120     
       
   121     // Mailbox supports copying messages between folders.
       
   122     // Not supported by UI in 1.0 release.
       
   123     EFSMBoxCapaCopyToFolder,
       
   124     
       
   125     // Mailbox supports smart reply feature.
       
   126     // Returned by Intellisync and ActiveSync. UI will fetch rest of message if not supported.
       
   127     EFSMBoxCapaSmartReply,
       
   128     
       
   129     // Mailbox supports smart forward feature.
       
   130     // Returned by Intellisync and ActiveSync. UI will fetch rest of message if not supported.
       
   131     EFSMBoxCapaSmartForward,
       
   132     
       
   133     // Mailbox handles itself integration to Symbian Messaging.
       
   134     // Not supported by any protocol in 1.0 release.
       
   135     //
       
   136     // (Should be returned for mailboxes that handle possible Symbian Messaging 
       
   137     // integration themselves. I.e. FW must not ask FS Integration MTM to replicate 
       
   138     // these mailboxes to Symbian Messaging. It is intended to prevent duplicate 
       
   139     // accounts in Symbian Messaging in the case when protocol plugin actually 
       
   140     // already has visible accounts in Symbian Messaging.)
       
   141     EFSMBoxCapaSymbianMsgIntegration,
       
   142     
       
   143     // Mailbox implements new email notifications itself.
       
   144     // Not supported by any protocol in 1.0 release.
       
   145     //
       
   146     // (EFSMBoxCapaNewEmailNotifications is intended to be defined for mailboxes that 
       
   147     // handle new email notifications some other way than relying to FW 
       
   148     // displaying them (e.g. via NCNList). If this is defined for a mailbox then 
       
   149     // FW will not monitor and display new email notifications for the mailbox.
       
   150     // The aim is to prevent possible duplicate notifications to user.)
       
   151     EFSMBoxCapaNewEmailNotifications,
       
   152     
       
   153     // Mailbox supports MRU feature.
       
   154     // Framework can check this before updating the list for optimization. Intellisync and ActiveSync need to set.
       
   155     // Capability is not checked in UI. Plugin just returns a null if there’s no MRU list and the UI doesn’t show anything.
       
   156     EFSMBoxCapaSupportsMRU,
       
   157      
       
   158     // Mailbox can be deleted.
       
   159     // Set by Intellisync and ActiveSync only if the server supports.
       
   160     EFSMBoxCapaCanBeDeleted,
       
   161         
       
   162     // Mailbox supports out of office feature.
       
   163     // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated?
       
   164     // EFSMBoxCapaSupportsOutOfOffice,
       
   165     
       
   166     // Mailbox supports setting OoO on/off.
       
   167     // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated?
       
   168     // EFSMBoxCapaOutOfOfficeSet,
       
   169     
       
   170     // Mailbox supports editing out of office.
       
   171     // Set by Intellisync and ActiveSync. Not used by UI -> can be deprecated?
       
   172     // EFSMBoxCapaOutOfOfficeEdit,
       
   173     
       
   174     // Mailbox supports saving to drafts automically when "create message to send" and 
       
   175     // "save message" (in framework api) are used.
       
   176     EFSMBoxCapaSupportsSaveToDrafts,
       
   177     
       
   178     // Remote Contact Lookup is supported via this mailbox.
       
   179     // Set by Intellisync and ActiveSync.
       
   180     EFSMBoxCapaSupportsRCL,
       
   181     
       
   182     // Mailbox supports followup. Email UI hides Follow Up flagging if mailbox does not support it.
       
   183     EFSMBoxCapaSupportsFollowUp,
       
   184     
       
   185     // Mailbox supports for "do you want to delete"prompt.
       
   186     EFSMBoxCapaSupportsDeletedItemsFolder,
       
   187 
       
   188     // Mailbox does not support editing original message with smart reply or forward
       
   189     EFSMBoxCapaReadOnlySmartQuote,
       
   190 
       
   191     // Mailbox supports sync
       
   192     EFSMBoxCapaSupportsSync,
       
   193 
       
   194     // Mailbox supports email reply-to feature
       
   195     EFSMBoxCapaSupportsReplyTo,
       
   196 
       
   197     // Mailbox supports tracking meeting request attendee status
       
   198     // only supported by IntelliSync
       
   199     EFSMBoxCapaMeetingRequestAttendeeStatus,
       
   200 
       
   201     EFSMBoxCapaMRRequiresReplyEmail,
       
   202     
       
   203     // Mailbox supports embedded reply / forward message feature.
       
   204     EFSMBoxCapaEmbeddedReplyForwardMessage,
       
   205     
       
   206     // Mailbox supports removing entry from calendar
       
   207     EFSMBoxCapaRemoveFromCalendar,
       
   208 
       
   209     // Mailbox supports attachments in meeting requests
       
   210     EFSMboxCapaSupportsAttahmentsInMR,
       
   211     
       
   212     // Mailbox supports saving of embedded messages
       
   213     EFSMboxCapaSupportsSavingOfEmbeddedMessages,
       
   214     
       
   215     // Mailbox supports smart editing feature.
       
   216     // Returned by Intellisync and ActiveSync. If defined, UI will fetch message body fully. 
       
   217     EFSMBoxCapaSmartEdit
       
   218     };
       
   219 
       
   220 /** email details included in plugin responses */
       
   221 enum TFSMailDetails 
       
   222     {
       
   223     EFSMsgDataIdOnly = 1,       // Doesn't get any data. The object just contains the ID.
       
   224     EFSMsgDataDate = 2,         // Get received date only. To be used when showing messages sorted by date.
       
   225                                 // The rest would be retreived when needed but date is needed to build the list.
       
   226     EFSMsgDataSubject = 4,      // Like above but when sorting by subject
       
   227     EFSMsgDataSender = 8,       // Likewise for sender address.
       
   228     EFSMsgDataEnvelope = 16,    // Date, subject, Sender, To, Cc at least.
       
   229     EFSMsgDataStructure = 32    // the part structure including mime type, size and name headers.
       
   230     };
       
   231 
       
   232     enum TFSPartFetchState
       
   233     {
       
   234     EFSDefault,
       
   235     EFSNone,
       
   236     EFSPartial,
       
   237     EFSFull,
       
   238     EFSEmailStructureUnknown
       
   239     };
       
   240 
       
   241 /** class for message part / message / folder / mailbox id */
       
   242 class TFSMailMsgId
       
   243     {
       
   244     public:
       
   245 
       
   246     inline TFSMailMsgId( ) // constructs NULL id
       
   247     { iPluginId.iUid = 0; iId = 0; iNullId = ETrue; iSeparator = EFalse; };
       
   248     inline TFSMailMsgId(TUid aPluginId, TUint aId)
       
   249     { iPluginId = aPluginId; iId = aId; iNullId = EFalse; iSeparator = EFalse; };
       
   250     inline TFSMailMsgId(TUint aPluginId, TUint aId)
       
   251     { iPluginId.iUid = aPluginId; iId = aId; iNullId = EFalse; iSeparator = EFalse; };
       
   252     inline TBool operator==(TFSMailMsgId aId) const
       
   253     { if(iNullId != aId.IsNullId()) return EFalse;
       
   254       if(iPluginId.iUid != aId.PluginId().iUid) return EFalse;
       
   255       if(iId != aId.Id()) return EFalse; return ETrue; };
       
   256     inline TBool operator!=(TFSMailMsgId aId) const
       
   257     { if(iNullId != aId.IsNullId()) return ETrue;
       
   258       if(iPluginId.iUid != aId.PluginId().iUid) return ETrue;
       
   259       if(iId != aId.Id()) return ETrue; return EFalse; }
       
   260     inline TBool IsNullId() const { return iNullId; };
       
   261     inline void  SetNullId() { iPluginId.iUid = 0; iId = 0; iNullId = ETrue; } ;
       
   262     inline TUid PluginId() const { return iPluginId; };
       
   263     inline TUint Id() const { return iId; };
       
   264     inline void  SetPluginId(TUid aPluginId) { iPluginId = aPluginId; iNullId = EFalse; };
       
   265     inline void  SetId(TUint aId) { iId = aId; iNullId = EFalse; };
       
   266     inline void SetSeparator( TBool aSeparator ) { iSeparator = aSeparator; }
       
   267     inline TBool IsSeparator() const { return iSeparator; }
       
   268     protected:
       
   269 
       
   270     TBool   iNullId;
       
   271     TUid    iPluginId;      // ecom implementation id
       
   272     TUint   iId;            // message, folder, mailbox id
       
   273     TBool   iSeparator;     // if object is separator
       
   274     };
       
   275 
       
   276 /* Predefined constants for ContentTypes and parameters for ContentType and ContentDisposition */
       
   277 _LIT(KFSMailContentTypeMultipartMixed, "multipart/mixed");
       
   278 _LIT(KFSMailContentTypeMultipartAlternative, "multipart/alternative");
       
   279 _LIT(KFSMailContentTypeMultipartDigest, "multipart/digest");
       
   280 _LIT(KFSMailContentTypeMultipartParallel, "multipart/parallel");
       
   281 _LIT(KFSMailContentTypeMultipartRelated,  "multipart/related");
       
   282 _LIT(KFSMailContentTypeTextPlain, "text/plain");
       
   283 _LIT(KFSMailContentTypeTextHtml, "text/html");
       
   284 _LIT(KFSMailContentTypeMessage, "message/rfc822");
       
   285 _LIT(KFSMailContentTypeParamName, " name=");
       
   286 _LIT(KFSMailContentTypeParamCharset, " charset=");
       
   287 _LIT(KFSMailContentTypeTextCalendar, "text/calendar");
       
   288 
       
   289 
       
   290 _LIT(KFSMailContentDispAttachment, " attachment");
       
   291 _LIT(KFSMailContentDispParamFilename, " filename=");
       
   292 
       
   293 /** mailbox synchronization states */
       
   294 enum TSSMailSyncState // Are all of these sensible as mailbox sync states (e.g. PasswordVerified)
       
   295     {
       
   296     Idle,
       
   297     StartingSync, // establishing connection to server
       
   298     DataSyncStarting,
       
   299     EmailSyncing, // For any email folder not explicitly listed.
       
   300     InboxSyncing, // System folders the plugin may report. Can use just EmailSyncing instead.
       
   301     OutboxSyncing,
       
   302     SentItemsSyncing,
       
   303     DraftsSyncing,
       
   304     CalendarSyncing,
       
   305     ContactsSyncing,
       
   306     TasksSyncing,
       
   307     NotesSyncing,
       
   308     FilesSyncing,
       
   309     FinishedSuccessfully,
       
   310     SyncError,
       
   311     SyncCancelled,
       
   312     PasswordExpiredError,
       
   313     PasswordVerified,
       
   314     PasswordNotVerified,
       
   315     PushChannelOff,
       
   316     PushChannelEstablished,
       
   317     PushChannelOffBecauseBatteryIsLow,
       
   318     OutOfDiskSpace
       
   319     };
       
   320 
       
   321 /**
       
   322  *  email framework exception event response callback
       
   323  *
       
   324  *  @since S60 v3.1
       
   325  */
       
   326 class MFSMailExceptionEventCallback
       
   327     {
       
   328     public:
       
   329 
       
   330     /**
       
   331      * Exception event resonse to plugin from FSMailServer after it has
       
   332      * processed the event (shown the corresponding dialog to user).
       
   333      * There can be several messages on the screen, but only one
       
   334      * of each message type per mailbox. So mailbox-message type
       
   335      * pairs should be enough to identify the responded event.
       
   336      *
       
   337      * @param aMailboxId Mailbox that sent the exception event
       
   338      * @param aEventType Event type of the responded event
       
   339      *                   (as TFsEmailNotifierSystemMessageType)
       
   340      * @param aResponse ETrue if user selected OK, Continue, etc. (LSK)
       
   341      *                  EFalse if user selected Cancel (RSK)
       
   342      */
       
   343      virtual void ExceptionEventCallbackL( TFSMailMsgId aMailboxId, TInt aEventType, TBool aResponse ) = 0;
       
   344 
       
   345      };
       
   346 
       
   347 
       
   348 /** plugin / message store events definitions
       
   349 
       
   350 Note! Store related events (backup/restore, store locked,
       
   351 wiped, authenticated/unauthenticated) would benefit from
       
   352 having a concept of plugin/service or store available in client API.
       
   353 These have been simplified behind only two events:
       
   354 TFSMailboxUnavailable and TFSMailboxAvailable.
       
   355 */
       
   356     enum TFSMailEvent
       
   357         {
       
   358         // Mailbox is unavailable
       
   359         // aParam1: NULL
       
   360         // aParam2: NULL
       
   361         // aParam3: NULL
       
   362         TFSMailboxUnavailable,
       
   363 
       
   364         // Mailbox is available
       
   365         // aParam1: NULL
       
   366         // aParam2: NULL
       
   367         // aParam3: NULL
       
   368         TFSMailboxAvailable,
       
   369 
       
   370         // New mailbox created
       
   371         // aParam1: NULL
       
   372         // aParam2: NULL
       
   373         // aParam3: NULL
       
   374         TFSEventNewMailbox, 
       
   375 
       
   376         // New mailbox creation failure
       
   377         // aParam1: NULL
       
   378         // aParam2: NULL
       
   379         // aParam3: NULL
       
   380         TFSEventMailboxCreationFailure, 
       
   381 
       
   382         // Mailbox renamed
       
   383         // aParam1: NULL
       
   384         // aParam2: NULL
       
   385         // aParam3: NULL
       
   386         TFSEventMailboxRenamed,
       
   387         
       
   388         // Mailbox deleted
       
   389         // aParam1: NULL
       
   390         // aParam2: NULL
       
   391         // aParam3: NULL
       
   392         TFSEventMailboxDeleted,
       
   393 
       
   394         //
       
   395         // Following events need to be subscribed per mailbox
       
   396         //
       
   397 
       
   398         // Mailbox capability changed
       
   399         // aParam1: NULL
       
   400         // aParam2: NULL
       
   401         // aParam3: NULL
       
   402         TFSEventMailboxCapabilityChanged,
       
   403 
       
   404         // Mailbox settings changed (OPEN: can this replace TFSEventMailboxCapabilityChanged?)
       
   405         // aParam1: NULL
       
   406         // aParam2: NULL
       
   407         // aParam3: NULL
       
   408         TFSEventMailboxSettingsChanged,
       
   409 
       
   410         // Mailbox went online
       
   411         // aParam1: NULL
       
   412         // aParam2: NULL
       
   413         // aParam3: NULL
       
   414         TFSEventMailboxOnline,
       
   415 
       
   416         // Mailbox went offline
       
   417         // aParam1: NULL
       
   418         // aParam2: NULL
       
   419         // aParam3: NULL
       
   420         TFSEventMailboxOffline,
       
   421 
       
   422         // Mailbox sync state changed
       
   423         // aParam1: TSSMailSyncState* newState
       
   424         // aParam2: NULL
       
   425         // aParam3: NULL
       
   426         TFSEventMailboxSyncStateChanged,
       
   427 
       
   428         // New mails created
       
   429         // aParam1: RArray<TFSMailId>* aNewEntries
       
   430         // aParam2: TFSMailId* aParentFolder
       
   431         // aParam3: NULL
       
   432         TFSEventNewMail, 
       
   433 
       
   434         // Mails changed
       
   435         // aParam1: RArray<TFSMailId>* aEntries
       
   436         // aParam2: TFSMailId* aParentFolder
       
   437         // aParam3: NULL
       
   438         TFSEventMailChanged,
       
   439         
       
   440         // Mails deleted
       
   441         // aParam1: RArray<TFSMailId>* aEntries
       
   442         // aParam2: TFSMailId* aParentFolder
       
   443         // aParam3: NULL
       
   444         TFSEventMailDeleted,
       
   445 
       
   446         // Mails moved
       
   447         // aParam1: RArray<TFSMailId>* aEntries
       
   448         // aParam2: TFSMailId* aNewParentFolder
       
   449         // aParam3: TFSMailId* aOldParentFolder
       
   450         TFSEventMailMoved,
       
   451 
       
   452         // Mails copied
       
   453         // aParam1: RArray<TFSMailId>* aNewEntries
       
   454         // aParam2: TFSMailId* aNewParentFolder
       
   455         // aParam3: TFSMailId* aOldParentFolder
       
   456         TFSEventMailCopied,
       
   457 
       
   458         // New folders created
       
   459         // aParam1: RArray<TFSMailId>* aNewEntries
       
   460         // aParam2: TFSMailId* aParentFolder
       
   461         // aParam3: NULL
       
   462         TFSEventNewFolder, 
       
   463 
       
   464         // Folders changed
       
   465         // aParam1: RArray<TFSMailId>* aEntries
       
   466         // aParam2: TFSMailId* aParentFolder
       
   467         // aParam3: NULL
       
   468         TFSEventFolderChanged,
       
   469         
       
   470         // Folders deleted
       
   471         // aParam1: RArray<TFSMailId>* aEntries
       
   472         // aParam2: TFSMailId* aParentFolder
       
   473         // aParam3: NULL
       
   474         TFSEventFoldersDeleted,
       
   475 
       
   476         // Folders moved
       
   477         // aParam1: RArray<TFSMailId>* aEntries
       
   478         // aParam2: TFSMailId* aNewParentFolder
       
   479         // aParam3: TFSMailId* aOldParentFolder
       
   480         TFSEventFoldersMoved,
       
   481 
       
   482         // exception / error happened 
       
   483         // aParam1: TInt (TFsEmailNotifierSystemMessageType) aEventType
       
   484         // aParam2: TDesC* aCustomMessage or NULL (optional)
       
   485         // aParam3: MFSMailExceptionEventCallback* aCallback or NULL (optional)
       
   486         TFSEventException,
       
   487         
       
   488         // Mail deleted from viewer
       
   489         // aParam1: RArray<TFSMailId>* aEntries
       
   490         // aParam2: TFSMailId* aParentFolder
       
   491         // aParam3: NULL
       
   492         TFSEventMailDeletedFromViewer,
       
   493         };
       
   494         
       
   495 /**
       
   496  * Progress data structure to indicate different kind of progress
       
   497  * information coming from plugins to user. Usually user uses
       
   498  * progress events to update progress bar in user interface.
       
   499  *
       
   500  * Download progress indication : 
       
   501  *   - first event iProgressStatus = EFSStatus_Started
       
   502  *   - next event iProgressStatus = EFSStatus_Status
       
   503  *   - last event iProgressStatus = EFSStatus_RequestComplete
       
   504  *   - iMaxCount downloadable object total size
       
   505  *   - iCounter currently downloaded object size
       
   506  *   - iError KErrNone
       
   507  *
       
   508  * Download request cancelled by user or by plugin :
       
   509  *
       
   510  *   - iProgressStatus = EFSStatus_RequestCancelled
       
   511  *   - iMaxCount & iCounter optional, latest values or ignore/unknown = -1
       
   512  *   - iError = symbian error code KErrCancel
       
   513  *
       
   514  * Download error :
       
   515  *
       
   516  *   - iProgressStatus = EFSStatus_RequestCancelled
       
   517  *   - iMaxCount & iCounter optional, latest values or ignore/unknown = -1
       
   518  *   - iError symbian error code
       
   519  * 
       
   520  * Connection establisment progress :
       
   521  *
       
   522  *   - iProgressStatus ; EFSStatus_Waiting, EFSStatus_Connecting,
       
   523  *     EFSStatus_Connected, EFSStatus_Authenticating, EFSStatus_Authenticated
       
   524  *     depending how plugin implements this
       
   525  *   - iMaxCount & iCounter optional, latest values or ignore/unknown = -1
       
   526  *   - iError symbian error code, KErrNone default
       
   527  */
       
   528 class TFSProgress
       
   529     {
       
   530 
       
   531 public:
       
   532 
       
   533     /** possible progress indication states  */
       
   534     enum TFSProgressStatus
       
   535     {
       
   536         EFSStatus_Waiting = 1,
       
   537         EFSStatus_Started,
       
   538         EFSStatus_Connecting,
       
   539         EFSStatus_Connected,
       
   540         EFSStatus_Authenticating,
       
   541         EFSStatus_Authenticated,
       
   542         EFSStatus_Status,
       
   543         EFSStatus_RequestComplete,
       
   544         EFSStatus_RequestCancelled,
       
   545     };
       
   546 
       
   547 public: // data
       
   548                 
       
   549     /** event progress / completion status*/
       
   550     TFSProgressStatus   iProgressStatus;
       
   551                     
       
   552     /** max value in progress countingc   */
       
   553     TInt                iMaxCount;
       
   554 
       
   555     /** progress counter                  */
       
   556     TInt                iCounter;
       
   557 
       
   558     /** error code (Symbian error codes)  */
       
   559     TInt                iError;
       
   560     };
       
   561     
       
   562 #endif // __CFSMAILCOMMON