ekg2  GIT master
Funkcje | Zmienne
Dokumentacja pliku pubdir.c
#include "ekg2.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <libgadu.h>
#include "gg.h"
#include "misc.h"
Wykres zależności załączania dla pubdir.c:

Funkcje

static int gg_handle_register (int type, int fd, watch_type_t watch, void *data)
 
int gg_command_register (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int gg_handle_unregister (int type, int fd, watch_type_t watch, void *data)
 
int gg_command_unregister (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int gg_handle_passwd (int type, int fd, watch_type_t watch, void *data)
 
int gg_command_passwd (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
static int gg_handle_remind (int type, int fd, watch_type_t watch, void *data)
 
int gg_command_remind (const char *name, const char **params, session_t *session, const char *target, int quiet)
 
int gg_userlist_set (session_t *session, const char *contacts)
 
static char * gg_userlist_dump (session_t *session)
 
int gg_command_list (const char *name, const char **params, session_t *session, const char *target, int quiet)
 

Zmienne

list_t gg_reminds = NULL
 
list_t gg_registers = NULL
 
list_t gg_unregisters = NULL
 
int gg_register_done = 0
 
char * gg_register_password = NULL
 
char * gg_register_email = NULL
 

Dokumentacja funkcji

◆ gg_command_list()

int gg_command_list ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

◆ gg_command_passwd()

int gg_command_passwd ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

gg_command_passwd()

It's used to change password on gg server.
Handler for: /gg:passwd command.

Parametry
params[0] - New password
params[1] - Text from token [only needed when HAVE_GG_CHANGE_PASSWD4 is defined]
Do zrobienia:
Add support for really old libgadu functions? like: gg_change_passwd2() ?
Zwraca
0 on sucess, else -1

◆ gg_command_register()

int gg_command_register ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

◆ gg_command_remind()

int gg_command_remind ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

◆ gg_command_unregister()

int gg_command_unregister ( const char *  name,
const char **  params,
session_t session,
const char *  target,
int  quiet 
)

◆ gg_handle_passwd()

static int gg_handle_passwd ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)
static

gg_handle_passwd()

Watch used to change password
We send asynchrous request for change password @ gg_command_passwd() If it success, than this watch is created.
Here we wait for server reply, and if it success we set new password in session variable.

Do zrobienia:
Need rewriting, it's buggy. We don't free memory @ type == 1, when watch wasn't executed... We always create watch @ not GG_STATE_DONE, even if there's no need, and maybe more. XXX
Zwraca
-1 [TEMPORARY WATCH]

◆ gg_handle_register()

static int gg_handle_register ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)
static

◆ gg_handle_remind()

static int gg_handle_remind ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)
static

◆ gg_handle_unregister()

static int gg_handle_unregister ( int  type,
int  fd,
watch_type_t  watch,
void *  data 
)
static

◆ gg_userlist_dump()

static char* gg_userlist_dump ( session_t session)
static

◆ gg_userlist_set()

int gg_userlist_set ( session_t session,
const char *  contacts 
)

Dokumentacja zmiennych

◆ gg_register_done

int gg_register_done = 0

◆ gg_register_email

char* gg_register_email = NULL

◆ gg_register_password

char* gg_register_password = NULL

◆ gg_registers

list_t gg_registers = NULL

◆ gg_reminds

list_t gg_reminds = NULL

◆ gg_unregisters

list_t gg_unregisters = NULL