#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
Go to the source code of this file.
Data Structures | |
struct | DATA |
struct | LOGIN |
Functions | |
void | init_login (LOGIN *login) |
void | add_login (LOGIN *login, char *dr, char *db, char *usr, char *pwd) |
int | read_file (LOGIN *login) |
int | write_file (LOGIN *login) |
int | db_set_login (char *driver, char *database, char *user, char *password) |
Set user/password for driver/database. | |
int | db_get_login (char *driver, char *database, char **user, char **password) |
Get user/password for driver/database if driver/database is not found, user/password are set to NULL. |
void add_login | ( | LOGIN * | login, | |
char * | dr, | |||
char * | db, | |||
char * | usr, | |||
char * | pwd | |||
) |
Definition at line 44 of file login.c.
References LOGIN::a, LOGIN::data, DATA::database, DATA::driver, LOGIN::n, DATA::password, and DATA::user.
Referenced by db_set_login(), and read_file().
int db_get_login | ( | char * | driver, | |
char * | database, | |||
char ** | user, | |||
char ** | password | |||
) |
Get user/password for driver/database if driver/database is not found, user/password are set to NULL.
DB_FAILED
Definition at line 199 of file login.c.
References LOGIN::data, DATA::database, DATA::driver, init_login(), LOGIN::n, DATA::password, read_file(), and DATA::user.
int db_set_login | ( | char * | driver, | |
char * | database, | |||
char * | user, | |||
char * | password | |||
) |
Set user/password for driver/database.
DB_FAILED
Definition at line 153 of file login.c.
References add_login(), LOGIN::data, DATA::database, DATA::driver, init_login(), LOGIN::n, DATA::password, read_file(), DATA::user, and write_file().
void init_login | ( | LOGIN * | login | ) |
Definition at line 35 of file login.c.
References LOGIN::a, LOGIN::data, and LOGIN::n.
Referenced by db_get_login(), and db_set_login().
int read_file | ( | LOGIN * | login | ) |
Definition at line 64 of file login.c.
References add_login(), and LOGIN::n.
Referenced by db_get_login(), and db_set_login().
int write_file | ( | LOGIN * | login | ) |
Definition at line 113 of file login.c.
References LOGIN::data, DATA::database, DATA::driver, LOGIN::n, DATA::password, and DATA::user.
Referenced by db_set_login().