440 |
void guile_section_init(void); |
void guile_section_init(void); |
441 |
#endif /* WITH_GUILE */ |
#endif /* WITH_GUILE */ |
442 |
|
|
443 |
|
/* url.c */ |
444 |
|
|
445 |
|
typedef struct anubis_url { |
446 |
|
char *method; |
447 |
|
char *host; |
448 |
|
char *path; |
449 |
|
char *user; |
450 |
|
char *passwd; |
451 |
|
int argc; |
452 |
|
ASSOC *argv; |
453 |
|
} ANUBIS_URL; |
454 |
|
|
455 |
|
void anubis_url_destroy(ANUBIS_URL **url); |
456 |
|
int anubis_url_parse(ANUBIS_URL **url, char *str); |
457 |
|
char *anubis_url_full_path(ANUBIS_URL *url); |
458 |
|
const char *anubis_url_get_arg(ANUBIS_URL *url, const char *argname); |
459 |
|
|
460 |
/* anubisdb.c */ |
/* anubisdb.c */ |
461 |
|
|
462 |
typedef struct anubis_user { |
typedef struct anubis_user { |
478 |
#define ANUBIS_DB_NOT_FOUND 2 /* Record not found (for db_get_record |
#define ANUBIS_DB_NOT_FOUND 2 /* Record not found (for db_get_record |
479 |
only) */ |
only) */ |
480 |
|
|
481 |
typedef int (*anubis_db_open_t) (void **d, char *arg, |
typedef int (*anubis_db_open_t) (void **d, ANUBIS_URL *url, |
482 |
enum anubis_db_mode mode); |
enum anubis_db_mode mode); |
483 |
typedef int (*anubis_db_close_t) (void *d); |
typedef int (*anubis_db_close_t) (void *d); |
484 |
typedef int (*anubis_db_io_t) (void *d, char *key, ANUBIS_USER *rec, |
typedef int (*anubis_db_io_t) (void *d, char *key, ANUBIS_USER *rec, |
485 |
int *ecode); |
int *ecode); |
486 |
typedef const char *(*anubis_db_strerror_t) (void *d, int rc); |
typedef const char *(*anubis_db_strerror_t) (void *d, int rc); |
487 |
|
typedef int (*anubis_db_delete_t) (void *d, char *key, int *ecode); |
488 |
|
|
489 |
int anubis_db_register(char *dbid, anubis_db_open_t _db_open, |
int anubis_db_register(char *dbid, anubis_db_open_t _db_open, |
490 |
anubis_db_close_t _db_close, |
anubis_db_close_t _db_close, |
491 |
anubis_db_io_t _db_get, |
anubis_db_io_t _db_get, |
492 |
anubis_db_io_t _db_put, |
anubis_db_io_t _db_put, |
493 |
|
anubis_db_delete_t _db_delete, |
494 |
anubis_db_strerror_t _db_strerror); |
anubis_db_strerror_t _db_strerror); |
495 |
int anubis_db_open(char *dbid, char *arg, |
int anubis_db_open(char *arg, enum anubis_db_mode mode, void **dptr); |
|
enum anubis_db_mode mode, void **dptr); |
|
496 |
int anubis_db_close(void **dptr); |
int anubis_db_close(void **dptr); |
497 |
int anubis_db_get_record(void *dptr, char *key, ANUBIS_USER *rec); |
int anubis_db_get_record(void *dptr, char *key, ANUBIS_USER *rec); |
498 |
int anubis_db_put_record(void *dptr, char *key, ANUBIS_USER *rec); |
int anubis_db_put_record(void *dptr, char *key, ANUBIS_USER *rec); |
499 |
|
int anubis_db_delete_record(void *dptr, char *key); |
500 |
const char *anubis_db_strerror(void *dptr); |
const char *anubis_db_strerror(void *dptr); |
501 |
void anubis_db_free_record(ANUBIS_USER *rec); |
void anubis_db_free_record(ANUBIS_USER *rec); |
502 |
|
|
511 |
|
|
512 |
/* authmode.c */ |
/* authmode.c */ |
513 |
int anubis_authenticate_mode (int sd_client, struct sockaddr_in *addr); |
int anubis_authenticate_mode (int sd_client, struct sockaddr_in *addr); |
514 |
void anubis_set_password_db (char *type, char *arg); |
void anubis_set_password_db (char *arg); |
515 |
void asmtp_reply(int code, char *fmt, ...); |
void asmtp_reply(int code, char *fmt, ...); |
516 |
void asmtp_capa_add_prefix(char *prefix, char *name); |
void asmtp_capa_add_prefix(char *prefix, char *name); |
517 |
int anubis_get_db_record(char *username, ANUBIS_USER *usr); |
int anubis_get_db_record(char *username, ANUBIS_USER *usr); |