ncdengine/provider/protocol/inc/ncd_pp_download.h
changeset 4 32704c33136d
equal deleted inserted replaced
-1:000000000000 4:32704c33136d
       
     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:   MNcdPreminetProtocolDownload declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_PROTOCOL_ELEMENT_DOWNLOAD_H
       
    20 #define NCD_PROTOCOL_ELEMENT_DOWNLOAD_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "ncdprotocoltypes.h"
       
    24 
       
    25 class MNcdConfigurationProtocolQuery;
       
    26 class MNcdPreminetProtocolRights;
       
    27 class MNcdPreminetProtocolDescriptor;
       
    28 
       
    29 
       
    30 class MNcdPreminetProtocolDownload
       
    31     {
       
    32 public:    
       
    33     /**
       
    34      * Destructor
       
    35      */
       
    36     virtual ~MNcdPreminetProtocolDownload() {}
       
    37 
       
    38 
       
    39     /**
       
    40      * Download URI.
       
    41      * @return URI or KNullDesC
       
    42      */
       
    43     virtual const TDesC& Uri() const = 0;
       
    44 
       
    45     /**
       
    46      * Returns whether the content is automatically downloadable.
       
    47      * @return True or false
       
    48      */
       
    49     virtual TBool AutoDownload() const = 0;
       
    50 
       
    51     /**
       
    52      * Returns the last modified date for this entity.
       
    53      * @return Last modified time, or 0 if never modified.
       
    54      */
       
    55     virtual TInt DelayDelta() const = 0;
       
    56 
       
    57     /**
       
    58      * Delivery method of this download
       
    59      * @return Delivery type 
       
    60      */
       
    61     virtual TNcdUriDeliveryMethod DeliveryMethod() const = 0;
       
    62 
       
    63     /**
       
    64      * Validity time in minutes.
       
    65      * @return Delta value or -1 if element not found.
       
    66      */
       
    67     virtual TInt ValidityDelta() const = 0;
       
    68 
       
    69     /**
       
    70      * Download mime type
       
    71      * @return Descriptor
       
    72      */
       
    73     virtual const TDesC& Mime() const = 0;
       
    74 
       
    75     /**
       
    76      * ServerMessage information object.
       
    77      * @return Pointer or NULL. Ownership NOT transferred.
       
    78      */
       
    79     virtual const MNcdConfigurationProtocolQuery*
       
    80         Message() const = 0;
       
    81 
       
    82     /**
       
    83      * Possible fingerprint for the target binary
       
    84      * @return Fingerprint.
       
    85      */
       
    86     virtual const TDesC& Fingerprint() const = 0;
       
    87 
       
    88     /**
       
    89      * Fingerprint algorithm
       
    90      * @return MD5 or SHA-1.
       
    91      */
       
    92     virtual TNcdUriFingerprintAlgorithm FingerprintAlgorithm() const = 0;
       
    93 
       
    94     /**
       
    95      * Download descriptor. Ownership is NOT transferred.
       
    96      * @return Desriptor pointer or NULL.
       
    97      */
       
    98     virtual const MNcdPreminetProtocolDescriptor* Descriptor() const = 0;
       
    99 
       
   100 
       
   101 public:
       
   102     /**
       
   103      * Indicates whether the download is consumable or downloadable.
       
   104      * @return EConsumable or EDownloadable
       
   105      */
       
   106     virtual TNcdDownloadTargetType Target() const = 0;
       
   107 
       
   108     /**
       
   109      * Maximum chuck size for download requests.
       
   110      * @return Chunk size.
       
   111      */
       
   112     virtual TInt ChunkSize() const = 0;
       
   113     
       
   114     /**
       
   115      * Is content launchable
       
   116      * @return true or false.
       
   117      */
       
   118     virtual TBool Launchable() const = 0;
       
   119 
       
   120     /**
       
   121      * HTTP URI for install notification
       
   122      * @return Notification URI
       
   123      */
       
   124     virtual const TDesC& InstallNotificationUri() const = 0;
       
   125 
       
   126     /**
       
   127      * Total size of the download target in bytes
       
   128      * @return Download size
       
   129      */
       
   130     virtual TInt Size() const = 0;
       
   131     
       
   132     /**
       
   133      * Can the content be re-downloaded.
       
   134      * @return True or false
       
   135      */
       
   136     virtual TBool ReDownloadable() const = 0;
       
   137 
       
   138     /**
       
   139      * Rights object. Ownership is NOT transferred.
       
   140      * @return Rights object pointer or NULL.
       
   141      */
       
   142     virtual const MNcdPreminetProtocolRights* Rights() const = 0;
       
   143 
       
   144     /**
       
   145      * Preview type.
       
   146      * @return Type string or KNullDesC
       
   147      */
       
   148     virtual const TDesC& PreviewType() const = 0;
       
   149     
       
   150     };
       
   151 
       
   152 
       
   153 #endif //NCD_PROTOCOL_ELEMENT_DOWNLOAD_H