iaupdate/IAD/engine/controller/inc/iaupdatefwnodeimpl.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 CIAUpdateFwNode class 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef IA_UPDATE_FW_NODE_IMPL_H
       
    20 #define IA_UPDATE_FW_NODE_IMPL_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "iaupdatebasenodeimpl.h"
       
    26 #include "iaupdatefwnode.h"
       
    27 #include "iaupdatecontentoperationobserver.h"
       
    28 
       
    29 class CIAUpdateContentOperation;
       
    30 
       
    31 
       
    32 /**
       
    33  *
       
    34  */
       
    35 class CIAUpdateFwNode : public CIAUpdateBaseNode, 
       
    36                         public MIAUpdateFwNode,
       
    37                         public MIAUpdateContentOperationObserver
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42     /**
       
    43      * @see CIAUpdateFwNode::CIAUpdateFwNode
       
    44      * @see CIAUpdateFwNode::ConstructL
       
    45      **/
       
    46     static CIAUpdateFwNode* NewLC( MNcdNode* aNode,
       
    47                                    CIAUpdateController& aController,
       
    48                                    MIAUpdateFwNode::TFwUpdateType aFwType );
       
    49     
       
    50     /**
       
    51      * @see CIAUpdateFwNode::NewLC
       
    52      **/
       
    53     static CIAUpdateFwNode* NewL( MNcdNode* aNode,
       
    54                                   CIAUpdateController& aController,
       
    55                                   MIAUpdateFwNode::TFwUpdateType aFwType );
       
    56     
       
    57     
       
    58     /**
       
    59      * Destructor
       
    60      **/
       
    61     virtual ~CIAUpdateFwNode();
       
    62 
       
    63 
       
    64 public: // MIAUpdateFwNode
       
    65 
       
    66     /**
       
    67      * @see MIAUpdateFwNode::Type
       
    68      **/
       
    69     virtual TFwUpdateType FwType() const;
       
    70 
       
    71     /**
       
    72      * @see MIAUpdateFwNode::Version1
       
    73      */
       
    74     virtual const TDesC& FwVersion1() const;
       
    75 
       
    76     /**
       
    77      * @see MIAUpdateFwNode::Version2
       
    78      */
       
    79     virtual const TDesC& FwVersion2() const;
       
    80 
       
    81     /**
       
    82      * @see MIAUpdateFwNode::Version3
       
    83      */
       
    84     virtual const TDesC& FwVersion3() const;
       
    85 
       
    86     /**
       
    87      * @see MIAUpdateFwNode::InitDownloadDataL
       
    88      */
       
    89     virtual TBool InitDownloadDataL( 
       
    90         MIAUpdateFwNodeObserver& aObserver );
       
    91 
       
    92     /**
       
    93      * @see MIAUpdateFwNode::ContentUrl
       
    94      */
       
    95     virtual const TDesC& ContentUrl() const;
       
    96 
       
    97     /**
       
    98      * @see MIAUpdateFwNode:::NodeType
       
    99      */
       
   100     virtual TNodeType NodeType() const;
       
   101     
       
   102     /**
       
   103      * @see MIAUpdateFwNode::Base
       
   104      */
       
   105     virtual MIAUpdateBaseNode& Base();
       
   106 
       
   107 
       
   108 public: // MIAUpdateContentOperationObserver
       
   109 
       
   110     /**
       
   111      * @see MIAUpdateContentOperationObserver::ContentOperationComplete
       
   112      */
       
   113     virtual void ContentOperationComplete( CIAUpdateBaseNode& aNode, 
       
   114                                            TInt aError );
       
   115 
       
   116     /**
       
   117      * @see MIAUpdateContentOperationObserver::ContentOperationProgress
       
   118      */
       
   119     virtual void ContentOperationProgress( CIAUpdateBaseNode& aNode, 
       
   120                                            TInt aProgress, 
       
   121                                            TInt aMaxProgress );
       
   122 
       
   123 
       
   124 private:
       
   125 
       
   126     // Prevent these if not implemented
       
   127     CIAUpdateFwNode( const CIAUpdateFwNode& aObject );
       
   128     CIAUpdateFwNode& operator =( const CIAUpdateFwNode& aObject );
       
   129 
       
   130 
       
   131     /**
       
   132      * @see CIAUpdateBaseNode::CIAUpdateBaseNode
       
   133      * @param aFwType This defines what kind of firmware update
       
   134      * this node is.
       
   135      */
       
   136     CIAUpdateFwNode( CIAUpdateController& aController,
       
   137                      MIAUpdateFwNode::TFwUpdateType aFwType );
       
   138 
       
   139     /**
       
   140      * @see CIAUpdateBaseNode::ConstructL
       
   141      */    
       
   142     void ConstructL( MNcdNode* aNode );
       
   143 
       
   144 
       
   145     // Sets the content url information to the private variable.
       
   146     // The information is gotten from the purchase history.
       
   147     void SetContentUrlL();
       
   148         
       
   149     void SetNameL( const MNcdNodeMetadata& aMetaData );
       
   150 
       
   151 
       
   152 private: // data
       
   153 
       
   154     TFwUpdateType iType;
       
   155 
       
   156     // Not owned.
       
   157     // This is set when operation that requires observation is
       
   158     // started. NULL if no operation is going on.
       
   159     MIAUpdateFwNodeObserver* iObserver; 
       
   160 
       
   161     // This operation is used to do purchasing and to
       
   162     // initialize the download related information.
       
   163     CIAUpdateContentOperation* iPurchaseOperation;
       
   164 
       
   165     // Content URL that is set when purchase operation finishes.
       
   166     HBufC* iContentUrl;
       
   167 
       
   168     // Flag to inform if operation is cancelled.
       
   169     TBool iCancelling;
       
   170 
       
   171     };
       
   172     
       
   173     
       
   174 #endif  //  IA_UPDATE_FW_NODE_IMPL_H