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 String & | GetId () const =0 |
Get the identifier of the product. More... | |
virtual ProductType | GetProductType () const =0 |
Get the product type. More... | |
virtual const String & | GetTitle () const =0 |
Get the title of the product. More... | |
virtual const String & | GetDescription () const =0 |
Get the description of the product. More... | |
virtual const String & | GetPrice () const =0 |
Get the price of the product. More... | |
virtual const String & | GetLocalPrice () const =0 |
Get the localized price of the product. More... | |
virtual const String & | GetCurrencyCode () const =0 |
Get the international currency symbol. More... | |
virtual const Data & | GetReceiptData () const =0 |
Get the product receipt data. More... | |
virtual const Data & | GetReceiptSignature () const =0 |
Get the product receipt signature data. More... | |
virtual const String & | GetLastError () 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.
◆ ProductType
Member Function Documentation
◆ GetStatus()
|
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()
|
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()
|
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()
|
pure virtual |
Check if the product is valid on the app-store.
- Returns
- true if the product is valid on the app-store.
◆ GetId()
|
pure virtual |
Get the identifier of the product.
- Returns
- The identifier of the product.
◆ GetProductType()
|
pure virtual |
Get the product type.
- Returns
- The product type.
◆ GetTitle()
|
pure virtual |
Get the title of the product.
- Returns
- The product title.
◆ GetDescription()
|
pure virtual |
Get the description of the product.
- Returns
- The product description.
◆ GetPrice()
|
pure virtual |
Get the price of the product.
- Returns
- The product price.
◆ GetLocalPrice()
|
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()
|
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()
|
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()
|
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()
|
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()
|
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