libgadu  1.12.2
Struktury danych | Definicje typów | Wyliczenia | Funkcje | Zmienne
Dokumentacja pliku events.c

Obsługa zdarzeń Więcej...

Wykres zależności załączania dla events.c:

Struktury danych

struct  gg_state_transition_t
 

Definicje typów

typedef gg_action_t(* gg_state_handler_t) (struct gg_session *gs, struct gg_event *ge, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 

Wyliczenia

enum  gg_action_t {
  GG_ACTION_WAIT ,
  GG_ACTION_NEXT ,
  GG_ACTION_FAIL
}
 

Funkcje

void gg_event_free (struct gg_event *e)
 Zwalnia pamięć zajmowaną przez informację o zdarzeniu. Więcej...
 
int gg_session_init_ssl (struct gg_session *gs)
 
static int gg_send_queued_data (struct gg_session *sess)
 
static int gg_async_connect_failed (struct gg_session *gs, int *res_ptr)
 
static int gg_handle_resolve_custom (struct gg_session *sess, enum gg_state_t next_state)
 
static gg_action_t gg_handle_resolve_sync (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_resolve_async (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_resolving (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_connect (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_connecting (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_connect_gg (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_connecting_gg (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_send_hub (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_sending_hub_proxy (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_reading_hub_proxy (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_send_proxy_gg (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_tls_negotiation (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_reading_proxy_gg (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_connected (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
static gg_action_t gg_handle_error (struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)
 
struct gg_eventgg_eventqueue_add (struct gg_session *sess)
 
struct gg_eventgg_watch_fd (struct gg_session *sess)
 Funkcja wywoływana po zaobserwowaniu zmian na deskryptorze sesji. Więcej...
 

Zmienne

static const gg_state_transition_t handlers []
 

Opis szczegółowy

Obsługa zdarzeń

Do zrobienia:
Poprawna obsługa gg_proxy_http_only

Dokumentacja definicji typów

◆ gg_state_handler_t

typedef gg_action_t(* gg_state_handler_t) (struct gg_session *gs, struct gg_event *ge, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state)

Dokumentacja typów wyliczanych

◆ gg_action_t

Wartości wyliczeń
GG_ACTION_WAIT 
GG_ACTION_NEXT 
GG_ACTION_FAIL 

Dokumentacja funkcji

◆ gg_session_init_ssl()

int gg_session_init_ssl ( struct gg_session gs)

Inicjalizuje struktury SSL.

Parametry
gsStruktura sesji
Zwraca
0 jeśli się powiodło, -1 jeśli wystąpił błąd

◆ gg_send_queued_data()

static int gg_send_queued_data ( struct gg_session sess)
static

Funkcja próbuje wysłać dane zakolejkowane do wysyłki.

Parametry
sessStruktura sesji
Zwraca
0 jeśli się powiodło, -1 jeśli wystąpił błąd

◆ gg_async_connect_failed()

static int gg_async_connect_failed ( struct gg_session gs,
int *  res_ptr 
)
static

Sprawdza wynik połączenia asynchronicznego.

Parametry
gsStruktura sesji
res_ptrWskaźnik na kod błędu
Zwraca
0 jeśli się powiodło, -1 jeśli wystąpił błąd

◆ gg_handle_resolve_custom()

static int gg_handle_resolve_custom ( struct gg_session sess,
enum gg_state_t  next_state 
)
static

◆ gg_handle_resolve_sync()

static gg_action_t gg_handle_resolve_sync ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_resolve_async()

static gg_action_t gg_handle_resolve_async ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_resolving()

static gg_action_t gg_handle_resolving ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_connect()

static gg_action_t gg_handle_connect ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_connecting()

static gg_action_t gg_handle_connecting ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_connect_gg()

static gg_action_t gg_handle_connect_gg ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_connecting_gg()

static gg_action_t gg_handle_connecting_gg ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_send_hub()

static gg_action_t gg_handle_send_hub ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_sending_hub_proxy()

static gg_action_t gg_handle_sending_hub_proxy ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_reading_hub_proxy()

static gg_action_t gg_handle_reading_hub_proxy ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_send_proxy_gg()

static gg_action_t gg_handle_send_proxy_gg ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_tls_negotiation()

static gg_action_t gg_handle_tls_negotiation ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_reading_proxy_gg()

static gg_action_t gg_handle_reading_proxy_gg ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_connected()

static gg_action_t gg_handle_connected ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_handle_error()

static gg_action_t gg_handle_error ( struct gg_session sess,
struct gg_event e,
enum gg_state_t  next_state,
enum gg_state_t  alt_state,
enum gg_state_t  alt2_state 
)
static

◆ gg_eventqueue_add()

struct gg_event* gg_eventqueue_add ( struct gg_session sess)

Dokumentacja zmiennych

◆ handlers

const gg_state_transition_t handlers[]
static