2009-11-02 23:15:28 +01:00
|
|
|
/****************************************************************************
|
|
|
|
* Network Operations
|
|
|
|
* for USB Loader GX
|
|
|
|
*
|
|
|
|
* HTTP operations
|
|
|
|
* Written by dhewg/bushing modified by dimok
|
|
|
|
****************************************************************************/
|
2009-06-17 22:44:00 +02:00
|
|
|
#ifndef _NETWORKOPS_H_
|
2009-11-02 23:15:28 +01:00
|
|
|
#define _NETWORKOPS_H_
|
|
|
|
|
|
|
|
#define NETWORKBLOCKSIZE 5*1024 //5KB
|
2010-09-24 02:48:03 +02:00
|
|
|
void Initialize_Network(void);
|
2010-12-05 20:24:32 +01:00
|
|
|
void DeinitNetwork(void);
|
2010-09-24 02:48:03 +02:00
|
|
|
bool IsNetworkInit(void);
|
|
|
|
char * GetNetworkIP(void);
|
|
|
|
char * GetIncommingIP(void);
|
2009-11-02 23:15:28 +01:00
|
|
|
bool ShutdownWC24();
|
2011-01-25 21:19:15 +01:00
|
|
|
bool CheckConnection(const char *url, float timeout = 5.0f);
|
2010-12-03 19:38:57 +01:00
|
|
|
s32 network_request(s32 connection, const char * request, char * filename);
|
|
|
|
s32 network_read(s32 connection, u8 *buf, u32 len);
|
2010-09-24 02:48:03 +02:00
|
|
|
s32 download_request(const char * url, char * filename = NULL);
|
2009-11-02 23:15:28 +01:00
|
|
|
void CloseConnection();
|
2010-12-03 19:38:57 +01:00
|
|
|
char * HEAD_Request(const char * url);
|
2009-11-02 23:15:28 +01:00
|
|
|
void HaltNetworkThread();
|
|
|
|
void ResumeNetworkWait();
|
|
|
|
void ResumeNetworkThread();
|
|
|
|
void InitNetworkThread();
|
|
|
|
void ShutdownNetworkThread();
|
|
|
|
|
2009-05-28 14:12:52 +02:00
|
|
|
#endif
|