ncdengine/inc/ncdnodedownload.h
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Contains MNcdNodeDownload interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCD_NODE_DOWNLOAD_H
       
    20 #define M_NCD_NODE_DOWNLOAD_H
       
    21 
       
    22 
       
    23 #include "catalogsbase.h"
       
    24 #include "ncdinterfaceids.h"
       
    25 
       
    26 
       
    27 class MNcdDownloadOperation;
       
    28 class MNcdDownloadOperationObserver;
       
    29 
       
    30 /**
       
    31  *  Provides functions for the node that may contains content that can be downloaded.
       
    32  *  Downloading of the content may be done directly. But often,
       
    33  *  purchase interface functions should be used first to finnish
       
    34  *  purcahse operations before downloading the node content.
       
    35  *  After downloading, the installation interface functions may be
       
    36  *  called to install the files that have been downloaded.
       
    37  *
       
    38  *  @see MNcdNodePurchase
       
    39  *  @see MNcdNodeInstall
       
    40  *
       
    41  *  
       
    42  */
       
    43 class MNcdNodeDownload : public virtual MCatalogsBase
       
    44     {
       
    45     
       
    46 public:
       
    47 
       
    48     /**
       
    49      * Unique identifier for the interface, required for all MCatalogsBase interfaces.
       
    50      *
       
    51      * 
       
    52      */
       
    53     enum { KInterfaceUid = ENcdNodeDownloadUid };
       
    54 
       
    55 
       
    56     /**
       
    57      * Determines if the node content has already been downloaded.
       
    58      *
       
    59      * 
       
    60      * @return ETrue if the node content has been downloade, EFalse otherwise.
       
    61      * @exception Leave System wide error code.
       
    62      */
       
    63     virtual TBool IsDownloadedL() const = 0;
       
    64 
       
    65 
       
    66     /**
       
    67      * Starts the download operation.
       
    68      *
       
    69      * @note The reference count of the operation object is increased by one. 
       
    70      * So, Release function of the operation should be called when operation 
       
    71      * is not needed anymore.
       
    72      *
       
    73      * 
       
    74      * @param aObserver Observer for the operation.
       
    75      * @return Pointer to the download operation. Can be used to check the
       
    76      *         progress of the downloading. Counted, Release() must be called
       
    77      *         after use.
       
    78      * @exception Leave System wide error code.
       
    79      *  KNcdErrorParallelOperationNotAllowed if a parallel client is running
       
    80      *  an operation for the same metadata. See MNcdOperation for full explanation.
       
    81      */
       
    82     virtual MNcdDownloadOperation* DownloadContentL( 
       
    83         MNcdDownloadOperationObserver& aObserver ) = 0;
       
    84 
       
    85 
       
    86 protected:
       
    87 
       
    88     /**
       
    89      * Destructor.
       
    90      *
       
    91      * @see MCatalogsBase::~MCatalogsBase()
       
    92      */
       
    93     virtual ~MNcdNodeDownload() {}
       
    94     
       
    95     };
       
    96 
       
    97 
       
    98 #endif // M_NCD_NODE_DOWNLOAD_H