pspsdk-1.0+beta2
psphttp.h
Go to the documentation of this file.
1 /*
2  * PSP Software Development Kit - http://www.pspdev.org
3  * -----------------------------------------------------------------------
4  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5  *
6  * psphttp.h - Interface to the http library.
7  *
8  * Copyright (c) 2008 David Perry (InsertWittyName)
9  * Copyright (c) 2008 moonlight
10  *
11  */
12 
13 #ifndef __PSPHTTP_H__
14 #define __PSPHTTP_H__
15 
16 #if defined(__cplusplus)
17 extern "C" {
18 #endif
19 
20 typedef enum
21 {
25 
27 
34 int sceHttpInit(unsigned int unknown1);
35 
41 int sceHttpEnd(void);
42 
51 int sceHttpCreateTemplate(char *agent, int unknown1, int unknown2);
52 
59 int sceHttpDeleteTemplate(int templateid);
60 
71 int sceHttpCreateConnection(int templateid, char *host, char *unknown1, unsigned short port, int unknown2);
72 
81 int sceHttpCreateConnectionWithURL(int templateid, const char *url, int unknown1);
82 
89 int sceHttpDeleteConnection(int connectionid);
90 
100 int sceHttpCreateRequest(int connectionid, PspHttpMethod method, char *path, SceULong64 contentlength);
101 
111 int sceHttpCreateRequestWithURL(int connectionid, PspHttpMethod method, char *url, SceULong64 contentlength);
112 
119 int sceHttpDeleteRequest(int requestid);
120 
129 int sceHttpSendRequest(int requestid, void *data, unsigned int datasize);
130 
137 int sceHttpAbortRequest(int requestid);
138 
147 int sceHttpReadData(int requestid, void *data, unsigned int datasize);
148 
156 int sceHttpGetContentLength(int requestid, SceULong64 *contentlength);
157 
165 int sceHttpGetStatusCode(int requestid, int *statuscode);
166 
174 int sceHttpSetResolveTimeOut(int id, unsigned int timeout);
175 
183 int sceHttpSetResolveRetry(int id, int count);
184 
192 int sceHttpSetConnectTimeOut(int id, unsigned int timeout);
193 
201 int sceHttpSetSendTimeOut(int id, unsigned int timeout);
202 
210 int sceHttpSetRecvTimeOut(int id, unsigned int timeout);
211 
218 int sceHttpEnableKeepAlive(int id);
219 
226 int sceHttpDisableKeepAlive(int id);
227 
234 int sceHttpEnableRedirect(int id);
235 
242 int sceHttpDisableRedirect(int id);
243 
250 int sceHttpEnableCookie(int id);
251 
258 int sceHttpDisableCookie(int id);
259 
265 int sceHttpSaveSystemCookie(void);
266 
272 int sceHttpLoadSystemCookie(void);
273 
283 int sceHttpAddExtraHeader(int id, char *name, char *value, int unknown1);
284 
292 int sceHttpDeleteHeader(int id, const char *name);
293 
304 int sceHttpsInit(int unknown1, int unknown2, int unknown3, int unknown4);
305 
311 int sceHttpsEnd(void);
312 
320 int sceHttpsLoadDefaultCert(int unknown1, int unknown2);
321 
322 #if defined(__cplusplus)
323 };
324 #endif
325 
326 #endif