ipsservices/ipssosaoplugin/inc/IpsSosAOMboxLogic.h
branchRCL_3
changeset 25 3533d4323edc
parent 24 d189ee25cf9d
equal deleted inserted replaced
24:d189ee25cf9d 25:3533d4323edc
    13 *
    13 *
    14 * Description: 
    14 * Description: 
    15 *     Contains mailbox specified always online logic
    15 *     Contains mailbox specified always online logic
    16 *
    16 *
    17 */
    17 */
    18 //<Qmail>
    18 
    19 #ifndef IPSSOSAOMBOXLOGIC_H
    19 #ifndef IPSSOSAOMBOXLOGIC_CPP_
    20 #define IPSSOSAOMBOXLOGIC_H
    20 #define IPSSOSAOMBOXLOGIC_CPP_
    21 //</Qmail>
    21 
    22 #include <e32base.h> 
    22 #include <e32base.h> 
    23 #include <msvapi.h>
    23 #include <msvapi.h>
    24 
    24 
       
    25 //<cmail> removing internal dependency
       
    26 /*#ifdef _DEBUG
       
    27 #include "../../internal/IpsSosAOPluginTester/inc/IpsSosAOPluginTester.hrh"
       
    28 #endif // _DEBUG*/
       
    29 //</cmail>
    25 
    30 
    26 #include "IpsSosAOBaseAgent.h"
    31 #include "IpsSosAOBaseAgent.h"
    27 //<QMail>
    32 #include "ipssetdataextension.h"
    28 
       
    29 //</QMail>
       
    30 #include "IpsSosAOPluginTimer.h"
    33 #include "IpsSosAOPluginTimer.h"
    31 
    34 //<cmail>
    32 //<QMail>
    35 //</cmail>
    33 
    36 
    34 //</QMail>
    37 class CIpsSetDataApi;
    35 class CIpsSosAOBaseAgent;
    38 class CIpsSosAOBaseAgent;
    36 //<QMail>
    39 class CIpsSetDataExtension;
    37 
       
    38 //</QMail>
       
    39 class CIpsSosAOImapPopLogic;
    40 class CIpsSosAOImapPopLogic;
    40 
    41 
    41 /**
    42 /**
    42 * class CIpsSosAOImapPopLogic;
    43 * class CIpsSosAOImapPopLogic;
    43 *
    44 *
    44 */
    45 */
    45 //<Qmail>
    46 class CIpsSosAOMBoxLogic : 
    46 NONSHARABLE_CLASS (CIpsSosAOMBoxLogic) : 
       
    47 //</Qmail>
       
    48     public CBase, 
    47     public CBase, 
    49     public MIpsSosAOPluginTimerCallBack,
    48                            public MIpsSosAOPluginTimerCallBack,
    50     public MIpsSosAOAgentOperationResponse
    49                            public MIpsSosAOAgentOperationResponse
    51     {
    50     {
    52 
    51 
    53 public:
    52 public:
    54     
    53     
    55     /**
    54     /**
   181     /*
   180     /*
   182      * Sets new value to emn received but no synced flag in
   181      * Sets new value to emn received but no synced flag in
   183      * mailbox settings
   182      * mailbox settings
   184      * @param aNewValue new value of flag
   183      * @param aNewValue new value of flag
   185      */
   184      */
       
   185      //<cmail>
   186     void SetEmnReceivedFlagL( TBool aNewValue );
   186     void SetEmnReceivedFlagL( TBool aNewValue );
       
   187     //</cmail>
   187     
   188     
   188     /*
   189     /*
   189      * Gets mailbox roaming stopped status
   190      * Gets mailbox roaming stopped status
   190      * @return ETrue if roaming and mailbox logic is stopped during roaming
   191      * @return ETrue if roaming and mailbox logic is stopped during roaming
   191      */
   192      */
       
   193      //<cmail>
   192     TBool IsMailboxRoamingStoppedL();
   194     TBool IsMailboxRoamingStoppedL();
   193     
   195     //</cmail>
       
   196 
   194 	/**
   197 	/**
   195      * Has mailbox ever received and OMA EMN
   198      * Has mailbox ever received and OMA EMN
   196      */
   199      */
   197     TBool FirstEMNReceived();
   200     TBool FirstEMNReceived();
   198     
   201     
   254     TInt HandleOperationCompletionL();
   257     TInt HandleOperationCompletionL();
   255     
   258     
   256     /*
   259     /*
   257      * checks is operation completion error fatal and should timed sync swithc off
   260      * checks is operation completion error fatal and should timed sync swithc off
   258      */
   261      */
       
   262      //<cmail>
   259     TBool IsErrorFatalL( TInt aError );
   263     TBool IsErrorFatalL( TInt aError );
       
   264     //</cmail>
   260     
   265     
   261     /*
   266     /*
   262      * Suspends ongoing sync (or fetch) and swiths logic to suspend state
   267      * Suspends ongoing sync (or fetch) and swiths logic to suspend state
   263      */
   268      */
   264     void SuspendOperations();
   269     void SuspendOperations();
   292     /*
   297     /*
   293      * checks from settings is connect allowed in roaming state
   298      * checks from settings is connect allowed in roaming state
   294      */
   299      */
   295     TBool CanConnectIfRoamingL();
   300     TBool CanConnectIfRoamingL();
   296 
   301 
       
   302 // <cmail> removing flags    
       
   303 /*#ifdef IPSSOSIMAPPOLOGGING_ON
       
   304     void WriteDebugData( TInt aEvent );
       
   305 #endif*/
       
   306 //</cmail>
   297     
   307     
   298 private:
   308 private:
   299     
   309     
   300     CMsvSession&                    iSession;
   310     CMsvSession&                    iSession;
   301     TMsvId                          iMailboxId;
   311     TMsvId                          iMailboxId;
   302     TMBoxLogicState                 iState;
   312     TMBoxLogicState                 iState;
   303     TInt                            iErrorCounter;
   313     TInt                            iErrorCounter;
   304     TInt                            iError;
   314     TInt                            iError;
   305 	//<Qmail>
   315     CIpsSosAOPluginTimer*           iTimer;
   306     CIpsSosAOPluginTimer*           iTimer;//owned
       
   307     // message fetch is not currently used
   316     // message fetch is not currently used
   308     RArray<TMsvId>                  iFetchMsgArray;//owned
   317     RArray<TMsvId>                  iFetchMsgArray;
   309 	//<QMail>
   318     CIpsSetDataApi*                 iDataApi;
   310 
   319     CIpsSosAOBaseAgent*             iAgent;
   311 	//</QMail>
   320     CIpsSetDataExtension*           iExtendedSettings;
   312     CIpsSosAOBaseAgent*             iAgent;//owned
       
   313 	//</Qmail>
       
   314 	//<QMail>
       
   315 
       
   316 	//</QMail>
       
   317     TBool                           iIsRoaming;
   321     TBool                           iIsRoaming;
   318     };
   322     };
   319 
   323 
   320 #endif /*IPSSOSAOMBOXLOGIC_H*/
   324 #endif /*IPSSOSAOMBOXLOGIC_CPP_*/