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