ncdengine/provider/protocol/inc/ncd_pp_dataentity.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:   MNcdPreminetProtocolDataEntity declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_PROTOCOL_ELEMENT_DATAENTITY_H
       
    20 #define NCD_PROTOCOL_ELEMENT_DATAENTITY_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "ncdprotocoltypes.h"
       
    24 
       
    25 class MNcdPreminetProtocolPurchaseOption;
       
    26 class MNcdConfigurationProtocolQuery;
       
    27 class MNcdPreminetProtocolIcon;
       
    28 class MNcdPreminetProtocolSkin;
       
    29 class MNcdPreminetProtocolDataEntityContent;
       
    30 class MNcdPreminetProtocolDownload;
       
    31 
       
    32 class MNcdPreminetProtocolDataEntity
       
    33     {
       
    34 public:
       
    35 
       
    36     /**
       
    37      * Destructor
       
    38      */
       
    39     virtual ~MNcdPreminetProtocolDataEntity() {}
       
    40 
       
    41     /**
       
    42      * Returns the type of this reference entity.
       
    43      * @return Type
       
    44      */
       
    45     virtual TNcdDataEntityType Type() const = 0;
       
    46 
       
    47     /**
       
    48      * Returns the ID of this entity.
       
    49      * @return Id
       
    50      */
       
    51     virtual const TDesC& Id() const = 0;
       
    52     /**
       
    53      * Returns the last modified date for this entity.
       
    54      * @return Last modified time, or KNullDesC if never modified.
       
    55      */
       
    56     virtual const TDesC& Timestamp() const = 0;
       
    57     /**
       
    58      * Returns the namespace for this entity
       
    59      * @return namespace or KNullDesC 
       
    60      */
       
    61     virtual const TDesC& Namespace() const = 0;
       
    62 
       
    63     /**
       
    64      * Retrieves the server uri from which this entity was received
       
    65      * @return Server URI
       
    66      */
       
    67     virtual const TDesC& ServerUri() const = 0;
       
    68 
       
    69     /**
       
    70      * Entity name, localized.
       
    71      * @return Name, never KNullDesC
       
    72      */
       
    73     virtual const TDesC& Name() const = 0;
       
    74 
       
    75     /**
       
    76      * Retuns the description for this entity, localized.
       
    77      * @return Description or KNullDesC
       
    78      */
       
    79     virtual const TDesC& Description() const = 0;
       
    80 
       
    81     /**
       
    82      * Returns icon information for the entity.
       
    83      * @return Icon info object, NULL if no icon
       
    84      */
       
    85     virtual const MNcdPreminetProtocolIcon* Icon() const = 0;
       
    86     
       
    87     /**
       
    88      * Returns the disclaimer for the entity. Ownership NOT transferred.
       
    89      * @return Disclaimer object or NULL if no disclaimer. 
       
    90      */
       
    91     virtual const MNcdConfigurationProtocolQuery* Disclaimer() const = 0;
       
    92 
       
    93     /**
       
    94      * Returns the help information for the entity. Ownership NOT transferred.
       
    95      * @return Help information object or NULL if no information. 
       
    96      */
       
    97     virtual const MNcdPreminetProtocolDownload* HelpInformation() const = 0;
       
    98 
       
    99     /** 
       
   100      * Returns the downloadable content info if available.
       
   101      * Object ownership is NOT transferred.
       
   102      * @return Pointer to the downloadable content or NULL.
       
   103      */
       
   104     virtual const MNcdPreminetProtocolDataEntityContent* 
       
   105         DownloadableContent() const = 0;
       
   106 
       
   107     /**
       
   108      * Returns the subscribable content info if available.
       
   109      * Object ownership is NOT transferred.
       
   110      * @return Pointer to the subscribable content or NULL.
       
   111      */
       
   112     virtual const MNcdPreminetProtocolDataEntityContent* 
       
   113         SubscribableContent() const = 0;
       
   114 
       
   115     /**
       
   116      * Returns the amount of purchase options.
       
   117      * @return Purchase option count.
       
   118      */
       
   119     virtual TInt PurchaseOptionCount() const = 0;
       
   120     
       
   121     /**
       
   122      * Returns the purchase option. 
       
   123      * @param aIndex Index ( 0 .. PurchaseOptionCount()-1 )
       
   124      * @return Purchase option reference. Leaves if aIndex is out of bounds.
       
   125      */
       
   126     virtual const MNcdPreminetProtocolPurchaseOption& 
       
   127         PurchaseOptionL(TInt aIndex) const = 0;
       
   128 
       
   129     /**
       
   130      * Returns the skin
       
   131      * @return Skin object pointer or NULL.
       
   132      */
       
   133     virtual const MNcdPreminetProtocolSkin* Skin() const = 0;
       
   134     
       
   135     /**
       
   136      * Returns the layout type
       
   137      * @return Layout type or KNullDesC
       
   138      */
       
   139     virtual const TDesC& LayoutType() const = 0;
       
   140 
       
   141     /**
       
   142      * Returns the amount of screenshots
       
   143      * @return Screenshot count
       
   144      */
       
   145     virtual TInt ScreenshotCount() const = 0;
       
   146 
       
   147     /**
       
   148      * Returns a screenshot. 
       
   149      * @param aIndex Index of a screenshot
       
   150      * @return Screenshot reference. Leaves if aIndex is out of bounds.
       
   151      */
       
   152     virtual const MNcdPreminetProtocolDownload& 
       
   153         ScreenshotL(TInt aIndex) const = 0;
       
   154 
       
   155     /**
       
   156      * Returns the amount of previews
       
   157      * @return Preview count
       
   158      */
       
   159     virtual TInt PreviewCount() const = 0;
       
   160 
       
   161     /**
       
   162      * Returns a preview.
       
   163      * @param aIndex Index of preview.
       
   164      * @return Preview reference. Leaves if aIndex is out of bounds.
       
   165      */
       
   166     virtual const MNcdPreminetProtocolDownload& 
       
   167         PreviewL(TInt aIndex) const = 0;
       
   168         
       
   169     /**
       
   170      * Returns the more info data object for the entity. Ownership NOT transferred.
       
   171      * @return More info object or NULL if no more info. 
       
   172      */
       
   173     virtual const MNcdConfigurationProtocolQuery* 
       
   174         MoreInfo() const = 0;
       
   175         
       
   176     /**
       
   177      * Returns the amount of details.
       
   178      * @return Cookie count
       
   179      */
       
   180     virtual TInt DetailCount() const = 0;
       
   181 
       
   182     /**
       
   183      * Get a detail element.
       
   184      * @param aIndex Detail index. Leaves if index is out of bounds.
       
   185      * @return Detail reference.
       
   186      */    
       
   187     virtual const MNcdConfigurationProtocolDetail& DetailL( TInt aIndex ) const = 0;
       
   188     };
       
   189 
       
   190 
       
   191 #endif //NCD_PROTOCOL_ELEMENT_DATAENTITY_H