ipsservices/ipssosplugin/inc/ipsplgeventhandler.h
branchRCL_3
changeset 24 d189ee25cf9d
parent 8 e1b6206813b4
child 25 3533d4323edc
--- a/ipsservices/ipssosplugin/inc/ipsplgeventhandler.h	Thu Aug 19 09:38:05 2010 +0300
+++ b/ipsservices/ipssosplugin/inc/ipsplgeventhandler.h	Tue Aug 31 15:04:17 2010 +0300
@@ -29,7 +29,7 @@
 class CRepository;
 class CIpsPlgSettingsObserver;
 class CIpsPlgSyncStateObserver;
-class CIpsSetDataApi;
+// <qmail> CIpsSetDataApi removed
 /**
 * MIpsPlgPropertyObserver
 *
@@ -63,7 +63,7 @@
 /**
 * Helper class to keep track of accounts
 */
-class CIPSAccountInfo : public CBase
+NONSHARABLE_CLASS ( CIPSAccountInfo ) : public CBase
     {
 public:
 
@@ -88,16 +88,16 @@
  *  @lib ipssosplugin.lib
  *  @since
  */
-class CIpsPlgEventHandler : public CBase,
+NONSHARABLE_CLASS ( CIpsPlgEventHandler ) : public CBase,
                             public MMsvSessionObserver,
                             public MIpsPlgSettingsObserverCallback,
-                            public MIpsPlgPropertyObserver,
-                            public MFSMailExceptionEventCallback
+                            public MIpsPlgPropertyObserver
+// <qmail> not needed       public MFSMailExceptionEventCallback
     {
-
-public://from MFSMailExceptionEventCallback
-
-    void ExceptionEventCallbackL( TFSMailMsgId aMailboxId, TInt aEventType, TBool aResponse );
+//public://from MFSMailExceptionEventCallback
+//
+//    void ExceptionEventCallbackL( TFSMailMsgId aMailboxId, TInt aEventType, TBool aResponse );
+// </qmail>
 
 public: //from MIpsPlgPropertyObserver
     void HandlePropertyEventL(
@@ -180,9 +180,8 @@
      * Adds property observer, p&s (property) events are signaled to these
      * observers
      * @param aObservers interface to observer object
-     * @return error code from RProperty::Define function
      */
-    TInt RegisterPropertyObserverL( MIpsPlgPropertyObserver* aObserver );
+    void RegisterPropertyObserverL( MIpsPlgPropertyObserver* aObserver );
 
     /**
      * Removes property observer
@@ -197,55 +196,13 @@
      */
     void NotifyPropertyEventL( TIpsPlgPropertyEvent aEvent );
 
-    /**
-     * used to inform ui offline state if connection attempt
-     * was not successfull
-     * @param aAccount FS mailbox id
-     */
-    void SignalMailboxOfflineStateL( const TFSMailMsgId& aAccount );
-
-    /**
-     * Send user password query request to fs email ui.
-     * Request is handled by emailserver.
-     * Only one query at a time is allowed - restriction of CFSMailMessageQueryHandler
-     * Operation callback is registered in handler and will receive notification
-     * on query password finished.
-     * 
-     * @param aMbox entry id of mailbox service
-     * @param aCallback callback interface to connection operation, defaut NULL
-     * @param aIncoming incoming or outgoing password query
-     * @return ETrue query invoked, wait for notification
-     *         EFalse another query is in progress
-     */
-    TBool QueryUsrPassL(
-        TMsvId aMbox,
-        MIpsPlgConnectOpCallback* aCallback=NULL,
-        TBool aIncoming=ETrue );
-
-    /**
-     * Query in progress is for incoming or outgoing mail.
-     */
-    TBool IncomingPass() const;
-
-    /**
-     * Send user password (=credentials) set signal to all plugin
-     * instances via p&s (property) mechanism
-     * @param aMailboxId entry id of mailbox
-     * @param aCancelled indicates is user cancelled password dialog
-     */
-    void SignalCredientialsSetL( TInt aMailboxId, TBool aCancelled );
-
+// <qmail> removing unused functions
+    //    void SignalMailboxOfflineStateL( const TFSMailMsgId& aAccount );
+    //    void QueryUsrPassL( TMsvId aMbox, MIpsPlgConnectOpCallback* aCallback=NULL );
+    //    void SignalCredientialsSetL( TInt aMailboxId, TBool aCancelled );
+// </qmail>
 private:
-
-    /** States of Query user password operation */
-    enum TQueryUsrPassState
-        {
-        EReady,                 // ready for action
-        EBusy,                  // request in progress (invoker eventhandler`s state)
-        ENotificationRequest,   // user notification request (emailserver eventhandler`s state)
-        EPasswordRequest,       // password request (emailserver eventhandler`s state)
-        ERequestResponding      // response for request received, handling in progress (invoker eventhandler`s state)
-        };
+// <qmail> removed enum TQueryUsrPassState
 
     /**
     * Checks the source type of event and also
@@ -387,11 +344,8 @@
         TFSMailMsgId& aFSParent,
         RArray<TFSMailMsgId>& aFSDeletedArray );
 
-
-    /**
-    * Saves last signalled sync status to settings
-    */
-    void SaveSyncStatusL( TMsvId aMailboxId, TInt aState );
+    // <qmail> does nothing; removing
+    //    void SaveSyncStatusL( TMsvId aMailboxId, TInt aState );
 
     /**
     * Appends folder id to array if not already in there
@@ -434,13 +388,21 @@
     /**
     * Fills RArray FSMessage objects created from CMsvEntrySelection
     */
-    inline void FillFSMessageArray(
+    inline void FillFSMessageArrayL(
             RArray<TFSMailMsgId>& aFSArray,
             const CMsvEntrySelection* aSelection,
             TUint aMtmUid );
 
+// <qmail> new function
+    /**
+     * Convert sync operation completion code to email framework's syncState
+     * @param aStatus
+     * @return syncstate
+     */
+    TSSMailSyncState ConvertCompletionCode( TInt aCompletionCode );
+// </qmail>
+    
     CRepository*                            iCenRep;
-    CIpsSetDataApi*                         iSettingsApi;
 
     // not owned
     CMsvSession*                            iSession;
@@ -471,14 +433,8 @@
 
     RArray<TMsvId>                          iImapFolderIds;
 
-    // state of the query user password operation
-    // diffrent states are for query invoker and query handler (emailserver)
-    TQueryUsrPassState                      iQueryPassState;
-    // array of operations which wait for query response
-    // or possibilty to perform a query
-    RPointerArray<MIpsPlgConnectOpCallback> iConnOpCallbacks;
-    // query user password for incoming or outgoing
-    TBool                                   iIncomingPass;
+// <qmail> MIpsPlgConnectOpCallback not used any more
+// <qmail> iQueryPassState, iConnOpCallbacks, iIncomingPass removed
     };