psphttp.h

Go to the documentation of this file.
00001 /*
00002  * PSP Software Development Kit - http://www.pspdev.org
00003  * -----------------------------------------------------------------------
00004  * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
00005  *
00006  * psphttp.h - Interface to the http library.
00007  *
00008  * Copyright (c) 2008 David Perry (InsertWittyName)
00009  * Copyright (c) 2008 moonlight
00010  *
00011  */
00012  
00013 #ifndef __PSPHTTP_H__
00014 #define __PSPHTTP_H__
00015 
00016 #if defined(__cplusplus)
00017 extern "C" {
00018 #endif
00019 
00020 typedef enum
00021 {
00022         PSP_HTTP_METHOD_GET,
00023         PSP_HTTP_METHOD_POST,
00024         PSP_HTTP_METHOD_HEAD
00025         
00026 } PspHttpMethod;
00027 
00034 int sceHttpInit(unsigned int unknown1);
00035 
00041 int sceHttpEnd(void);
00042 
00051 int sceHttpCreateTemplate(char *agent, int unknown1, int unknown2);
00052 
00059 int sceHttpDeleteTemplate(int templateid);
00060 
00071 int sceHttpCreateConnection(int templateid, char *host, char *unknown1, unsigned short port, int unknown2);
00072 
00081 int sceHttpCreateConnectionWithURL(int templateid, const char *url, int unknown1);
00082 
00089 int sceHttpDeleteConnection(int connectionid);
00090 
00100 int sceHttpCreateRequest(int connectionid, PspHttpMethod method, char *path, SceULong64 contentlength);
00101 
00111 int sceHttpCreateRequestWithURL(int connectionid, PspHttpMethod method, char *url, SceULong64 contentlength);
00112 
00119 int sceHttpDeleteRequest(int requestid);
00120 
00129 int sceHttpSendRequest(int requestid, void *data, unsigned int datasize);
00130 
00137 int sceHttpAbortRequest(int requestid);
00138 
00147 int sceHttpReadData(int requestid, void *data, unsigned int datasize);
00148 
00156 int sceHttpGetContentLength(int requestid, SceULong64 *contentlength);
00157 
00165 int sceHttpGetStatusCode(int requestid, int *statuscode);
00166 
00174 int sceHttpSetResolveTimeOut(int id, unsigned int timeout);
00175 
00183 int sceHttpSetResolveRetry(int id, int count);
00184 
00192 int sceHttpSetConnectTimeOut(int id, unsigned int timeout);
00193 
00201 int sceHttpSetSendTimeOut(int id, unsigned int timeout);
00202 
00210 int sceHttpSetRecvTimeOut(int id, unsigned int timeout);
00211 
00218 int sceHttpEnableKeepAlive(int id);
00219 
00226 int sceHttpDisableKeepAlive(int id);
00227 
00234 int sceHttpEnableRedirect(int id);
00235 
00242 int sceHttpDisableRedirect(int id);
00243 
00250 int sceHttpEnableCookie(int id);
00251 
00258 int sceHttpDisableCookie(int id);
00259 
00265 int sceHttpSaveSystemCookie(void);
00266 
00272 int sceHttpLoadSystemCookie(void);
00273 
00283 int sceHttpAddExtraHeader(int id, char *name, char *value, int unknown1);
00284 
00292 int sceHttpDeleteHeader(int id, const char *name);
00293 
00304 int sceHttpsInit(int unknown1, int unknown2, int unknown3, int unknown4);
00305 
00311 int sceHttpsEnd(void);
00312 
00320 int sceHttpsLoadDefaultCert(int unknown1, int unknown2);
00321 
00322 #if defined(__cplusplus)
00323 };
00324 #endif
00325 
00326 #endif