MNcdSubscription Class Reference

class MNcdSubscription : public MCatalogsBase

Subscription interface.

This interface describes a subscription and provides methods for subscription management.

Inherits from

Constructor & Destructor Documentation

~MNcdSubscription()

~MNcdSubscription ( ) [protected, inline, virtual]

Destructor

Protected so that the implementing object cannot be deleted through this interface by using delete. The destructor of an interface should be set virtual to make sure that the destructors of derived classes will be called when object is destroyed.

Member Functions Documentation

CreditLimit(TReal &, TReal &)

TBool CreditLimit ( TReal & aCreditsLeft,
TReal & aTotalCredits
) const [pure virtual]

Get subscription credit limit information.

Parameters

TReal & aCreditsLeft If ETrue is returned, set to current number of credits left in the subscription.
TReal & aTotalCredits If ETrue is returned, set to total number of credits the subscription originally had after purchase.

DownloadLimit(TInt &, TInt &)

TBool DownloadLimit ( TInt & aDownloadsLeft,
TInt & aTotalDownloads
) const [pure virtual]

Get subscription download limit information.

Parameters

TInt & aDownloadsLeft If ETrue is returned, set to current number of downloads left in the subscription.
TInt & aTotalDownloads If ETrue is returned, set to total number of downloads the subscription originally had after purchase.

IconL()

HBufC8 * IconL ( ) const [pure virtual]

Icon getter.

Exceptions
Leave

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

IsObsolete()

TBool IsObsolete ( ) const [pure virtual]

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

Name()

const TDesC & Name ( ) const [pure virtual]

Name getter.

OriginNodeL()

MNcdNode * OriginNodeL ( ) const [pure virtual]

Returns the node that has the purchase option which was used to buy this subscription.

Exceptions
Leave

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

OriginPurchaseOptionId()

const TDesC & OriginPurchaseOptionId ( ) const [pure virtual]

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

SubscriptionStatus()

TStatus SubscriptionStatus ( ) const [pure virtual]

Returns the current status for the subscription.

SubscriptionType()

TType SubscriptionType ( ) const [pure virtual]

Get type of the subscription.

UnsubscribeL(MNcdSubscriptionOperationObserver &)

MNcdSubscriptionOperation * UnsubscribeL ( MNcdSubscriptionOperationObserver & aObserver ) [pure virtual]

Unsubscribe a currently valid subscription.

Exceptions
Leave

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

Parameters

MNcdSubscriptionOperationObserver & aObserver Operation observer interface.

Unsubscribed()

TBool Unsubscribed ( ) const [pure virtual]

Returns whether the subscription has been unsubscribed or not.

ValidityTime(TTime &)

TBool ValidityTime ( TTime & aValidUntil ) const [pure virtual]

Get subscription validity time information.

Parameters

TTime & aValidUntil Set to time when the subscription expires, if ETrue is returned, otherwise not used. Time given is in local time.

Member Enumerations Documentation

Enum TStatus

Status of the subscription.

Enumerators

ESubscriptionActive

Subscription has been purchased and is still active (validity time/credits/downloads left).

ESubscriptionExpired

Subscription has been purchased, but has expired (out of validity time/credits/downloads).

Enum TType

Type of the subscription renewal method.

Enumerators

EPeriodic

Requires an explicit renewal after expiration.

EAutomaticContinous

Renewed automatically on server side after expiration.