-
Notifications
You must be signed in to change notification settings - Fork 2
/
Fortumo.s4e
80 lines (64 loc) · 4.92 KB
/
Fortumo.s4e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
include:
#include <s3eTypes.h>
struct Fortumo_PaymentRequest;
struct Fortumo_PaymentResponse;
struct Fortumo_ServiceRequest;
struct Fortumo_ServiceResponse;
enum Fortumo_BillingStatus {
Fortumo_BillingStatus_NotSent = 0,
Fortumo_BillingStatus_Pending = 1,
Fortumo_BillingStatus_Billed = 2,
Fortumo_BillingStatus_Failed = 3,
Fortumo_BillingStatus_UseAlternativeMethod = 4
};
enum Fortumo_ServiceStatus {
Fortumo_ServiceStatus_Unknown = 0,
Fortumo_ServiceStatus_Available = 1,
Fortumo_ServiceStatus_Unavailable = 2
};
enum Fortumo_ServiceType {
Fortumo_ServiceType_Consumable = 0,
Fortumo_ServiceType_NonConsumable = 1,
Fortumo_ServiceType_Subscription = 2
};
typedef void (*Fortumo_Payment_Callback)(Fortumo_PaymentResponse* response, void* userData);
typedef void (*Fortumo_Service_Callback)(Fortumo_ServiceResponse* response, void* userData);
functions:
void Fortumo_SetLoggingEnabled(s3eBool loggingEnabled) run_on_os_thread
void Fortumo_SetStateChangeListener(Fortumo_Payment_Callback callback, void* userData) run_on_os_thread
void Fortumo_FindPayment(Fortumo_PaymentRequest* request, Fortumo_Payment_Callback callback, void* userData) run_on_os_thread
void Fortumo_MakePayment(Fortumo_PaymentRequest* request, Fortumo_Payment_Callback callback, void* userData) run_on_os_thread
Fortumo_PaymentRequest* Fortumo_PaymentRequest_Create() NULL run_on_os_thread
void Fortumo_PaymentRequest_SetService(Fortumo_PaymentRequest* request, const char* serviceId, const char* appSecret) run_on_os_thread
void Fortumo_PaymentRequest_SetConsumable(Fortumo_PaymentRequest* request, s3eBool consumable) run_on_os_thread
void Fortumo_PaymentRequest_SetCreditsMultiplier(Fortumo_PaymentRequest* request, double value) run_on_os_thread
void Fortumo_PaymentRequest_SetDisplayString(Fortumo_PaymentRequest* request, const char* value) run_on_os_thread
void Fortumo_PaymentRequest_SetIcon(Fortumo_PaymentRequest* request, s3e_int32_t iconId) run_on_os_thread
void Fortumo_PaymentRequest_SetPriceAmount(Fortumo_PaymentRequest* request, const char* value) run_on_os_thread
void Fortumo_PaymentRequest_SetPriceCurrency(Fortumo_PaymentRequest* request, const char* value) run_on_os_thread
void Fortumo_PaymentRequest_SetProductName(Fortumo_PaymentRequest* request, const char* value) run_on_os_thread
void Fortumo_PaymentRequest_SetType(Fortumo_PaymentRequest* request, Fortumo_ServiceType type) run_on_os_thread
void Fortumo_PaymentRequest_Delete(Fortumo_PaymentRequest* request) run_on_os_thread
Fortumo_BillingStatus Fortumo_PaymentResponse_GetBillingStatus(Fortumo_PaymentResponse* response) Fortumo_BillingStatus_NotSent run_on_os_thread
const char* Fortumo_PaymentResponse_GetCreditAmount(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetCreditName(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetPaymentCode(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetPriceAmount(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetPriceCurrency(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetProductName(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetMessageId(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetServiceId(Fortumo_PaymentResponse* response) NULL run_on_os_thread
const char* Fortumo_PaymentResponse_GetUserId(Fortumo_PaymentResponse* response) NULL run_on_os_thread
void Fortumo_PaymentResponse_Delete(Fortumo_PaymentResponse* response) run_on_os_thread
Fortumo_ServiceRequest* Fortumo_ServiceRequest_Create() NULL run_on_os_thread
void Fortumo_ServiceRequest_SetService(Fortumo_ServiceRequest* request, const char* serviceId, const char* appSecret) run_on_os_thread
void Fortumo_ServiceRequest_SetTimeout(Fortumo_ServiceRequest* request, s3e_int32_t timeout) run_on_os_thread
void Fortumo_ServiceRequest_Delete(Fortumo_ServiceRequest* request) run_on_os_thread
const char* Fortumo_ServiceResponse_GetServiceId(Fortumo_ServiceResponse* response) NULL run_on_os_thread
Fortumo_ServiceStatus Fortumo_ServiceResponse_GetServiceStatus(Fortumo_ServiceResponse* response) Fortumo_ServiceStatus_Unknown run_on_os_thread
s3e_int32_t Fortumo_ServiceResponse_GetPaymentCount(Fortumo_ServiceResponse* response) 0 run_on_os_thread
Fortumo_PaymentResponse* Fortumo_ServiceResponse_GetPaymentAtIndex(Fortumo_ServiceResponse* response, s3e_int32_t index) NULL run_on_os_thread
void Fortumo_ServiceResponse_Delete(Fortumo_ServiceResponse* response) run_on_os_thread
void Fortumo_FindService(Fortumo_ServiceRequest* request, Fortumo_Service_Callback callback, void* userData) run_on_os_thread
void Fortumo_FindPaymentHistory(Fortumo_ServiceRequest* request, Fortumo_Service_Callback callback, void* userData) run_on_os_thread
append: