iaupdate/IAD/engine/controller/inc/iaupdatedownloadoperation.h
changeset 0 ba25891c3a9e
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:   CIAUpdateDownloadOperation 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_DOWNLOAD_OPERATION_H
       
    21 #define IA_UPDATE_DOWNLOAD_OPERATION_H
       
    22 
       
    23 
       
    24 #include <ncddownloadoperationobserver.h>
       
    25 
       
    26 #include "iaupdatenormalcontentoperation.h"
       
    27 
       
    28 class CIAUpdateNode;
       
    29 
       
    30 
       
    31 /**
       
    32  * CIAUpdateDownloadOperation handles downloading of node content.
       
    33  */
       
    34 class CIAUpdateDownloadOperation : public CIAUpdateNormalContentOperation,
       
    35                                    public MNcdDownloadOperationObserver
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41      * @see CIAUpdateDownloadOperation::CIAUpdateDownloadOperation
       
    42      * @return CIAUpdateDownloadOperation* Created object.
       
    43      * Ownership is transferred.
       
    44      */
       
    45     static CIAUpdateDownloadOperation* NewL(
       
    46         CIAUpdateNode& aNode,
       
    47         MIAUpdateContentOperationObserver& aObserver );
       
    48     
       
    49     /**
       
    50      * @see CIAUpdateDownloadOperation::NewL
       
    51      */ 
       
    52     static CIAUpdateDownloadOperation* NewLC(
       
    53         CIAUpdateNode& aNode,
       
    54         MIAUpdateContentOperationObserver& aObserver );
       
    55 
       
    56     /**
       
    57      * Destructor
       
    58      */
       
    59     virtual ~CIAUpdateDownloadOperation();
       
    60 
       
    61 
       
    62 public: // MNcdDownloadOperationObserver
       
    63     
       
    64     /**
       
    65      * @see MNcdDownloadOperationObserver::DownloadProgress    
       
    66      */
       
    67     virtual void DownloadProgress( 
       
    68         MNcdDownloadOperation& aOperation, TNcdProgress aProgress );
       
    69         
       
    70     /**
       
    71      * @see MNcdDownloadOperationObserver::QueryReceived
       
    72      */
       
    73     virtual void QueryReceived( 
       
    74         MNcdDownloadOperation& aOperation, MNcdQuery* aQuery );
       
    75 
       
    76     /**
       
    77      * @see MNcdDownloadOperationObserver::OperationComplete
       
    78      */
       
    79     virtual void OperationComplete( 
       
    80         MNcdDownloadOperation& aOperation, TInt aError );    
       
    81     
       
    82     
       
    83 protected: // CIAUpdateNormalContentOperation
       
    84 
       
    85     /**
       
    86      * @see CIAUpdateContentOperation::HandleContentL
       
    87      */ 
       
    88     virtual MNcdOperation* HandleContentL();
       
    89     
       
    90 
       
    91 private:
       
    92     
       
    93     // Prevent these if not implemented
       
    94     CIAUpdateDownloadOperation( const CIAUpdateDownloadOperation& aObject );
       
    95     CIAUpdateDownloadOperation& operator =( const CIAUpdateDownloadOperation& aObject );
       
    96 
       
    97 
       
    98     /**
       
    99      * @see CIAUpdateNormalContentOperation::CIAUpdateNormalContentOperation
       
   100      */
       
   101     CIAUpdateDownloadOperation(
       
   102         CIAUpdateNode& aNode,
       
   103         MIAUpdateContentOperationObserver& aObserver );
       
   104 
       
   105     /**
       
   106      * ConstructL
       
   107      */
       
   108     void ConstructL();
       
   109 
       
   110 
       
   111     /** 
       
   112      * Starts the download operation for given node.
       
   113      *
       
   114      * @return MNcdOperation* Operation that is started.
       
   115      */
       
   116     MNcdOperation* DownloadL();
       
   117 
       
   118     
       
   119 private: // data
       
   120 
       
   121     };
       
   122 
       
   123 #endif // IA_UPDATE_DOWNLOAD_OPERATION_H
       
   124