ncdengine/provider/protocol/inc/ncd_pp_dataentitycontent.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:   MNcdPreminetProtocolDataEntity declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NCD_PROTOCOL_ELEMENT_DATAENTITYCONTENT_H
       
    20 #define NCD_PROTOCOL_ELEMENT_DATAENTITYCONTENT_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "ncdprotocoltypes.h"
       
    24 
       
    25 class MNcdPreminetProtocolEntityDependency;
       
    26 
       
    27 class MNcdPreminetProtocolDataEntityContent
       
    28     {
       
    29 public:
       
    30 
       
    31     /**
       
    32      * Destructor
       
    33      */
       
    34     virtual ~MNcdPreminetProtocolDataEntityContent() {}
       
    35 
       
    36     /**
       
    37      * Returns the last modified date for this entity.
       
    38      * @return Last modified time, or KNullDesC if never modified.
       
    39      */
       
    40     virtual const TDesC& Timestamp() const = 0;
       
    41 
       
    42     /**
       
    43      * Returns the size of this content.
       
    44      * @return Size, 0 if not set
       
    45      */
       
    46     virtual TInt Size() const = 0;
       
    47 
       
    48     /**
       
    49      * Entity mime type.
       
    50      * @return Mime type or KNullDesC 
       
    51      */
       
    52     virtual const TDesC& Mime() const = 0;
       
    53 
       
    54     /**
       
    55      * Returns the ID of this entity.
       
    56      * @return Id or KNullDesC
       
    57      */
       
    58     virtual const TDesC& Id() const = 0;
       
    59 
       
    60     /**
       
    61      * Retuns the version of this entity.
       
    62      * @return Version or KNullDesC
       
    63      */
       
    64     virtual const TDesC& Version() const = 0;
       
    65 
       
    66     /**
       
    67      * Retuns the validity time in minutes.
       
    68      * @return Validity time.
       
    69      */
       
    70     virtual TInt ValidUntilDelta() const = 0;
       
    71 
       
    72     /**
       
    73      * Retuns whether the client may update the content automagically.
       
    74      * @return true or false
       
    75      */
       
    76     virtual TBool ValidUntilAutoUpdate() const = 0;
       
    77 
       
    78     /**
       
    79      * Returns the amount of content purposes.
       
    80      * @return Content purpose count.
       
    81      */
       
    82     virtual TInt ContentPurposeCount() const = 0;
       
    83     
       
    84     /**
       
    85      * Returns the content purpose object
       
    86      * @param aIndex Index ( 0 .. PurchaseOptionCount()-1 )
       
    87      * @return Content purpose pointer. Ownership is NOT transferred.
       
    88      */
       
    89     virtual const TDesC& ContentPurposeL(TInt aIndex) const = 0;
       
    90 
       
    91     /**
       
    92      * Returns the amount of entity dependencies.
       
    93      * @return Entity dependency count.
       
    94      */
       
    95     virtual TInt EntityDependencyCount() const = 0;
       
    96     
       
    97     /**
       
    98      * Returns the purchase option.
       
    99      * @param aIndex Index ( 0 .. PurchaseOptionCount()-1 )
       
   100      * @return Purchase option pointer. Ownership is NOT transferred.
       
   101      */
       
   102     virtual const MNcdPreminetProtocolEntityDependency& 
       
   103         EntityDependencyL(TInt aIndex) const = 0;
       
   104 
       
   105     /**
       
   106      * Returns the subscription type of content.
       
   107      * @return Subscription type, ENotSubscribable if not subscribable.
       
   108      */
       
   109     virtual TNcdSubscriptionType SubscriptionType() const = 0;
       
   110     
       
   111     /**
       
   112      * Child accessibility. (Subscriptions only)
       
   113      * Returns true if child is viewable.
       
   114      * @return true or false
       
   115      */
       
   116     virtual TBool ChildViewable() const = 0;
       
   117     
       
   118     /**
       
   119      * Child accessibility. (Subscriptions only)
       
   120      * Returns true if child is separately purchasable.
       
   121      * @return true or false
       
   122      */
       
   123     virtual TBool ChildSeparatelyPurchasable() const = 0;
       
   124 
       
   125     };
       
   126 
       
   127 
       
   128 #endif //NCD_PROTOCOL_ELEMENT_DATAENTITYCONTENT_H