Skylicht Engine
Toggle main menu visibility
Loading...
Searching...
No Matches
StorePurchase
IStoreController.h
1
#pragma once
2
3
#include <vector>
4
#include <string>
5
#include "SIAPProduct.h"
6
7
class
IStoreListener
;
8
9
namespace
Skylicht
10
{
11
class
IStoreController
12
{
13
protected
:
14
std::vector<IStoreListener*> m_listener;
15
16
bool
m_isInitialized;
17
18
public
:
19
IStoreController();
20
21
virtual
~IStoreController();
22
23
void
addListener(
IStoreListener
* listener);
24
25
void
removeListener(
IStoreListener
* listener);
26
27
virtual
void
init() = 0;
28
29
virtual
void
restorePurchase() = 0;
30
31
virtual
void
restart() = 0;
32
33
virtual
void
initiatePurchase(
const
char
* productId) = 0;
34
35
virtual
void
fetchAdditionalProducts(
const
std::vector<std::string>& productIds) = 0;
36
37
inline
bool
isInitialized() {
return
m_isInitialized; }
38
39
public
:
40
void
notifyInitialized();
41
42
void
notifyProductReceived(
const
std::vector<SIAPProduct>& products);
43
44
void
notifyFetchProductFailed(
int
error,
const
char
* message);
45
46
void
notifyInitializeFailed(
int
error,
const
char
* message);
47
48
void
notifyRestorePurchaseFailed(
int
error,
const
char
* message);
49
50
void
notifyPurchaseSucceeded(
const
char
* productId,
const
char
* receipt);
51
52
void
notifyPurchaseFailed(
const
char
* productId,
int
error,
const
char
* message);
53
};
54
55
IStoreController
* getStoreController(
bool
isTesting =
false
);
56
}
IStoreListener
Definition
IStoreListener.h:8
Skylicht::IStoreController
Definition
IStoreController.h:12
Skylicht
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition
AudioDebugLog.h:29
Generated by
1.17.0