emailuis/emailui/inc/FreestyleEmailUiConstants.h
changeset 0 8466d47a6819
child 8 e1b6206813b4
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007 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:  General constants for FS Email UI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __FREESTYLEEMAILUICONSTANTS_H__
       
    20 #define __FREESTYLEEMAILUICONSTANTS_H__
       
    21 
       
    22 //#define PBKX_DEBUG_LEVEL 0 // Print only errors
       
    23 //#define PBKX_DEBUG_LEVEL 1 // Print errors and warnings
       
    24 //#define PBKX_DEBUG_LEVEL 2 // Print errors, warnings, traces and infos
       
    25 #define PBKX_DEBUG_LEVEL 3 // Print errors, warnings, traces, infos, details
       
    26 
       
    27 //<cmail>
       
    28 #include "CFSMailCommon.h"
       
    29 //</cmail>
       
    30 #include <f32file.h>
       
    31 
       
    32 class CFSMailMessage;
       
    33 class MFSEmailUiFolderListCallback;
       
    34 
       
    35 /**
       
    36 * application UID and executable name
       
    37 */
       
    38 // <cmail> S60 UID update
       
    39 const TUid KFSEmailUiUid = { 0x2001E277 };
       
    40 // </cmail> S60 UID update
       
    41 _LIT( KFSEmailUiExec, "FreestyleEmailUi.exe" );
       
    42 
       
    43 
       
    44 /**
       
    45 * view ids
       
    46 */
       
    47 const TUid AppGridId = { 1 };
       
    48 const TUid MailListId = { 2 };
       
    49 const TUid SearchListViewId = { 3 };
       
    50 const TUid MailViewerId = { 4 };
       
    51 const TUid MailEditorId = { 5 };
       
    52 const TUid SettingsViewId = { 6 };
       
    53 const TUid MsgDetailsViewId = { 7 };
       
    54 const TUid FolderListId = { 8 };
       
    55 const TUid AttachmentMngrViewId = { 9 };
       
    56 const TUid GlobalSettingsViewId = { 10 };
       
    57 const TUid DownloadManagerViewId = { 11 };
       
    58 const TUid SendAttachmentMngrViewId = { 12 };
       
    59 const TUid HtmlViewerId = { 13 };
       
    60 const TUid UiDummyViewId = { 14 };
       
    61 
       
    62 
       
    63 // Display groups
       
    64 const TInt KGridDisplayGroup = 1;
       
    65 const TInt KMailListDisplayGroup = 2;
       
    66 const TInt KEmailViewerDisplayGroup = 3;
       
    67 const TInt KEmailEditorDisplayGroup = 4;
       
    68 const TInt KFolderListDisplayGroup = 5;
       
    69 const TInt KSettingsListDisplayGroup = 6;
       
    70 const TInt KAttachmentManagerDisplayGroup = 7;
       
    71 const TInt KMsgDetailsViewerControlGroup = 8;
       
    72 const TInt KDownloadManagerDisplayGroup = 9;
       
    73 const TInt KSearchResultDisplayGroup = 10;
       
    74 const TInt KStatusIndicatorDisplayGroup = 11;
       
    75 const TInt KHtmlViewerDisplayGroup = 12;
       
    76 const TInt KDummyControlGroup = 13;
       
    77 const TInt KDownloadIndicatorControlGroup = 14;
       
    78 const TInt KSendAttachmentManagerDisplayGroup = 15;
       
    79 
       
    80 /**
       
    81  * TLS handles
       
    82  */
       
    83 const TInt KTlsHandleCRHandler = 0xC0CEDE;
       
    84 const TInt KTlsHandleDownloadInfo = 0xCECECE;
       
    85 const TInt KTlsHandleMailListModel = 0xCECEDE;
       
    86 
       
    87 /**
       
    88 * Action menu custom item ids
       
    89 */
       
    90 enum TActionMenuCustomItemId
       
    91 	{
       
    92 	FsEActionMenuDismissed = -10,
       
    93 	FsEActionMenuCasItemSelectedAndExecuted,
       
    94 	
       
    95 	FsEActionMenuOpen = 1,
       
    96 	FsEActionMenuOpenCalendarEvent,
       
    97 	FsEActionMenuReply,
       
    98 	FsEActionMenuReplyAll,
       
    99 	FsEActionMenuForward,
       
   100 	FsEActionMenuDelete,
       
   101 	FsEActionMenuAccept,
       
   102 	FsEActionMenuTentative,
       
   103 	FsEActionMenuDecline,
       
   104 	FsEActionMenuRemoveFormCal,
       
   105 	FsEActionMenuMarkRead,
       
   106 	FsEActionMenuMarkUnread,
       
   107 	FsEActionMenuCall,
       
   108     // <cmail> video call
       
   109     FsEActionMenuCallVideo,
       
   110     // </cmail>
       
   111 	FsEActionMenuCreateMessage,
       
   112 	FsEActionMenuCreateEmail,
       
   113 	FsEActionMenuContactDetails,
       
   114 	FsEActionMenuAddToContacts,
       
   115 	FsEActionMenuRemoteLookup,
       
   116 	FsEActionMenuMove,
       
   117 	FsEActionMenuMoveToDrafts,
       
   118 	FsEActionMenuOpenInWeb,
       
   119 	FsEActionMenuOpenInIntranet,
       
   120 	FsEActionMenuBookmark,
       
   121 	FsEActionAttachmentOpen,
       
   122 	FsEActionAttachmentDownload,
       
   123 	FsEActionAttachmentCancelDownload,
       
   124 	FsEActionAttachmentSave,
       
   125     FsEActionAttachmentAdd,
       
   126     FsEActionAttachmentRemove,
       
   127 	FsEActionAttachmentViewAll,
       
   128 	FsEActionAttachmentDownloadAll,
       
   129 	FsEActionAttachmentCancelAllDownloads,
       
   130 	FsEActionAttachmentSaveAll,
       
   131     FsEActionAttachmentRemoveAll,
       
   132     FsEActionAttachmentClearFetchedContent,
       
   133     FsEActionAttachmentRemoveUnfetchedAttachment
       
   134 	};
       
   135 
       
   136 const TUid FsEActionMenuOpenUid = { FsEActionMenuOpen };
       
   137 const TUid FsEActionMenuReplyUid = { FsEActionMenuReply };
       
   138 const TUid FsEActionMenuReplyAllUid = { FsEActionMenuReplyAll };
       
   139 const TUid FsEActionMenuForwardUid = { FsEActionMenuForward };
       
   140 const TUid FsEActionMenuDeleteUid = { FsEActionMenuDelete };
       
   141 const TUid FsEActionMenuAcceptUid = { FsEActionMenuAccept };
       
   142 const TUid FsEActionMenuTentativeUid = { FsEActionMenuTentative };
       
   143 const TUid FsEActionMenuRemoveFromCalUid = { FsEActionMenuRemoveFormCal };
       
   144 const TUid FsEActionMenuDeclineUid = { FsEActionMenuDecline };
       
   145 const TUid FsEActionMenuMarkReadUid = { FsEActionMenuMarkRead };
       
   146 const TUid FsEActionMenuMarkUnreadUid = { FsEActionMenuMarkUnread };
       
   147 const TUid FsEActionMenuCallUid = { FsEActionMenuCall };
       
   148 // <cmail> video call
       
   149 const TUid FsEActionMenuCallVideoUid = { FsEActionMenuCallVideo };
       
   150 // </cmail>
       
   151 const TUid FsEActionMenuCreateMessageUid = { FsEActionMenuCreateMessage };
       
   152 const TUid FsEActionMenuContactDetailsUid = { FsEActionMenuContactDetails };
       
   153 const TUid FsEActionMenuAddToContactsUid = { FsEActionMenuAddToContacts };
       
   154 const TUid FsEActionMenuRemoteLookupUid = { FsEActionMenuRemoteLookup };
       
   155 const TUid FsEActionMenuMoveUid = { FsEActionMenuMove };
       
   156 const TUid FsEActionMenuUidMoveToDrafts = { FsEActionMenuMoveToDrafts };
       
   157 
       
   158 const TUid FsEActionMenuOpenInWebUid = { FsEActionMenuOpenInWeb };
       
   159 const TUid FsEActionMenuOpenInIntranetUid = { FsEActionMenuOpenInIntranet };
       
   160 const TUid FsEActionMenuBookmarkUid = { FsEActionMenuBookmark };
       
   161 const TUid FsEActionAttachmentOpenUid = { FsEActionAttachmentOpen };
       
   162 const TUid FsEActionAttachmentDownloadUid = { FsEActionAttachmentDownload };
       
   163 const TUid FsEActionAttachmentCancelDownloadUid = { FsEActionAttachmentCancelDownload };
       
   164 const TUid FsEActionAttachmentSaveUid = { FsEActionAttachmentSave };
       
   165 const TUid FsEActionAttachmentDownloadAllUid = { FsEActionAttachmentDownloadAll };
       
   166 const TUid FsEActionAttachmentCancelAllDownloadsUid = { FsEActionAttachmentCancelAllDownloads };
       
   167 const TUid FsEActionAttachmentSaveAllUid = { FsEActionAttachmentSaveAll };
       
   168 
       
   169 
       
   170 /**
       
   171  * Settings launch modes
       
   172  */
       
   173  enum TMailSettingsLaunchMode 
       
   174  	{
       
   175  	KMailSettingsOpenMainList = 0x112,
       
   176  	KMailSettingsOpenMailboxSettings,
       
   177  	KMailSettingsOpenGlobalSettings,
       
   178  	KMailSettingsOpenServiceSettings,
       
   179  	KMailSettingsReturnToPrevious,
       
   180  	KMailSettingsReturnFromPluginSettings,
       
   181  	KOpenMailSettingsFromGS,
       
   182  	KMailSettingsOpenPluginSettings
       
   183  	};
       
   184 
       
   185  	
       
   186 /**
       
   187 * editor launch modes
       
   188 */
       
   189 enum TEditorLaunchMode 
       
   190 	{
       
   191 	KEditorCmdCreateNew,
       
   192 	KEditorCmdReply,
       
   193 	KEditorCmdReplyAll,
       
   194 	KEditorCmdForward,
       
   195 	KEditorCmdOpen,
       
   196 	KEditorCmdInternalMailto,
       
   197 	KEditorCmdOpenAttachmentsList,
       
   198 	KEditorCmdReturnToPrevious
       
   199 	};
       
   200 
       
   201 /**
       
   202 * editor launch parameters
       
   203 */
       
   204 struct TEditorLaunchParams
       
   205     {
       
   206     TFSMailMsgId iMailboxId;
       
   207     TFSMailMsgId iFolderId;
       
   208     TFSMailMsgId iMsgId;
       
   209     TBool iActivatedExternally;	// ETrue makes editor close application when it exits
       
   210     TAny* iExtra;
       
   211     };
       
   212 
       
   213 /**
       
   214 * attachment file types
       
   215 */
       
   216 enum TFileType
       
   217 	{
       
   218 	EPdfType,
       
   219 	EDocType,
       
   220 	ERtfType,
       
   221 	EPptType,
       
   222 	EXlsType,
       
   223 	EImageType,
       
   224 	EHtmlType,
       
   225 	EPlainTextType,
       
   226 	EVCalType,
       
   227 	EMessageType,
       
   228 	EUnidentifiedType
       
   229 	};
       
   230 
       
   231 
       
   232 /**
       
   233 * reply/forward message creation parameters
       
   234 */
       
   235 struct TReplyForwardParams
       
   236     {
       
   237     HBufC* iHeader; // reply/forward header, ownership stays in UI
       
   238     HBufC* iSmartTag; // smart reply/forward tag, ownership stays in UI
       
   239     };
       
   240 
       
   241 /**
       
   242 * List launch parameters
       
   243 * Use iRequestRefresh = ETrue to force list refresh when using 
       
   244 * KStartListReturnToPreviousFolder parameter.
       
   245 */
       
   246 static const TUid KStartListWithFolderId = { 1 };
       
   247 static const TUid KStartListReturnToPreviousFolder = { 2 };
       
   248 
       
   249 class TMailListActivationData
       
   250 	{
       
   251 public: // constructor
       
   252 	inline TMailListActivationData()
       
   253         : iMailBoxId(), iFolderId(), iRequestRefresh(EFalse), iReturnAfterWizard(EFalse)
       
   254 	    {
       
   255 	    // no implementation needed
       
   256 	    }
       
   257 	
       
   258 public: // data	
       
   259 	TFSMailMsgId iMailBoxId;
       
   260 	TFSMailMsgId iFolderId;
       
   261 	TBool iRequestRefresh;
       
   262     TBool iReturnAfterWizard;
       
   263 	};
       
   264 
       
   265 /**
       
   266 * Viewer launch parameters
       
   267 */
       
   268 class TMsgViewerActivationData
       
   269 	{
       
   270 public: // construction
       
   271 	inline TMsgViewerActivationData() 
       
   272 	    : iMailBoxId(), 
       
   273 	      iFolderId(), 
       
   274 	      iMessageId(),
       
   275 	      iDetails( EFSMsgDataEnvelope ),
       
   276 	      iEmbeddedMessage( NULL )
       
   277 	      {}
       
   278 	
       
   279 public: // members	
       
   280 	TFSMailMsgId iMailBoxId;
       
   281 	TFSMailMsgId iFolderId;
       
   282 	TFSMailMsgId iMessageId;
       
   283 	TFSMailDetails iDetails;
       
   284     CFSMailMessage* iEmbeddedMessage;
       
   285 	};
       
   286 
       
   287 static const TUid KStartViewerWithMsgId = { 1 };
       
   288 static const TUid KStartViewerReturnToPreviousMsg = { 2 };
       
   289 static const TUid KStartViewerWithEmbeddedMsgPtr = { 3 };
       
   290 static const TUid KStartViewerReturnFromEmbeddedMsg = { 4 };
       
   291 
       
   292 
       
   293 /**
       
   294 * Search list activation parameters
       
   295 */
       
   296 static const TUid KStartNewSearch = { 1 };
       
   297 static const TUid KStartWithPreviousResults = { 2 };
       
   298 
       
   299 class TSearchListActivationData
       
   300 	{
       
   301 public: // construction
       
   302 	inline TSearchListActivationData()
       
   303 	    : iMailBoxId(), iFolderId() {}
       
   304 	
       
   305 public: // members	
       
   306 	TFSMailMsgId iMailBoxId;
       
   307 	TFSMailMsgId iFolderId;
       
   308 	};
       
   309 
       
   310 /**
       
   311 * HTML viewer activation parameters
       
   312 */
       
   313 static const TUid KHtmlViewerOpenNew          = { 1 };
       
   314 static const TUid KHtmlViewerReturnToPrevious = { 2 };
       
   315 
       
   316 class THtmlViewerActivationData
       
   317 	{
       
   318 public: // data types
       
   319     enum TActivationDataType
       
   320         {
       
   321         EFile,          // Load content from RFile
       
   322         EFileName,      // Load content from file
       
   323         EUrl,           // Load content from URL
       
   324         EMailMessage,    // Load content from mail message.
       
   325         EmbeddedEmailMessage   // Load content from embedded mail message.
       
   326                         // Only with this option embedded pictures are shown.
       
   327         };
       
   328 
       
   329 public: // methods
       
   330     // default constructor
       
   331 	inline THtmlViewerActivationData() 
       
   332 	    : iActivationDataType( EMailMessage ),
       
   333 	      iMailBoxId(),
       
   334 	      iFolderId(),
       
   335 	      iMessageId(),
       
   336 	      iFile(),
       
   337 	      iFileName( KNullDesC ),
       
   338 	      iUrl( KNullDesC ),
       
   339 	      iEmbeddedMessage( NULL ),
       
   340           iEmbeddedMessageMode( EFalse ) {}
       
   341 	
       
   342 	// substitution operator
       
   343 	inline THtmlViewerActivationData& operator=( const THtmlViewerActivationData& aAnother )
       
   344 	    {
       
   345 	    if ( this != &aAnother )
       
   346 	        {
       
   347     	    iActivationDataType = aAnother.iActivationDataType;
       
   348     	    iMailBoxId = aAnother.iMailBoxId;
       
   349     	    iFolderId = aAnother.iFolderId;
       
   350     	    iMessageId = aAnother.iMessageId;
       
   351     	    iFile = aAnother.iFile;
       
   352     	    iFileName.Set( aAnother.iFileName );
       
   353     	    iUrl.Set( aAnother.iUrl );
       
   354     	    iEmbeddedMessage = aAnother.iEmbeddedMessage;
       
   355     	    iEmbeddedMessageMode = aAnother.iEmbeddedMessageMode;
       
   356 	        }
       
   357 	    return *this;
       
   358 	    }
       
   359 	
       
   360 public: // members	
       
   361     TActivationDataType iActivationDataType;
       
   362     TFSMailMsgId iMailBoxId; // Mail box ID of the message used in activation.
       
   363     TFSMailMsgId iFolderId; // Folder ID of the message used in activation.
       
   364     TFSMailMsgId iMessageId; // Message ID of the message used in activation.
       
   365 	RFile iFile; // HTML file to be shown.
       
   366 	TPtrC iFileName; // Name of the HTML file to be shown.
       
   367 	TPtrC iUrl; // URL to be loaded.
       
   368 	TBool iEmbeddedMessageMode; // Some UI options are blocked in embedded messages.
       
   369 	CFSMailMessage* iEmbeddedMessage;
       
   370 	};
       
   371 
       
   372 /**
       
   373 * Attachment list activation parameters
       
   374 */
       
   375 class TAttachmentListActivationData
       
   376 	{
       
   377 public: // construction
       
   378 	inline TAttachmentListActivationData()
       
   379 	    : iMailBoxId(), iFolderId(), iMessageId(), iDetails(EFSMsgDataEnvelope), iEmbeddedMsgMode(EFalse) {}
       
   380 	
       
   381 public: // members	
       
   382 	TFSMailMsgId iMailBoxId;
       
   383 	TFSMailMsgId iFolderId;
       
   384 	TFSMailMsgId iMessageId;
       
   385 	TFSMailDetails iDetails;
       
   386 	TBool iEmbeddedMsgMode;
       
   387 	};
       
   388 
       
   389 /**
       
   390 * Message details view launch parameters
       
   391 */
       
   392 static const TUid KStartMsgDetailsToBeginning      = { 1 };
       
   393 static const TUid KStartMsgDetailsToTo             = { 2 };
       
   394 static const TUid KStartMsgDetailsToCc             = { 3 };
       
   395 static const TUid KStartMsgDetailsToBcc            = { 4 };
       
   396 static const TUid KStartMsgDetailsReturnToPrevious = { 5 };
       
   397 
       
   398 class TMsgDetailsActivationData
       
   399 	{
       
   400 public: // construction
       
   401 	inline TMsgDetailsActivationData()
       
   402 	    : iMailBoxId(), iFolderId(), iMessageId() {}
       
   403 
       
   404 public: // members
       
   405 	TFSMailMsgId iMailBoxId;
       
   406 	TFSMailMsgId iFolderId;
       
   407 	TFSMailMsgId iMessageId;
       
   408 	};
       
   409 
       
   410 /**
       
   411 * Folder list view launch parameters
       
   412 */
       
   413 static const TUid KFolderListSelectFolder = { 1 };
       
   414 static const TUid KFolderListCopyMessage  = { 2 };
       
   415 static const TUid KFolderListCopyMessages = { 3 };
       
   416 static const TUid KFolderListMoveMessage  = { 4 };
       
   417 static const TUid KFolderListMoveMessages = { 5 };
       
   418 
       
   419 class TFolderListActivationData
       
   420 	{
       
   421 public: // construction
       
   422 	inline TFolderListActivationData()
       
   423         : iSourceFolderType( EFSOther ), iCallback( NULL ) {}
       
   424 	
       
   425 public: // members	
       
   426 	// Type of the source folder in case of move or copy
       
   427 	TFSFolderType iSourceFolderType;
       
   428 	
       
   429 	// Call back used to inform the folder selection query result
       
   430 	MFSEmailUiFolderListCallback* iCallback;
       
   431 	};
       
   432 
       
   433 /**
       
   434 * Message part data
       
   435 */
       
   436 class TPartData
       
   437 	{
       
   438 public: // data
       
   439 	TFSMailMsgId iMailBoxId;
       
   440 	TFSMailMsgId iFolderId;
       
   441 	TFSMailMsgId iMessageId;
       
   442 	TFSMailMsgId iMessagePartId;
       
   443 	
       
   444 public: // methods
       
   445 	// default constructor initializes all IDs as NULL ID
       
   446 	inline TPartData()
       
   447 	    : iMailBoxId(), iFolderId(), iMessageId(), iMessagePartId()
       
   448 	    {
       
   449 	    }
       
   450 	
       
   451 	// construction with initial data
       
   452 	inline TPartData( TFSMailMsgId aMailBoxId, TFSMailMsgId aFolderId, 
       
   453 	           TFSMailMsgId aMessageId, TFSMailMsgId aMessagePartId )
       
   454 	    : iMailBoxId( aMailBoxId ), iFolderId( aFolderId ), 
       
   455 	      iMessageId( aMessageId ), iMessagePartId( aMessagePartId )
       
   456 	    {  
       
   457 	    }
       
   458 	
       
   459 	// construction with initial data except messagePartId
       
   460 	inline TPartData( TFSMailMsgId aMailBoxId, TFSMailMsgId aFolderId, TFSMailMsgId aMessageId )
       
   461 	    : iMailBoxId( aMailBoxId ), iFolderId( aFolderId ), 
       
   462 	      iMessageId( aMessageId ), iMessagePartId()
       
   463 	    {  
       
   464 	    }
       
   465 	
       
   466 	// equality operator
       
   467 	inline TBool operator==( const TPartData& aPart ) const 
       
   468 		{
       
   469 		return ( iMailBoxId==aPart.iMailBoxId && iFolderId==aPart.iFolderId &&
       
   470 		         iMessageId==aPart.iMessageId && iMessagePartId==aPart.iMessagePartId );
       
   471 		}
       
   472 	};
       
   473 
       
   474 /**
       
   475 * CCoeStatic derived singleton ids
       
   476 */
       
   477 const TUid KDelayedLoaderUid = { 1001 };
       
   478 
       
   479 
       
   480 /**
       
   481 * Alfred action commands
       
   482 */
       
   483 const TInt KCmdEditorAutoSave = 9901;
       
   484 
       
   485 /**
       
   486  * UID for launching wizard
       
   487  */
       
   488 const TUid KAiwCmdSettingWizardFsEmail = { 0x2000CFE9 };
       
   489 
       
   490 /**
       
   491  * UID for launching browser
       
   492  */
       
   493 static const TInt KBrowserUid = 0x10008D39;
       
   494 
       
   495 /**
       
   496  * UID for identifying Message Reader in the taskList 
       
   497  */
       
   498 static const TUid KMessageReaderUid = { 0x10201B00 };
       
   499 
       
   500 /**
       
   501  * UIDs for identifying Homescreen Modes application and its Email view
       
   502  */
       
   503 static const TUid KHsModesAppUid = { 0x20002581 };
       
   504 static const TUid KHsModesPrimaryEmailViewId = { 14 };
       
   505 
       
   506 #endif