Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
http_server.h File Reference
#include <libsoup/soup.h>
+ Include dependency graph for http_server.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dt_http_server_t
 

Typedefs

typedef gboolean(* dt_http_server_callback) (GHashTable *query, gpointer user_data)
 
typedef struct dt_http_server_t dt_http_server_t
 

Functions

dt_http_server_tdt_http_server_create (const int *ports, const int n_ports, const char *id, const dt_http_server_callback callback, gpointer user_data)
 
void dt_http_server_kill (dt_http_server_t *server)
 

Typedef Documentation

◆ dt_http_server_callback

typedef gboolean(* dt_http_server_callback) (GHashTable *query, gpointer user_data)

◆ dt_http_server_t

Function Documentation

◆ dt_http_server_create()

dt_http_server_t * dt_http_server_create ( const int *  ports,
const int  n_ports,
const char *  id,
const dt_http_server_callback  callback,
gpointer  user_data 
)

create a new http server, listening on one of the ports and using id as its path. the final url can be taken from the returned struct. when a connection is made the callback is called.

References _new_connection(), DT_DEBUG_CONTROL, dt_print(), dt_http_server_t::server, and dt_http_server_t::url.

◆ dt_http_server_kill()

void dt_http_server_kill ( dt_http_server_t server)

call this to kill a server manually. don't call this if the request was received. this also frees server.

References dt_http_server_t::server, and dt_http_server_t::url.

Referenced by _request_finished_callback().