![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include <glib/gi18n.h>
#include <stdio.h>
#include <stdlib.h>
#include "common/darktable.h"
#include "common/http_server.h"
Data Structures | |
struct | _connection_t |
Macros | |
#define | SOUP_CHECK_VERSION(x, y, z) false |
#define | OLD_API |
Typedefs | |
typedef struct _connection_t | _connection_t |
Functions | |
static void | _request_finished_callback (SoupServer *server, SoupMessage *message, SoupClientContext *client, gpointer user_data) |
static void | _new_connection (SoupServer *server, SoupMessage *msg, const char *path, GHashTable *query, SoupClientContext *client, gpointer user_data) |
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) |
void | dt_http_server_kill (dt_http_server_t *server) |
Variables | |
static const char | reply [] |
#define OLD_API |
#define SOUP_CHECK_VERSION | ( | x, | |
y, | |||
z | |||
) | false |
typedef struct _connection_t _connection_t |
|
static |
References _request_finished_callback(), reply, and TRUE.
Referenced by dt_http_server_create().
|
static |
References dt_http_server_kill().
Referenced by _new_connection().
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.
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().
|
static |
Referenced by _new_connection().