MNcdNodePurchase Class Reference

class MNcdNodePurchase : public MCatalogsBase

Provides functions for the purchase process of the node content. There may be multiple purchase options for the content. And every purchase option may have multiple payment methods.

After the node has been purchased the content has to be downloaded. Downloading may be done by using the download interface functions.

Inherits from

Constructor & Destructor Documentation

~MNcdNodePurchase()

~MNcdNodePurchase ( ) [protected, inline, virtual]

Member Functions Documentation

IsPurchased()

TBool IsPurchased ( ) const [pure virtual]

Tells if the node is already purchased.

PurchaseL(MNcdPurchaseOption &, MNcdPurchaseOperationObserver &)

MNcdPurchaseOperation * PurchaseL ( MNcdPurchaseOption & aPurchaseOption,
MNcdPurchaseOperationObserver & aObserver
) [pure virtual]

Starts the purchase operation for the given purchase option.

Note:

The reference count of the operation object is increased by one. So, Release function of the operation should be called when operation is not needed anymore.

Exceptions
Leave

with KNcdErrorObsolete if the given purchase option is obsolete. Leave with KNcdErrorSubscriptionNotSubscribableAnymore if the validity time, which indicates that the subscription is subscribable, has already passed. Leave with KNcdErrorParallelOperationNotAllowed if a parallel client is running an operation for the same metadata. See MNcdOperation for full explanation. Else leave with system wide error code.

Parameters

MNcdPurchaseOption & aPurchaseOption The purchase option that is used for purchasing.
MNcdPurchaseOperationObserver & aObserver Observer for the operation.

PurchaseOptionL(const TDesC &)

MNcdPurchaseOption * PurchaseOptionL ( const TDesC & aPurchaseOptionId ) const [pure virtual]

Gives a purchase option whose id matches given purchase option id.

Exceptions
Leave

System wide error codes.

Parameters

const TDesC & aPurchaseOptionId

PurchaseOptionsL()

RCatalogsArray < MNcdPurchaseOption > PurchaseOptionsL ( ) const [pure virtual]

Gives the available purchase options for the node.

Note:

This function should be called to get current and valid list of purchaseoptions after node's state changes.

Exceptions
Leave

System wide error codes.

PurchasedOptionL()

MNcdPurchaseOption * PurchasedOptionL ( ) const [pure virtual]

Returns the purchased purchase option.

Note:

Valid only when IsPurchased() returns ETrue.

Exceptions
Leave

System wide error code.

PurchasedPriceL()

const TDesC & PurchasedPriceL ( ) const [pure virtual]

Gives the final price paid when the node was purchased.

Note:

Valid only when IsPurchased() returns ETrue.

Exceptions
KErrNotFound

If the node has not been purchased.

Leave

System wide error codes.

TimeOfPurchaseL()

TTime TimeOfPurchaseL ( ) const [pure virtual]

Gives the time of the purchase if the node has been purchased. Time given is in universal time.

Note:

Valid only when IsPurchased() returns ETrue.

Exceptions
KErrNotFound

If the node has not been purchased.

Leave

System wide error codes.