--- a/iaupdate/IAD/api/client/inc/iaupdatemanager.h Thu Aug 19 10:02:49 2010 +0300
+++ b/iaupdate/IAD/api/client/inc/iaupdatemanager.h Tue Aug 31 15:21:33 2010 +0300
@@ -15,8 +15,6 @@
*
*/
-
-
#ifndef IA_UPDATE_MANAGER_H
#define IA_UPDATE_MANAGER_H
@@ -26,9 +24,8 @@
#include <e32std.h>
#include <coemain.h>
-#include "iaupdateclient.h"
-
//FORWARD DECLARATIONS
+class IAUpdateClient;
class CIAUpdateParameters;
class MIAUpdateObserver;
class CEikonEnv;
@@ -49,189 +46,34 @@
*
* @since S60 v3.2
*/
-NONSHARABLE_CLASS( CIAUpdateManager ) : public CActive, public MCoeForegroundObserver
+NONSHARABLE_CLASS( CIAUpdateManager ) : public CBase, public MCoeForegroundObserver
{
public:
- /**
- * These values inform what operation has been requested.
- *
- * @since S60 v3.2
- */
- enum TIAUpdateType
- {
- /**
- * No operation is going on.
- */
- EIAUpdateIdle,
- /**
- * SWUpdate app start requested.
- */
-
- EIAUpdateStartServer,
-
- /**
- * Update check has been requested.
- */
- EIAUpdateCheck,
-
- /**
- * Update operation has been requested.
- */
- EIAUpdateUpdate,
-
- /**
- * Update query has been requested.
- */
- EIAUpdateQuery
- };
-
-
- /**
- * @param aObserver Callback functions of the observer are called
- * when operations progress.
- * @return CIAUpdateManager* Pointer to the created CIAUpdateManager
- * object that can be used for update actions.
- *
- * @since S60 v3.2
- */
static CIAUpdateManager* NewL( MIAUpdateObserver& aObserver );
- /**
- * @see NewL
- *
- * @since S60 v3.2
- */
static CIAUpdateManager* NewLC( MIAUpdateObserver& aObserver );
- /**
- * Destructor
- *
- * @since S60 v3.2
- */
- virtual ~CIAUpdateManager();
-
- /**
- * @see CIAUpdate::CheckUpdates
- *
- * @since S60 v3.2
- */
+ ~CIAUpdateManager();
+
void CheckUpdates( const CIAUpdateParameters& aUpdateParameters );
-
-
- /**
- * @see CIAUpdate::ShowUpdates
- *
- * @since S60 v3.2
- */
+
void ShowUpdates( const CIAUpdateParameters& aUpdateParameters );
-
-
- /**
- * @see CIAUpdate::Update
- *
- * @since S60 v3.2
- */
- void Update( const CIAUpdateParameters& aUpdateParameters );
-
- /**
- * @see CIAUpdate::UpdateQuery
- *
- * @since S60 v3.2
- */
+
void UpdateQuery();
-
-
-protected: // CActive
-
- /**
- * @see CActive::DoCancel
- *
- * @since S60 v3.2
- */
- virtual void DoCancel();
-
- /**
- * When the server side has finished operation, the CActive object will
- * be informed about it, and as a result RunL will be called. This function
- * well inform the observer that the operation has been completed.
- * @see CActive::RunL
- *
- * @since S60 v3.2
- */
- virtual void RunL();
-
-
-protected:
-
- /**
- * @see NewL
- *
- * @since S60 v3.2
- */
- CIAUpdateManager( MIAUpdateObserver& aObserver );
- /**
- * @see NewL
- *
- * @since S60 v3.2
- */
- virtual void ConstructL();
-
-
- /**
- * Resets all the result variables to their default values.
- *
- * @since S60 v3.2
- */
- virtual void ResetResults();
-
-
- /**
- * @return ETrue if an operation is going on. Else EFalse.
- *
- * @since S60 v3.2
- */
- TBool BusyCheck() const;
-
-
- /**
- * @return RIAUpdateClient& Handles the client server communication.
- *
- * @since S60 v3.2
- */
- RIAUpdateClient& UpdateClient();
-
-
- /**
- * @return MUpdateObserver& Observer who will be informed about the
- * completion of the operations.
- *
- * @since S60 v3.2
- */
- MIAUpdateObserver& Observer() const;
-
-
- /**
- * @return TIAUpdateType Informs what kind of operation is going on.
- *
- * @since S60 v3.2
- */
- TIAUpdateType UpdateType() const;
-
- /**
- * @param aUpdateType Informs what kind of operation is going on.
- *
- * @since S60 v3.2
- */
- void SetUpdateType( TIAUpdateType aUpdateType );
+ void Update( const CIAUpdateParameters& aUpdateParameters );
private:
+ CIAUpdateManager();
+
+ void ConstructL( MIAUpdateObserver& aObserver );
+
// Prevent these if not implemented
CIAUpdateManager( const CIAUpdateManager& aObject );
CIAUpdateManager& operator =( const CIAUpdateManager& aObject );
@@ -247,39 +89,14 @@
* Handles the application going into the background.
*/
void HandleLosingForeground();
-
-private:// new functions
-
- void CheckUpdatesContinue();
-
- void CopyUpdateParamsL( const CIAUpdateParameters& aUpdateParameters );
+
private: // data
-
- CIAUpdateParameters* iUpdateParameters;
-
- // Observer who will be informed about the completion of the operations.
- MIAUpdateObserver& iObserver;
-
+
// Handles the client server communication.
- RIAUpdateClient iUpdateClient;
-
- // Informs what kind of operation is going on.
- TIAUpdateType iUpdateType;
+ IAUpdateClient* iUpdateClient;
- // This is used to storage the success count values for update operations.
- TInt iSuccessCount;
-
- // This is used to storage the fail count values for update operations.
- TInt iFailCount;
-
- // This is used to storage the cancel count values for update operations.
- TInt iCancelCount;
-
- TBool iUpdateNow;
-
CEikonEnv* iEikEnv; //not owned
-
};
#endif // IA_UPDATE_IMPL_H