The IAppStoreControl interface.
More...
#include <murl_i_app_store_control.h>
◆ Status
Enumeration of the app-store connection status.
Use GetStatus() to get the current status.
Enumerator |
---|
STATUS_IDLE | The connection is idle.
|
STATUS_CONNECTING | Connecting to the app-store is in progress.
|
STATUS_CONNECTED | The connection to the app-store is established.
|
STATUS_ERROR | Connection error.
|
◆ GetStatus()
virtual Status Murl::IAppStoreControl::GetStatus |
( |
| ) |
const |
|
pure virtual |
Get the app-store connection status.
The connection operation works asynchronously, the application can check the current status to operate correctly.
- Returns
- The app-store connection status.
◆ RegisterProduct()
Register a product to the app-store control.
Products can only be registered before calling ConnectToStore() at least once.
- Parameters
-
productId | The identifier of the product. |
productType | The type of the product. |
- Returns
- true if successful.
◆ ConnectToStore()
virtual Bool Murl::IAppStoreControl::ConnectToStore |
( |
| ) |
|
|
pure virtual |
◆ DisconnectFromStore()
virtual Bool Murl::IAppStoreControl::DisconnectFromStore |
( |
| ) |
|
|
pure virtual |
◆ RestoreTransactions()
virtual Bool Murl::IAppStoreControl::RestoreTransactions |
( |
| ) |
|
|
pure virtual |
Restore any previously completed purchase transactions.
To successfully restore any previous transactions, the current status must be IAppStoreControl::STATUS_CONNECTED.
- Returns
- true if successful.
◆ GetNumberOfAvailableProducts()
virtual UInt32 Murl::IAppStoreControl::GetNumberOfAvailableProducts |
( |
| ) |
const |
|
pure virtual |
Get the number of available products.
The result is only valid after calling ConnectToStore() at least once.
- Returns
- The number of available products.
◆ GetAvailableProduct() [1/2]
Get a product by index.
The result is only valid after calling ConnectToStore() at least once. A valid product index is [0 .. GetNumberOfAvailableProducts() - 1].
- Parameters
-
index | The zero-based index of the product. |
- Returns
- The product object or null if index is out of range.
◆ GetAvailableProduct() [2/2]
Get a product by identifier.
The result is only valid after calling ConnectToStore() at least once.
- Parameters
-
productId | The identifier of the product. |
- Returns
- The product object or null if the identifier is not found.
◆ CanPurchaseProducts()
virtual Bool Murl::IAppStoreControl::CanPurchaseProducts |
( |
| ) |
const |
|
pure virtual |
Check if the app-store allows to purchase products at all.
The result is only valid after calling ConnectToStore() at least once.
- Returns
- true if in-app purchasing is possible.
◆ PurchaseProduct()
◆ ConsumeProduct()
◆ ConfirmConsumedProduct()
Confirm consumption of a consumed product.
If a product has the status IAppStoreProduct::STATUS_CONSUMED the consumption of the product must be confirmed. When confirming the consumption, the product status changes to IAppStoreProduct::STATUS_NOT_PURCHASED immediately and the product's receipt data is emptied.
- Parameters
-
product | The product to confirm consumption. |
- Returns
- true if confirm consumption of the product was successful.
◆ GetLastError()
virtual const String& Murl::IAppStoreControl::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::IAppStoreControl::ClearLastError |
( |
| ) |
|
|
pure virtual |
Clear the last error status and string.
Set the connection status IAppStoreProduct::STATUS_ERROR to IAppStoreProduct::STATUS_CONNECTED or IAppStoreProduct::STATUS_IDLE.
Clear the last error string.
- Returns
- true if successful.
The documentation for this interface was generated from the following file:
- murl_i_app_store_control.h