JUCE
|
Represents an object that gets notified about events such as product info returned or product purchase finished. More...
Classes | |
struct | PurchaseInfo |
Structure holding purchase information. More... | |
Public Member Functions | |
virtual | ~Listener () |
virtual void | productsInfoReturned (const Array< Product > &) |
Called whenever a product info is returned after a call to InAppPurchases::getProductsInformation(). More... | |
virtual void | productPurchaseFinished (const PurchaseInfo &, bool, const String &) |
Called whenever a purchase is complete, with additional state whether the purchase completed successfully. More... | |
virtual void | purchasesListRestored (const Array< PurchaseInfo > &, bool, const String &) |
Called when a list of all purchases is restored. More... | |
virtual void | productConsumed (const String &, bool, const String &) |
Called whenever a product consumption finishes. More... | |
virtual void | productDownloadProgressUpdate (Download &, float, RelativeTime) |
iOS only: Called when a product download progress gets updated. More... | |
virtual void | productDownloadPaused (Download &) |
iOS only: Called when a product download is paused. More... | |
virtual void | productDownloadFinished (Download &, const URL &) |
iOS only: Called when a product download finishes (successfully or not). More... | |
Represents an object that gets notified about events such as product info returned or product purchase finished.
|
virtual |
Called whenever a product info is returned after a call to InAppPurchases::getProductsInformation().
|
virtual |
Called whenever a purchase is complete, with additional state whether the purchase completed successfully.
For hosted content (iOS only), the downloads array within PurchaseInfo will contain all download objects corresponding with the purchase. For non-hosted content, the downloads array will be empty.
InAppPurchases class will own downloads and will delete them as soon as they are finished.
NOTE: It is possible to receive this callback for the same purchase multiple times. If that happens, only the newest set of downloads and the newest orderId will be valid, the old ones should be not used anymore!
|
virtual |
Called when a list of all purchases is restored.
This can be used to figure out to which products a user is entitled to.
NOTE: It is possible to receive this callback for the same purchase multiple times. If that happens, only the newest set of downloads and the newest orderId will be valid, the old ones should be not used anymore!
|
virtual |
Called whenever a product consumption finishes.
|
virtual |
iOS only: Called when a product download progress gets updated.
If the download was interrupted in the last application session, this callback may be called after the application starts.
If the download was in progress and the application was closed, the download may happily continue in the background by OS. If you open the app and the download is still in progress, you will receive this callback. If the download finishes in the background before you start the app again, you will receive productDownloadFinished callback instead. The download will only stop when it is explicitly cancelled or when it is finished.
|
virtual |
iOS only: Called when a product download is paused.
This may also be called after the application starts, if the download was in a paused state and the application was closed before finishing the download.
Only after the download is finished successfully or cancelled you will stop receiving this callback on startup.
iOS only: Called when a product download finishes (successfully or not).
Call Download::getStatus() to check if the downloaded finished successfully.
It is your responsibility to move the download content into your app directory and to clean up any files that are no longer needed.
After the download is finished, the download object is destroyed and should not be accessed anymore.
References ignoreUnused(), and JUCE_DEPRECATED_WITH_BODY.