iaupdate/IAD/engine/inc/iaupdatefwnode.h
changeset 0 ba25891c3a9e
child 77 d1838696558c
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2007-2008 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:   This file contains the header file of MIAUpdateFwNode class 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_FW_NODE_H
       
    21 #define IA_UPDATE_FW_NODE_H
       
    22 
       
    23 
       
    24 #include <e32cmn.h>
       
    25 #include "iaupdateanynode.h"
       
    26 
       
    27 
       
    28 class MIAUpdateFwNodeObserver;
       
    29 
       
    30 
       
    31 /**
       
    32  * MIAUpdateFwNode
       
    33  * Interface for firmware nodes.
       
    34  *
       
    35  * @note Implementations of MIAUpdateFwNode interface will always
       
    36  * return MIAUpdateAnyNode::ENodeTypeFw for MIAUpdateAnyNode::NodeType 
       
    37  * function call.
       
    38  *
       
    39  * @see MIAUpateAnyNode
       
    40  */
       
    41 class MIAUpdateFwNode : public MIAUpdateAnyNode
       
    42     {    
       
    43     
       
    44 public:
       
    45 
       
    46     /**
       
    47      * Enumerates the possible types of updates
       
    48      **/
       
    49     enum TFwUpdateType
       
    50         {
       
    51         
       
    52         /** 
       
    53          * FOTA DP2
       
    54          */
       
    55         EFotaDp2,
       
    56 
       
    57         /** 
       
    58          * FOTI NSU
       
    59          */
       
    60         EFotiNsu,
       
    61 
       
    62         };
       
    63 
       
    64 
       
    65     /**
       
    66      * @return TFwUpdateType The type of this firmware update.
       
    67      **/
       
    68     virtual TFwUpdateType FwType() const = 0;
       
    69 
       
    70     /**
       
    71      * @return const TDesC& Firmware update version info
       
    72      * part 1.
       
    73      */
       
    74     virtual const TDesC& FwVersion1() const = 0;
       
    75 
       
    76     /**
       
    77      * @return const TDesC& Firmware update version info
       
    78      * part 2.
       
    79      */
       
    80     virtual const TDesC& FwVersion2() const = 0;
       
    81 
       
    82     /**
       
    83      * @return const TDesC& Firmware update version info
       
    84      * part 3.
       
    85      */
       
    86     virtual const TDesC& FwVersion3() const = 0;
       
    87 
       
    88     /**
       
    89      * This function needs to be called in order to initialize
       
    90      * download related information for the object.
       
    91      *
       
    92      * @note This function may require long time to finish.
       
    93      * This function handles the purchasing of the content if required,
       
    94      * in addition to updating purchase related history information 
       
    95      * into the databases. Therefore, do not call this unless downloading 
       
    96      * is really wanted.
       
    97      *
       
    98      * @note MIAUpdateFwNodeObserver callback function is called when
       
    99      * the asynchronous operation is completed. In case of cancel, the
       
   100      * callback is not called.
       
   101      *
       
   102      * @param aObserver Observer whose callbacks are called when asynchronous
       
   103      * operation progresses.
       
   104      * @return TBool ETrue if an asynchronous operation was started.
       
   105      * EFalse, if no new operations were required.
       
   106      * @exception Leaves with KErrInUse if operation is already going on.
       
   107      * Else, leaves with system wide error code.
       
   108      *
       
   109      * @see MIAUpdateFwNode::ContentUrl
       
   110      * @see MIAUpdateFwNodeObserver::InitDownloadDataComplete
       
   111      */
       
   112     virtual TBool InitDownloadDataL( 
       
   113         MIAUpdateFwNodeObserver& aObserver ) = 0;
       
   114 
       
   115     /**
       
   116      * @note To get the correct value for this, InitDownloadDataL needs
       
   117      * to be called. If initialization is not done, an empty descriptor
       
   118      * is retured.
       
   119      *
       
   120      * @see MIAUpdateFwNode::InitDownloadDataL
       
   121      *
       
   122      * @return const TDesC& Download URL for firmware update.
       
   123      */
       
   124     virtual const TDesC& ContentUrl() const = 0;
       
   125 
       
   126 
       
   127 protected:
       
   128 
       
   129     virtual ~MIAUpdateFwNode() { }
       
   130         
       
   131     };
       
   132 
       
   133 #endif  //  IA_UPDATE_FW_NODE_H