GebrCommProtocolSocket

GebrCommProtocolSocket

Synopsis

#define             GEBR_COMM_PROTOCOL_SOCKET_TYPE
                    GebrCommProtocolSocket;
                    GebrCommProtocolSocketPrivate;
                    GebrCommProtocolSocketClass;
GebrCommProtocolSocket * gebr_comm_protocol_socket_new  (void);
GebrCommProtocolSocket * gebr_comm_protocol_socket_new_from_socket
                                                        (GebrCommStreamSocket *socket);
gboolean            gebr_comm_protocol_socket_connect   (GebrCommProtocolSocket *self,
                                                         GebrCommSocketAddress *socket_address,
                                                         gboolean wait);
void                gebr_comm_protocol_socket_disconnect
                                                        (GebrCommProtocolSocket *self);
GebrCommHttpMsg *   gebr_comm_protocol_socket_send_request
                                                        (GebrCommProtocolSocket *self,
                                                         GebrCommHttpRequestMethod method,
                                                         const gchar *url,
                                                         GebrCommJsonContent *content);
void                gebr_comm_protocol_socket_send_response
                                                        (GebrCommProtocolSocket *self,
                                                         int status_code,
                                                         GebrCommJsonContent *content);
void                gebr_comm_protocol_socket_resend_message
                                                        (GebrCommProtocolSocket *self,
                                                         gboolean blocking,
                                                         struct gebr_comm_message *message);
void                gebr_comm_protocol_socket_oldmsg_send
                                                        (GebrCommProtocolSocket *self,
                                                         gboolean blocking,
                                                         struct gebr_comm_message_def gebr_comm_message_def,
                                                         guint n_params,
                                                         ...);
void                gebr_comm_protocol_socket_return_message
                                                        (GebrCommProtocolSocket *self,
                                                         gboolean blocking,
                                                         struct gebr_comm_message_def ret_msg,
                                                         guint n_params,
                                                         ...);
GList *             gebr_comm_protocol_socket_oldmsg_split
                                                        (GString *arguments,
                                                         guint parts);
void                gebr_comm_protocol_socket_oldmsg_split_free
                                                        (GList *split);

Object Hierarchy

  GObject
   +----GebrCommProtocolSocket

Properties

  "stream-socket"            gpointer              : Read / Write / Construct Only

Signals

  "connected"                                      : Run Last / Action
  "disconnected"                                   : Run Last / Action
  "old-parse-messages"                             : Run Last / Action
  "process-request"                                : Run Last / Action
  "process-response"                               : Run Last / Action

Description

Details

GEBR_COMM_PROTOCOL_SOCKET_TYPE

#define GEBR_COMM_PROTOCOL_SOCKET_TYPE		(gebr_comm_protocol_socket_get_type())

GebrCommProtocolSocket

typedef struct _GebrCommProtocolSocket GebrCommProtocolSocket;

GebrCommProtocolSocketPrivate

typedef struct _GebrCommProtocolSocketPrivate GebrCommProtocolSocketPrivate;

GebrCommProtocolSocketClass

typedef struct {
	GObjectClass parent;

	/* signals */
	void (*connected)(GebrCommProtocolSocket *socket);
	void (*disconnected)(GebrCommProtocolSocket *socket);
	void (*process_request)(GebrCommProtocolSocket *socket, GebrCommHttpMsg * request);
	void (*process_response)(GebrCommProtocolSocket *socket, GebrCommHttpMsg * request, GebrCommHttpMsg * response);
	void (*old_parse_messages)(GebrCommProtocolSocket *socket);
} GebrCommProtocolSocketClass;

gebr_comm_protocol_socket_new ()

GebrCommProtocolSocket * gebr_comm_protocol_socket_new  (void);

gebr_comm_protocol_socket_new_from_socket ()

GebrCommProtocolSocket * gebr_comm_protocol_socket_new_from_socket
                                                        (GebrCommStreamSocket *socket);

gebr_comm_protocol_socket_connect ()

gboolean            gebr_comm_protocol_socket_connect   (GebrCommProtocolSocket *self,
                                                         GebrCommSocketAddress *socket_address,
                                                         gboolean wait);

gebr_comm_protocol_socket_disconnect ()

void                gebr_comm_protocol_socket_disconnect
                                                        (GebrCommProtocolSocket *self);

gebr_comm_protocol_socket_send_request ()

GebrCommHttpMsg *   gebr_comm_protocol_socket_send_request
                                                        (GebrCommProtocolSocket *self,
                                                         GebrCommHttpRequestMethod method,
                                                         const gchar *url,
                                                         GebrCommJsonContent *content);

gebr_comm_protocol_socket_send_response ()

void                gebr_comm_protocol_socket_send_response
                                                        (GebrCommProtocolSocket *self,
                                                         int status_code,
                                                         GebrCommJsonContent *content);

gebr_comm_protocol_socket_resend_message ()

void                gebr_comm_protocol_socket_resend_message
                                                        (GebrCommProtocolSocket *self,
                                                         gboolean blocking,
                                                         struct gebr_comm_message *message);

gebr_comm_protocol_socket_oldmsg_send ()

void                gebr_comm_protocol_socket_oldmsg_send
                                                        (GebrCommProtocolSocket *self,
                                                         gboolean blocking,
                                                         struct gebr_comm_message_def gebr_comm_message_def,
                                                         guint n_params,
                                                         ...);

gebr_comm_protocol_socket_return_message ()

void                gebr_comm_protocol_socket_return_message
                                                        (GebrCommProtocolSocket *self,
                                                         gboolean blocking,
                                                         struct gebr_comm_message_def ret_msg,
                                                         guint n_params,
                                                         ...);

gebr_comm_protocol_socket_oldmsg_split ()

GList *             gebr_comm_protocol_socket_oldmsg_split
                                                        (GString *arguments,
                                                         guint parts);

gebr_comm_protocol_socket_oldmsg_split_free ()

void                gebr_comm_protocol_socket_oldmsg_split_free
                                                        (GList *split);

Property Details

The "stream-socket" property

  "stream-socket"            gpointer              : Read / Write / Construct Only

Signal Details

The "connected" signal

void                user_function                      (GebrCommProtocolSocket *gebrcommprotocolsocket,
                                                        gpointer                user_data)                   : Run Last / Action

The "disconnected" signal

void                user_function                      (GebrCommProtocolSocket *gebrcommprotocolsocket,
                                                        gpointer                user_data)                   : Run Last / Action

The "old-parse-messages" signal

void                user_function                      (GebrCommProtocolSocket *gebrcommprotocolsocket,
                                                        gpointer                user_data)                   : Run Last / Action

The "process-request" signal

void                user_function                      (GebrCommProtocolSocket *gebrcommprotocolsocket,
                                                        gpointer                arg1,
                                                        gpointer                user_data)                   : Run Last / Action

The "process-response" signal

void                user_function                      (GebrCommProtocolSocket *gebrcommprotocolsocket,
                                                        gpointer                arg1,
                                                        gpointer                arg2,
                                                        gpointer                user_data)                   : Run Last / Action