iaupdate/IAD/engine/inc/iaupdatecontrollerobserver.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:   ?Description
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef IAUPDATECONTROLLEROBSERVER_H
       
    22 #define IAUPDATECONTROLLEROBSERVER_H
       
    23 
       
    24 
       
    25 #include <e32cmn.h>
       
    26 
       
    27 class MIAUpdateAnyNode;
       
    28 
       
    29 
       
    30 /**
       
    31  *
       
    32  */
       
    33 class MIAUpdateControllerObserver
       
    34     {
       
    35     
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Notifies observer that controller startup is completed.
       
    40      *
       
    41      * @param aError IAUpdateErrorCodes::KErrCacheCleared if the
       
    42      * database cache was cleared. In this case, the refresh is 
       
    43      * recommended to update the database. In other cases, 
       
    44      * system wide error code. 
       
    45      **/
       
    46     virtual void StartupComplete( TInt aError ) = 0;
       
    47 
       
    48 
       
    49     /**
       
    50      * Notifies observer that nodes have been loaded from the server
       
    51      * or from the local storage.
       
    52      *
       
    53      * @note aNodes does not contain nodes that are set hidden.
       
    54      * UI side should not normally use hidden nodes. But, in case
       
    55      * of dependencies, hidden nodes may be asked for special purposes.
       
    56      *
       
    57      * @param aNodes Nodes resulting from operation.
       
    58      * @param aError Error value
       
    59      **/
       
    60     virtual void RefreshComplete( 
       
    61         const RPointerArray< MIAUpdateAnyNode >& aNodes,
       
    62         TInt aError ) = 0;
       
    63 
       
    64 
       
    65     /**
       
    66      * Notifies observer that the self updater has completed its task. 
       
    67      * In normal case the application will be closed before self update completes.
       
    68      * If this function is called, then most likely something has gone wrong in the
       
    69      * self update.
       
    70      *
       
    71      * @param aErrorCode Error code of the self update operation.
       
    72      */
       
    73     virtual void SelfUpdaterComplete( TInt aErrorCode ) = 0;
       
    74 
       
    75 
       
    76     /**
       
    77      * Called when a server report has been sent.
       
    78      *
       
    79      * 
       
    80      * @param aError Error code for operation completion.
       
    81      *               KErrNone for successful completion, otherwise a system
       
    82      *               wide error code.
       
    83      *
       
    84      * @see MIAUpdateController::FinishedUpdatesL
       
    85      */
       
    86     virtual void ServerReportSent( TInt aError ) = 0;
       
    87 
       
    88     
       
    89     /**
       
    90      * Called when setup configuration is read
       
    91      *
       
    92      * 
       
    93      * @param aClientRole
       
    94      */
       
    95     virtual void ClientRole( const TDesC& aClientRole ) = 0;
       
    96 
       
    97 
       
    98 protected:
       
    99         
       
   100     virtual ~MIAUpdateControllerObserver()
       
   101         {
       
   102         }
       
   103         
       
   104     };
       
   105 
       
   106 #endif  //  IAUPDATECONTROLLEROBSERVER_H