GRASS GIS 8 Programmer's Manual
8.2.2dev(2023)-3d2c704037
|
DBMI Library (base) - login settings. More...
#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>
#include <grass/glocale.h>
Go to the source code of this file.
Functions | |
int | db_set_login (const char *driver, const char *database, const char *user, const char *password) |
Set login parameters for driver/database. More... | |
int | db_set_login2 (const char *driver, const char *database, const char *user, const char *password, const char *host, const char *port, int overwrite) |
Set login parameters for driver/database. More... | |
int | db_get_login (const char *driver, const char *database, const char **user, const char **password) |
Get login parameters for driver/database. More... | |
int | db_get_login2 (const char *driver, const char *database, const char **user, const char **password, const char **host, const char **port) |
Get login parameters for driver/database. More... | |
int | db_get_login_dump (FILE *fd) |
Print all connection settings to file. More... | |
DBMI Library (base) - login settings.
(C) 1999-2015 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file login.c.
int db_get_login | ( | const char * | driver, |
const char * | database, | ||
const char ** | user, | ||
const char ** | password | ||
) |
Get login parameters for driver/database.
If driver/database is not found, output arguments are set to NULL.
driver | driver name | |
database | database name (can be NULL) | |
[out] | user | name |
[out] | password | string |
int db_get_login2 | ( | const char * | driver, |
const char * | database, | ||
const char ** | user, | ||
const char ** | password, | ||
const char ** | host, | ||
const char ** | port | ||
) |
Get login parameters for driver/database.
If driver/database is not found, output arguments are set to NULL.
driver | driver name | |
database | database name (can be NULL) | |
[out] | user | name |
[out] | password | string |
[out] | host | name |
[out] | port |
Definition at line 379 of file login.c.
Referenced by db_get_connection().
int db_get_login_dump | ( | FILE * | fd | ) |
int db_set_login | ( | const char * | driver, |
const char * | database, | ||
const char * | user, | ||
const char * | password | ||
) |
Set login parameters for driver/database.
driver | driver name |
database | database name |
user | user name |
password | password string |
int db_set_login2 | ( | const char * | driver, |
const char * | database, | ||
const char * | user, | ||
const char * | password, | ||
const char * | host, | ||
const char * | port, | ||
int | overwrite | ||
) |