RetroArch
Classes | Enumerations | Functions | Variables
net_http.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <net/net_http.h>
#include <net/net_compat.h>
#include <net/net_socket.h>
#include <compat/strl.h>
#include <string/stdstring.h>
#include <retro_common_api.h>
#include <retro_miscellaneous.h>
Include dependency graph for net_http.c:

Classes

struct  http_socket_state_t
 
struct  http_t
 
struct  http_connection_t
 

Enumerations

enum  {
  P_HEADER_TOP = 0, P_HEADER, P_BODY, P_BODY_CHUNKLEN,
  P_DONE, P_ERROR
}
 
enum  { T_FULL = 0, T_LEN, T_CHUNK }
 

Functions

void urlencode_lut_init (void)
 
void net_http_urlencode (char **dest, const char *source)
 
void net_http_urlencode_full (char *dest, const char *source, size_t size)
 
static int net_http_new_socket (struct http_connection_t *conn)
 
static void net_http_send_str (struct http_socket_state_t *sock_state, bool *error, const char *text)
 
struct http_connection_tnet_http_connection_new (const char *url, const char *method, const char *data)
 
bool net_http_connection_iterate (struct http_connection_t *conn)
 
bool net_http_connection_done (struct http_connection_t *conn)
 
void net_http_connection_free (struct http_connection_t *conn)
 
const char * net_http_connection_url (struct http_connection_t *conn)
 
struct http_tnet_http_new (struct http_connection_t *conn)
 
int net_http_fd (struct http_t *state)
 
bool net_http_update (struct http_t *state, size_t *progress, size_t *total)
 
int net_http_status (struct http_t *state)
 
uint8_tnet_http_data (struct http_t *state, size_t *len, bool accept_error)
 
void net_http_delete (struct http_t *state)
 
bool net_http_error (struct http_t *state)
 

Variables

static char urlencode_lut [256]
 
static bool urlencode_lut_inited = false
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
P_HEADER_TOP 
P_HEADER 
P_BODY 
P_BODY_CHUNKLEN 
P_DONE 
P_ERROR 

◆ anonymous enum

anonymous enum
Enumerator
T_FULL 
T_LEN 
T_CHUNK 

Function Documentation

◆ net_http_connection_done()

bool net_http_connection_done ( struct http_connection_t conn)
Here is the caller graph for this function:

◆ net_http_connection_free()

void net_http_connection_free ( struct http_connection_t conn)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_connection_iterate()

bool net_http_connection_iterate ( struct http_connection_t conn)
Here is the caller graph for this function:

◆ net_http_connection_new()

struct http_connection_t* net_http_connection_new ( const char *  url,
const char *  method,
const char *  data 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_connection_url()

const char* net_http_connection_url ( struct http_connection_t conn)

◆ net_http_data()

uint8_t* net_http_data ( struct http_t state,
size_t *  len,
bool  accept_error 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_delete()

void net_http_delete ( struct http_t state)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_error()

bool net_http_error ( struct http_t state)
Here is the caller graph for this function:

◆ net_http_fd()

int net_http_fd ( struct http_t state)

◆ net_http_new()

struct http_t* net_http_new ( struct http_connection_t conn)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_new_socket()

static int net_http_new_socket ( struct http_connection_t conn)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_send_str()

static void net_http_send_str ( struct http_socket_state_t sock_state,
bool error,
const char *  text 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_status()

int net_http_status ( struct http_t state)

◆ net_http_update()

bool net_http_update ( struct http_t state,
size_t *  progress,
size_t *  total 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_urlencode()

void net_http_urlencode ( char **  dest,
const char *  source 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ net_http_urlencode_full()

void net_http_urlencode_full ( char *  dest,
const char *  source,
size_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ urlencode_lut_init()

void urlencode_lut_init ( void  )
Here is the caller graph for this function:

Variable Documentation

◆ urlencode_lut

char urlencode_lut[256]
static

◆ urlencode_lut_inited

bool urlencode_lut_inited = false
static