emailservices/emailserver/cmailhandlerplugin/inc/cmailcpshandler.h
branchRCL_3
changeset 10 f5907b1a1053
parent 8 e1b6206813b4
child 13 8592a65ad3fb
equal deleted inserted replaced
8:e1b6206813b4 10:f5907b1a1053
    76      *
    76      *
    77      */
    77      */
    78     void UpdateMailboxesL(TInt aInstance, const TDesC& aContentId);
    78     void UpdateMailboxesL(TInt aInstance, const TDesC& aContentId);
    79 
    79 
    80     /**
    80     /**
    81      * Updates external (3rd party) account based on contentId
       
    82      * @param aContentId specifies the widget and account related to it
       
    83      */
       
    84     void UpdateExtAccountL( const TDesC& aContentId );
       
    85 
       
    86     /**
       
    87      *
    81      *
    88      */
    82      */
    89     void LaunchWidgetSettingsL( const TDesC& aContentId );
    83     void LaunchWidgetSettingsL( const TDesC& aContentId );
    90 
    84 
    91     /**
    85     /**
    94     void LaunchEmailUIL( const TDesC& aContentId );
    88     void LaunchEmailUIL( const TDesC& aContentId );
    95 
    89 
    96     /**
    90     /**
    97      *
    91      *
    98      */    
    92      */    
    99     void LaunchEmailWizardL();
    93     void LaunchEmailWizardL( const TDesC& aContentId );
   100     /**
    94     /**
   101      * Launches an application based on the given contentId
    95      * Launches an application based on the given contentId
   102      * This method is for external (3rd party) accounts
    96      * This method is for external (3rd party) accounts
   103      * @param aContentId specifies the widget that was pressed by the user
    97      * @param aContentId specifies the widget that was pressed by the user
   104      */
    98      */
   105     void LaunchExtAppL( const TDesC& aContentId );
    99     void LaunchExtAppL( const TDesC& aContentId );
   106 
   100 
   107     /**
   101     /**
   108      *
   102      *
   109      */	
       
   110     TBool AssociateWidgetToSetting( const TDesC& aContentId );
       
   111 	
       
   112     /**
       
   113      *
       
   114      */		
   103      */		
   115     void DissociateWidgetFromSettingL( const TDesC& aContentId );    
   104     void DissociateWidgetFromSettingL( const TDesC& aContentId );    
   116 
   105 
   117     /**
   106     /**
   118      * Return total number of mailboxes (native+3rd party) in the system
   107      * Return total number of mailboxes (native+3rd party) in the system
   126 
   115 
   127     /**
   116     /**
   128      * Return total number of 3rd party mailboxes in the system
   117      * Return total number of 3rd party mailboxes in the system
   129      */
   118      */
   130     TInt TotalExtMailboxCountL();
   119     TInt TotalExtMailboxCountL();
   131 
       
   132     /**
       
   133      *
       
   134      */    
       
   135     void ManualAccountSelectionL( const TDesC& aContentId );
       
   136     
   120     
   137 	/**
   121 	/**
   138      * Gets correct localised format for time (or date) string
   122      * Gets correct localised format for time (or date) string
   139      */ 
   123      */ 
   140     static HBufC* GetMessageTimeStringL( TTime aMessageTime );
   124     static HBufC* GetMessageTimeStringL( TTime aMessageTime );
   141 
   125 
   142     // From MEmailObserverListener
   126     // From MEmailObserverListener
   143     void EmailObserverEvent( EmailInterface::MEmailData& aData );
   127     void EmailObserverEvent( EmailInterface::MEmailData& aData );
       
   128 
       
   129     /**
       
   130      *
       
   131      */
       
   132     void SetWaitingForNewMailbox( const TDesC& aContentId );
       
   133     
       
   134     /**
       
   135      *
       
   136      */    
       
   137     void CleanWaitingForNewMailbox();
   144 
   138 
   145 protected:
   139 protected:
   146     /**
   140     /**
   147      * From CFSNotificationHandlerBase
   141      * From CFSNotificationHandlerBase
   148      * see baseclass for details
   142      * see baseclass for details
   226      */
   220      */
   227 	void UpdateEmptyMessagesL( const TInt aWidgetInstance,
   221 	void UpdateEmptyMessagesL( const TInt aWidgetInstance,
   228 	                           const TInt aFirstRow );
   222 	                           const TInt aFirstRow );
   229 
   223 
   230     /**
   224     /**
   231      * Handles publishing of connection state icon
       
   232      */
       
   233     void UpdateConnectStateL( const TInt aMailBoxNumber, const TInt aRowNumber );       
       
   234 
       
   235     /**
       
   236      * Handles publishing of mailbox icon
   225      * Handles publishing of mailbox icon
   237      */
   226      */
   238     void UpdateMailBoxIconL( const TInt aMailBoxNumber,
   227     void UpdateMailBoxIconL( const TInt aMailBoxNumber,
   239                              const TInt aWidgetInstance,
   228                              const TInt aWidgetInstance,
   240                              const TInt aRowNumber );
   229                              const TInt aRowNumber );
   243      * Handles publishing of unseen icon
   232      * Handles publishing of unseen icon
   244      */    
   233      */    
   245     void UpdateIndicatorIconL( const TInt aMailBoxNumber, 
   234     void UpdateIndicatorIconL( const TInt aMailBoxNumber, 
   246                                const TInt aWidgetInstance,
   235                                const TInt aWidgetInstance,
   247                                const TInt aRowNumber );
   236                                const TInt aRowNumber );
   248     
       
   249     /**
       
   250      * Handles publishing of empty message time string
       
   251      */
       
   252 // void ClearMessageTimeL( const TInt aRowNumber );
       
   253 
   237 
   254     // Event handling subroutines
   238     // Event handling subroutines
   255     /**
   239     /**
   256      * handles new mailbox event
   240      * handles new mailbox event
   257      * @param aMailbox mailbox id
   241      * @param aMailbox mailbox id
   284      * @param aParam1 contains event specific parameters
   268      * @param aParam1 contains event specific parameters
   285      * @param aParam2 contains event specific parameters
   269      * @param aParam2 contains event specific parameters
   286      */
   270      */
   287     void HandleMailDeletedEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
   271     void HandleMailDeletedEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
   288 
   272 
   289     /**
       
   290      * handles mail changed event
       
   291      * @param aMailbox mailbox id
       
   292      * @param aParam1 contains event specific parameters
       
   293      * @param aParam2 contains event specific parameters
       
   294      */
       
   295     void HandleMailChangedEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
       
   296 
       
   297     /**
       
   298      * handles new folder event
       
   299      * @param aMailbox mailbox id
       
   300      * @param aParam1 contains event specific parameters
       
   301      * @param aParam2 contains event specific parameters
       
   302      */
       
   303     void HandleNewFolderEventL( TFSMailMsgId aMailbox, TAny* aParam1, TAny* aParam2 );
       
   304 	
       
   305     /**
   273     /**
   306      * get count of unread messages in inbox
   274      * get count of unread messages in inbox
   307      * @param aMailbox mailbox id
   275      * @param aMailbox mailbox id
   308      */    
   276      */    
   309     TInt GetUnreadCountL( TFSMailMsgId aMailbox);
   277     TInt GetUnreadCountL( TFSMailMsgId aMailbox);
   364 
   332 
   365     /**
   333     /**
   366      *
   334      *
   367      */     
   335      */     
   368     void PublishMessageL( TInt aWidgetInstance, CFSMailMessage& aMessage,
   336     void PublishMessageL( TInt aWidgetInstance, CFSMailMessage& aMessage,
   369                            const TDesC& aSenderName, const TDesC& aTime, TInt aFirstRow);
   337                           const TDesC& aSenderName,
       
   338                           const TDesC& aSubject,
       
   339                           const TDesC& aTime, TInt aFirstRow);
   370    
   340    
   371     /**
   341     /**
   372      * Checks if the given message is already know/published
   342      * Checks if the given message is already know/published
   373      * @param aMailbox specifies the mailboxdetails object where duplicate is searched from
   343      * @param aMailbox specifies the mailboxdetails object where duplicate is searched from
   374      * @param aMsgId Id of the new message
   344      * @param aMsgId Id of the new message
   400      * Plugin proxies also update the widget data.
   370      * Plugin proxies also update the widget data.
   401      * @param aAccounts up-to-date list of external (3rd party) email accounts
   371      * @param aAccounts up-to-date list of external (3rd party) email accounts
   402      *        that are specified in settings
   372      *        that are specified in settings
   403      */
   373      */
   404     void SelectAndUpdateExtAccountsL( RPointerArray<CMailExternalAccount>& aAccounts );
   374     void SelectAndUpdateExtAccountsL( RPointerArray<CMailExternalAccount>& aAccounts );
   405     
       
   406     TBool FirstBootL();
       
   407     
   375     
   408     /**
   376     /**
   409      * Checks whether aAccounts array has entries relating to plugin with id aPluginId
   377      * Checks whether aAccounts array has entries relating to plugin with id aPluginId
   410      * @param aPluginId 3rd party plugin identifier (implementation uid)
   378      * @param aPluginId 3rd party plugin identifier (implementation uid)
   411      * @param aAccounts array of 3rd party email account information
   379      * @param aAccounts array of 3rd party email account information
   436     // pointer to settings class that handles settings loading and observing logic
   404     // pointer to settings class that handles settings loading and observing logic
   437     CMailCpsSettings*                  iSettings;
   405     CMailCpsSettings*                  iSettings;
   438     // local cache of mailbox details
   406     // local cache of mailbox details
   439     RPointerArray<CMailMailboxDetails> iAccountsArray;
   407     RPointerArray<CMailMailboxDetails> iAccountsArray;
   440     // array of plugin proxies. One plugin proxy handles one 3rd party plugin and its accounts
   408     // array of plugin proxies. One plugin proxy handles one 3rd party plugin and its accounts
   441     RPointerArray<CMailPluginProxy> iExternalPlugins;
   409     RPointerArray<CMailPluginProxy>    iExternalPlugins;
       
   410     // tells if email wizard is started from widget and it is still running
       
   411     // and to which widget next added account is added.
       
   412     HBufC*                             iWaitingForNewMailbox;
   442     };
   413     };
   443 
   414 
   444 #endif  //__CMAILCPSHANDLER_H__
   415 #endif  //__CMAILCPSHANDLER_H__