MNcdPurchaseOption Class Reference

class MNcdPurchaseOption : public MCatalogsBase

Describes one purchase option.

Each purchasable node may have one or more of these. A purchase option can be for example "1$ Trial version", or "10$ Full version".

Inherits from

Constructor & Destructor Documentation

~MNcdPurchaseOption()

~MNcdPurchaseOption()[protected, inline, virtual]

Member Functions Documentation

IsFree()

TBool IsFree()const [pure virtual]

Checks whether this purchase option is free.

IsObsolete()

TBool IsObsolete()const [pure virtual]

Checks whether this purchase option is obsolete or not. Purchase option becomes obsolete if it is removed while user still has reference to it. Removal can be done for example because the purchase option was removed from the server. Obsolete purchase option should not be used and valid purchase option instances should be retrieved by using PurchaseOptionsL method from MNcdNodePurchase interface.

IsUsableL()

TBool IsUsableL()const [pure virtual]

Checks whether this purchase option can be used. The purchase option cannot be used if the type of this purchase option is ESubscriptionPurchase or ESubscriptionUpgrade and the parentsubscription is not yet bought.

Exceptions
Leave

with KNcdErrorObsolete if this purchase option is obsolete. Otherwise leave with System wide error code.

Name()

const TDesC &Name()const [pure virtual]

Name getter.

ParentSubscriptionL()

MNcdSubscription *ParentSubscriptionL()const [pure virtual]

If this purchase option is of type ESubscriptionPurchase, this function returns the subscription that the purchase option uses if the subscription exists in subscription manager.

Note:

Valid only when purchase option is a valid ESubscriptionPurchase and this purchase option is not obsolete.

Exceptions
Leave

with KNcdErrorObsolete if this purchase option is obsolete. If this purchase option is not valid ESubscriptionPurchase then leave with KNcdErrorPurchaseOptionNotValidSubscriptionPurchase. Otherwise leave with System wide error code.

ParentSubscriptionNodeL()

MNcdNode *ParentSubscriptionNodeL()const [pure virtual]

Returns the node that has the purchase option to buy the subscription needed to use this purchase option.

Note:

Valid only when purchase option is a valid ESubscriptionPurchase and this purchase option is not obsolete.

Exceptions
Leave

with KNcdErrorObsolete if this purchase option is obsolete. If this purchase option is not valid ESubscriptionPurchase then leave with KNcdErrorPurchaseOptionNotValidSubscriptionPurchase. Otherwise leave with System wide error code.

ParentSubscriptionPurchaseOptionIdL()

const TDesC &ParentSubscriptionPurchaseOptionIdL()const [pure virtual]

Returns an id that identifies the purchaseoption that can be used to buy the subscription needed to use this purchase option. Node that has the purchase option identified by the id returned from this function can be queried by using method ParentSubscriptionNodeL().

Note:

Valid only when purchase option is a valid ESubscriptionPurchase.

Exceptions
If

this purchase option is not valid ESubscriptionPurchase then leave with KNcdErrorPurchaseOptionNotValidSubscriptionPurchase. Otherwise leave with System wide error code.

Price()

const TDesC &Price()const [pure virtual]

Price getter.

PurchaseOptionType()

TType PurchaseOptionType()const [pure virtual]

Get type of the purchase option.

Member Enumerations Documentation

Enum TType

Type of the purchase option.

Enumerators

EPurchase

Purchase option to make a normal purchase.

ESubscription

Purchase option to purchase a subscription.

ESubscriptionPurchase

Purchase option to do a purchase using an existing subscription.

ESubscriptionUpgrade

Purchase option to do an upgrade to an existing subscription.