summaryrefslogtreecommitdiff
path: root/include/user/np/np_webapi.h
blob: 6ed89083cf3d163d98053902682ff37e7f44cc82 (plain) (blame)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/*
	Vita Development Suite Libraries
*/

#ifndef _VDSUITE_USER_NP_NP_WEBAPI_H
#define _VDSUITE_USER_NP_NP_WEBAPI_H

#include_next <np/np_webapi.h>

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
extern "C" {
#endif  /* defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) */

/* -----------------------------------------------
 * Initialize/Terminate
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntInitialize(
	void *pMemPool,
	size_t poolSize,
	const char *pModuleName
	);

int32_t
sceNpWebApiInitializeForSceShell(
	void *pMemPool,
	size_t poolSize
	);

int32_t
sceNpWebApiIntTerminate(
	int32_t libCtxId
	);

/* -----------------------------------------------
 * Request
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntCreateRequest(
	int32_t libCtxId,
	const char *pApiGroup,
	const char *pPath,
	SceNpWebApiHttpMethod method,
	const SceNpWebApiContentParameter *pContentParameter,
	const char unk[0x410],
	int64_t *pRequestId
	);

/* -----------------------------------------------
 * Memory
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntGetMemoryPoolStats(
	int32_t libCtxId,
	SceNpWebApiMemoryPoolStats *pCurrentStat
	);

/* -----------------------------------------------
 * Handle
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntCreateHandle(
	int32_t libCtxId
	);

int32_t
sceNpWebApiIntDeleteHandle(
	int32_t libCtxId,
	int32_t handleId
	);

int32_t
sceNpWebApiIntAbortHandle(
	int32_t libCtxId,
	int32_t handleId
	);

/* -----------------------------------------------
 * Multi Part
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntCreateMultipartRequest(
	int32_t libCtxId,
	const char *pApiGroup,
	const char *pPath,
	SceNpWebApiHttpMethod method,
	int64_t *pRequestId
	);

/* -----------------------------------------------
 * Push Event
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntCreatePushEventFilter(
	int32_t libCtxId,
	const SceNpWebApiPushEventDataType *pDataType,
	size_t dataTypeNum
	);

int32_t
sceNpWebApiIntDeletePushEventFilter(
	int32_t libCtxId,
	int32_t filterId
	);

int32_t
sceNpWebApiIntRegisterPushEventCallback(
	int32_t libCtxId,
	int32_t filterId,
	SceNpWebApiPushEventCallback cbFunc,
	void *pUserArg
	);

int32_t
sceNpWebApiIntUnregisterPushEventCallback(
	int32_t libCtxId,
	int32_t callbackId
	);

/* -----------------------------------------------
 * Service Push Event
 * ----------------------------------------------- */
int32_t
sceNpWebApiIntCreateServicePushEventFilter(
	int32_t libCtxId,
	int32_t handleId,
	const char *pNpServiceName,
	SceNpServiceLabel npServiceLabel,
	const SceNpWebApiPushEventDataType *pDataType,
	size_t dataTypeNum
	);

int32_t
sceNpWebApiIntDeleteServicePushEventFilter(
	int32_t libCtxId,
	int32_t filterId
	);

int32_t
sceNpWebApiIntRegisterServicePushEventCallback(
	int32_t libCtxId,
	int32_t filterId,
	SceNpWebApiServicePushEventCallback cbFunc,
	void *pUserArg
	);

int32_t
sceNpWebApiIntUnregisterServicePushEventCallback(
	int32_t libCtxId,
	int32_t callbackId
	);

#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
}
#endif  /* defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus) */

#endif /* _VDSUITE_USER_NP_NP_WEBAPI_H */