Murl::IAppStoreProduct Interface Referenceabstract

The IAppStoreProduct interface. More...

#include "murl_i_app_store_product.h"

Inherited by Murl::Platform::AppStoreProduct.

Public Types

enum  Status {
  STATUS_NOT_PURCHASED , STATUS_PURCHASE_PENDING , STATUS_PURCHASED , STATUS_PURCHASE_CANCELLED ,
  STATUS_CONSUME_PENDING , STATUS_CONSUMED , STATUS_CONSUME_CANCELLED , STATUS_ERROR
}
 Enumeration of the product status. More...
 
enum  ProductType { PRODUCT_TYPE_NON_CONSUMABLE , PRODUCT_TYPE_CONSUMABLE , PRODUCT_TYPE_AUTO_RENEWABLE }
 Enumeration of the product types. More...
 

Public Member Functions

virtual Status GetStatus () const =0
 Get the product purchase status. More...
 
virtual Bool ClearStatus ()=0
 Clear the product purchase status. More...
 
virtual Bool IsInitialized () const =0
 Check if the product is initialized. More...
 
virtual Bool IsValid () const =0
 Check if the product is valid on the app-store. More...
 
virtual const StringGetId () const =0
 Get the identifier of the product. More...
 
virtual ProductType GetProductType () const =0
 Get the product type. More...
 
virtual const StringGetTitle () const =0
 Get the title of the product. More...
 
virtual const StringGetDescription () const =0
 Get the description of the product. More...
 
virtual const StringGetPrice () const =0
 Get the price of the product. More...
 
virtual const StringGetLocalPrice () const =0
 Get the localized price of the product. More...
 
virtual const StringGetCurrencyCode () const =0
 Get the international currency symbol. More...
 
virtual const DataGetReceiptData () const =0
 Get the product receipt data. More...
 
virtual const DataGetReceiptSignature () const =0
 Get the product receipt signature data. More...
 
virtual const StringGetLastError () const =0
 Get the description string of the last error. More...
 
virtual Bool ClearLastError ()=0
 Clear the last error status and string. More...
 

Detailed Description

The IAppStoreProduct interface.

The IAppStoreProduct object can be created by the IAppStoreControl object.

Member Enumeration Documentation

◆ Status

Enumeration of the product status.

Use GetStatus() to get the current status.

Enumerator
STATUS_NOT_PURCHASED 

The product is not purchased.

STATUS_PURCHASE_PENDING 

Purchasing the product is in progress.

STATUS_PURCHASED 

The product is purchased.

STATUS_PURCHASE_CANCELLED 

Purchasing the product is cancelled.

STATUS_CONSUME_PENDING 

Consuming the product is in progress.

STATUS_CONSUMED 

The product is consumed.

STATUS_CONSUME_CANCELLED 

Consuming the product is cancelled.

STATUS_ERROR 

Purchase error.

◆ ProductType

Enumeration of the product types.

Enumerator
PRODUCT_TYPE_NON_CONSUMABLE 

The product is non-consumable.

PRODUCT_TYPE_CONSUMABLE 

The product is consumable.

PRODUCT_TYPE_AUTO_RENEWABLE 

The product is auto-renewable.

Member Function Documentation

◆ GetStatus()

virtual Status Murl::IAppStoreProduct::GetStatus ( ) const
pure virtual

Get the product purchase status.

The purchase operation works asynchronously, the application can check the current status to operate correctly.

Returns
The product purchase status.

◆ ClearStatus()

virtual Bool Murl::IAppStoreProduct::ClearStatus ( )
pure virtual

Clear the product purchase status.

Set the product purchase status to IAppStoreProduct::STATUS_NOT_PURCHASED if the product purchase status is IAppStoreProduct::STATUS_PURCHASE_CANCELLED.
Set the product purchase status to IAppStoreProduct::STATUS_PURCHASED if the product purchase status is IAppStoreProduct::STATUS_CONSUME_CANCELLED.

Returns
true if successful.

◆ IsInitialized()

virtual Bool Murl::IAppStoreProduct::IsInitialized ( ) const
pure virtual

Check if the product is initialized.

The product is initialized when connecting to the app-store was successful.

Returns
true if the product is initialized.

◆ IsValid()

virtual Bool Murl::IAppStoreProduct::IsValid ( ) const
pure virtual

Check if the product is valid on the app-store.

Returns
true if the product is valid on the app-store.

◆ GetId()

virtual const String& Murl::IAppStoreProduct::GetId ( ) const
pure virtual

Get the identifier of the product.

Returns
The identifier of the product.

◆ GetProductType()

virtual ProductType Murl::IAppStoreProduct::GetProductType ( ) const
pure virtual

Get the product type.

Returns
The product type.

◆ GetTitle()

virtual const String& Murl::IAppStoreProduct::GetTitle ( ) const
pure virtual

Get the title of the product.

Returns
The product title.

◆ GetDescription()

virtual const String& Murl::IAppStoreProduct::GetDescription ( ) const
pure virtual

Get the description of the product.

Returns
The product description.

◆ GetPrice()

virtual const String& Murl::IAppStoreProduct::GetPrice ( ) const
pure virtual

Get the price of the product.

Returns
The product price.

◆ GetLocalPrice()

virtual const String& Murl::IAppStoreProduct::GetLocalPrice ( ) const
pure virtual

Get the localized price of the product.

The localized price description contains the currency symbol and the corresponding currency number format.

Returns
The localized product price.

◆ GetCurrencyCode()

virtual const String& Murl::IAppStoreProduct::GetCurrencyCode ( ) const
pure virtual

Get the international currency symbol.

A country typically has a local currency symbol and an international currency symbol.
The local symbol is used within the country, while the international currency symbol is used in international contexts to specify that country’s currency unambiguously.

Returns
The international currency symbol.

◆ GetReceiptData()

virtual const Data& Murl::IAppStoreProduct::GetReceiptData ( ) const
pure virtual

Get the product receipt data.

The purchase receipt data is valid after a successful purchase only.
On iOS the data contains the transactionReceipt from SKPaymentTransaction. On Google Play the data contains the entire RESPONSE_INAPP_PURCHASE_DATA json string. On Amazon & Samsung store the data contains the order identifier. On OSX the data is empty.

Returns
The product receipt data.

◆ GetReceiptSignature()

virtual const Data& Murl::IAppStoreProduct::GetReceiptSignature ( ) const
pure virtual

Get the product receipt signature data.

The receipt signature data is valid after a successful purchase only.
On Google Play the data contains the RESPONSE_INAPP_SIGNATURE. On iOS & OSX the data contains the transactionIdentifier from SKPaymentTransaction. On Amazon & Samsung store the data is empty.

Returns
The product receipt signature data.

◆ GetLastError()

virtual const String& Murl::IAppStoreProduct::GetLastError ( ) const
pure virtual

Get the description string of the last error.

Use ClearLastError() to reset the error status.

Returns
The description string of the last error.

◆ ClearLastError()

virtual Bool Murl::IAppStoreProduct::ClearLastError ( )
pure virtual

Clear the last error status and string.

Set the product purchase status to IAppStoreProduct::STATUS_NOT_PURCHASED if the product purchase status is IAppStoreProduct::STATUS_ERROR.
Clear the last error string.

Returns
true if successful.

The documentation for this interface was generated from the following file:
  • murl_i_app_store_product.h


Copyright © 2011-2024 Spraylight GmbH.