ncdengine/inc/ncdnodecontentinfo.h
changeset 0 ba25891c3a9e
child 11 3ba40be8e484
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 MNcdNodeContent interface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_NCD_NODE_CONTENT_INFO_H
       
    20 #define M_NCD_NODE_CONTENT_INFO_H
       
    21 
       
    22 
       
    23 #include "catalogsbase.h"
       
    24 #include "ncdinterfaceids.h"
       
    25 #include "ncditempurpose.h"
       
    26 
       
    27 /**
       
    28  *  This interface provides functions to get general information
       
    29  *  about the content of the node.
       
    30  *
       
    31  *  @note This interface is available after node load if the server
       
    32  *  sent the information.
       
    33  *  
       
    34  *  @note The data is updated only from the server. Content downloads
       
    35  *  and installs do not affect this interface.
       
    36  *
       
    37  *  @note This interface is internalized from purchase history if possible.
       
    38  */
       
    39 class MNcdNodeContentInfo : public virtual MCatalogsBase
       
    40     {
       
    41 
       
    42 public:
       
    43 
       
    44     /**
       
    45      * Unique identifier for the interface, required for all MCatalogsBase interfaces.
       
    46      *
       
    47      * 
       
    48      */
       
    49     enum { KInterfaceUid = ENcdNodeContentUid };
       
    50 
       
    51 
       
    52     /**
       
    53      * The purpose of the node.
       
    54      * 
       
    55      * 
       
    56      * @return Bit field describing the purpose(s) of this node, a combination
       
    57      *         of TNcdItemPurpose flags.
       
    58      * @see TNcdItemPurpose
       
    59      */
       
    60     virtual TUint Purpose() const = 0;    
       
    61     
       
    62 
       
    63     /**
       
    64      * Gives the mime type of the content data.
       
    65      *
       
    66      * @return The mime type of the download content data. The type is
       
    67      * given as a text according to the standards that define MIME types.
       
    68      */
       
    69     virtual const TDesC& MimeType() const = 0;
       
    70 
       
    71 
       
    72     /**
       
    73      * This function is the indicative Symbian application UID for the
       
    74      * contents that are applications. This can be used e.g. for checking
       
    75      * if the application has already been installed to the phone.
       
    76      *
       
    77      * @return The UID of the application item.
       
    78      */
       
    79     virtual TUid Uid() const = 0;
       
    80 
       
    81 
       
    82     /**
       
    83      * Different versions of the content items may exist. Thus,
       
    84      * a version identifier may be defined for the item. When installing
       
    85      * applications the version may be required.
       
    86      *
       
    87      * @return Version string of this application item.  
       
    88      * If the protocol has not defined any value, 
       
    89      * an empty string is returned.
       
    90      */
       
    91     virtual const TDesC& Version() const = 0;
       
    92 
       
    93 
       
    94     /**
       
    95      * Downloadable content size in bytes. 
       
    96      * In the protocol, multiple contents may be included for one content download.
       
    97      * Therefore, if there are multiple possibilities, the worst case scenario size 
       
    98      * is given here.
       
    99      *
       
   100      * @return Content size in bytes.
       
   101      * If the protocol has not defined any value, zero is returned.
       
   102      */
       
   103     virtual TInt Size() const = 0;
       
   104 
       
   105 
       
   106 protected:
       
   107 
       
   108     /**
       
   109      * Destructor.
       
   110      *
       
   111      * @see MCatalogsBase::~MCatalogsBase()
       
   112      */
       
   113     virtual ~MNcdNodeContentInfo() {}
       
   114 
       
   115     };
       
   116 
       
   117 
       
   118 #endif // M_NCD_NODE_CONTENT_INFO_H