--- a/ipsservices/ipssosaoplugin/inc/IpsSosAOSchedulerUtils.h Tue Aug 31 15:04:17 2010 +0300
+++ b/ipsservices/ipssosaoplugin/inc/IpsSosAOSchedulerUtils.h Wed Sep 01 12:28:57 2010 +0100
@@ -17,13 +17,13 @@
*/
-#ifndef IPSSOSAOSCHEDULERUTILS_H
-#define IPSSOSAOSCHEDULERUTILS_H
+#ifndef IPSSOSAOSCHEDULERUTILS_H_
+#define IPSSOSAOSCHEDULERUTILS_H_
#include <e32base.h>
-//<Qmail>
-//</Qmail>
+class CIpsSetDataExtension;
+
enum TIpsSosAOConnectionType
{
EAOCDisconnectAfter = 0,
@@ -38,20 +38,18 @@
EAOVCDConnectionPreviousDayOnly
};
-//<Qmail>
-class CIpsSosAOSettingsHandler;
-//</Qmail>
/**
* Class CIpsSosAOSchedulerUtils
*
* calculates time to next interval according to
* mailbox's always online settings
*
+* NOTE: this class is taken from S60 Email client,
+* Some parts of this class may not be used in FSEmail
+*
* @since FSEmail 2.0
*/
-//<Qmail>
-NONSHARABLE_CLASS (CIpsSosAOSchedulerUtils) : public CBase
-//</Qmail>
+class CIpsSosAOSchedulerUtils : public CBase
{
public: // Constructors and destructor
@@ -59,16 +57,16 @@
* NewLC
* @return, Constructed object
*/
- //<Qmail>
- static CIpsSosAOSchedulerUtils* NewLC(CIpsSosAOSettingsHandler& aSettings);
- //</Qmail>
+ static CIpsSosAOSchedulerUtils* NewLC(
+ const CIpsSetDataExtension& aExtentedSettings );
+
/**
* NewL
* @return, Constructed object
*/
- //<Qmail>
- static CIpsSosAOSchedulerUtils* NewL(CIpsSosAOSettingsHandler& aSettings);
- //</Qmail>
+ static CIpsSosAOSchedulerUtils* NewL(
+ const CIpsSetDataExtension& aExtentedSettings );
+
/**
* Destructor
*/
@@ -94,16 +92,16 @@
/**
* Constructor
*/
- //<Qmail>
- CIpsSosAOSchedulerUtils(CIpsSosAOSettingsHandler& aSettings);
- //</Qmail>
+ CIpsSosAOSchedulerUtils(
+ const CIpsSetDataExtension& aExtentedSettings );
+
/**
* Symbian 2-phase constructor
*/
void ConstructL();
- //<Qmail>
+
/**
- * gets time values needed to do cheduling
+ *
*/
void PrepareScheduling(
TTime& aClock,
@@ -112,7 +110,7 @@
TTimeIntervalSeconds& aStop );
/**
- * Checks if now is an allowed time to connect
+ *
*/
TBool CanConnect(
const TTime& aClock,
@@ -121,27 +119,27 @@
TTimeIntervalSeconds& aStop );
/**
- * performs connection checks based on day
+ *
*/
TIpsSosAOValidConnectionDay GetValidConnectionDay(
const TTime& aClock );
/**
- * Gets next day
+ *
*/
TDay GetNextDay(
const TDay aToday,
const TInt aNth = 1 );
/**
- * Gets previous day
+ *
*/
TDay GetPrevDay(
const TDay aToday,
const TInt aNth = 1 );
/**
- * Checks if given time in sync window
+ *
*/
TBool IsValidTimeToConnect(
const TIpsSosAOValidConnectionDay aValidDay,
@@ -150,13 +148,13 @@
TTimeIntervalSeconds& aStop );
/**
- * Creates hometime with hours, minutes and seconds only
+ *
*/
TDateTime AdjustHomeTime(
const TTime& aClock );
/**
- * Converts time to seconds
+ *
*/
void Times2Seconds(
const TTime& aClock,
@@ -165,7 +163,7 @@
TTimeIntervalSeconds& aStop );
/**
- * Creates valid start and stop times
+ *
*/
void OrganizeStartAndStopTimes(
TTimeIntervalSeconds& aHome,
@@ -173,7 +171,7 @@
TTimeIntervalSeconds& aStop );
/**
- * How many seconds to next connection/disconnection
+ *
*/
void CalculateSecondsToNextMark(
const TIpsSosAOConnectionType aConnectionStatus,
@@ -184,7 +182,7 @@
const TTimeIntervalSeconds& aStop );
/**
- * How many seconds to next day we are allowed to connect
+ *
*/
TTimeIntervalSeconds CalcSecsToNextScheduledDay(
const TTime& aClock,
@@ -192,7 +190,7 @@
const TBool aScheduledDay );
/**
- * Sub routine for CalculateSecondsToNextMark
+ *
*/
void CalcSecsToMark(
TTimeIntervalSeconds& aSeconds,
@@ -202,17 +200,15 @@
const TBool aScheduledDay );
/**
- * Checks is given day selected to be synced
+ *
*/
TBool IsDaySelected( const TUint aDay ) const;
- //</Qmail>
+
private:
-
- //<Qmail>
- CIpsSosAOSettingsHandler& iSettings;
- //</Qmail>
+ // Reference to extended settings
+ const CIpsSetDataExtension& iExtentedSettings;
};
-#endif /*IPSSOSAOSCHEDULERUTILS_H*/
+#endif /*IPSSOSAOSCHEDULERUTILS_H_*/