GebrCommHttpMsg

GebrCommHttpMsg

Synopsis

#define             GEBR_COMM_HTTP_MSG_TYPE
enum                GebrCommHttpRequestType;
enum                GebrCommHttpRequestMethod;
struct              GebrCommHttpMsg;
struct              GebrCommHttpMsgClass;
GebrCommHttpMsg *   gebr_comm_http_msg_new              (GebrCommHttpRequestType type,
                                                         GebrCommHttpRequestMethod method);
GebrCommHttpMsg *   gebr_comm_http_msg_new_parsing      (GebrCommHttpMsg *partial,
                                                         GString *data);
GebrCommHttpMsg *   gebr_comm_http_msg_new_request      (GebrCommHttpRequestMethod method,
                                                         const gchar *url,
                                                         GHashTable *headers,
                                                         const gchar *content);
GebrCommHttpMsg *   gebr_comm_http_msg_new_response     (gint status_code,
                                                         GHashTable *headers,
                                                         const gchar *content);
void                gebr_comm_http_msg_free             (GebrCommHttpMsg *msg);
void                gebr_comm_http_msg_response_received
                                                        (GebrCommHttpMsg *request,
                                                         GebrCommHttpMsg *response);

Object Hierarchy

  GObject
   +----GebrCommHttpMsg

Signals

  "response-received"                              : Action

Description

Details

GEBR_COMM_HTTP_MSG_TYPE

#define GEBR_COMM_HTTP_MSG_TYPE		(gebr_comm_http_msg_get_type())

enum GebrCommHttpRequestType

typedef enum {
	GEBR_COMM_HTTP_TYPE_UNKNOWN = 0,
	GEBR_COMM_HTTP_TYPE_REQUEST,
	GEBR_COMM_HTTP_TYPE_RESPONSE,
} GebrCommHttpRequestType;

enum GebrCommHttpRequestMethod

typedef enum {
	GEBR_COMM_HTTP_METHOD_UNKNOWN = 0,
	GEBR_COMM_HTTP_METHOD_GET,
	GEBR_COMM_HTTP_METHOD_PUT,
	GEBR_COMM_HTTP_METHOD_POST,
	GEBR_COMM_HTTP_METHOD_DELETE,
} GebrCommHttpRequestMethod;

struct GebrCommHttpMsg

struct GebrCommHttpMsg;

struct GebrCommHttpMsgClass

struct GebrCommHttpMsgClass {
	GObjectClass parent;
/**
 * This is the callback descriptor for the "response-recived" signal.
 * Explanation: First the client sends a message to the server,
 * (\see gebr_comm_protocol_socket_send_request). Then, after
 * processsing the message, the server sends an response to the
 * client. When the client recieves this response, it will trigger
 * the "response-recieved" signal (this signal is emitted by the 
 * http request object).
 *
 * @Parameters:
 * request: This is the http-request object who emitted the signal.
 * response:  This is an http-response message, that cames with server response data.
 * Being this data "requested" by the http-request message. The response may contain
 * error information.
 *
 */
	void (*response_received)(GebrCommHttpMsg *request, GebrCommHttpMsg *response);
};

gebr_comm_http_msg_new ()

GebrCommHttpMsg *   gebr_comm_http_msg_new              (GebrCommHttpRequestType type,
                                                         GebrCommHttpRequestMethod method);

gebr_comm_http_msg_new_parsing ()

GebrCommHttpMsg *   gebr_comm_http_msg_new_parsing      (GebrCommHttpMsg *partial,
                                                         GString *data);

gebr_comm_http_msg_new_request ()

GebrCommHttpMsg *   gebr_comm_http_msg_new_request      (GebrCommHttpRequestMethod method,
                                                         const gchar *url,
                                                         GHashTable *headers,
                                                         const gchar *content);

gebr_comm_http_msg_new_response ()

GebrCommHttpMsg *   gebr_comm_http_msg_new_response     (gint status_code,
                                                         GHashTable *headers,
                                                         const gchar *content);

gebr_comm_http_msg_free ()

void                gebr_comm_http_msg_free             (GebrCommHttpMsg *msg);

gebr_comm_http_msg_response_received ()

void                gebr_comm_http_msg_response_received
                                                        (GebrCommHttpMsg *request,
                                                         GebrCommHttpMsg *response);

Signal Details

The "response-received" signal

void                user_function                      (GebrCommHttpMsg *gebrcommhttpmsg,
                                                        gpointer         arg1,
                                                        gpointer         user_data)            : Action