GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r72729
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
db/dbmi_base/default_name.c File Reference

DBMI Library (base) - default settings. More...

#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/glocale.h>
Include dependency graph for db/dbmi_base/default_name.c:

Go to the source code of this file.

Functions

const char * db_get_default_driver_name (void)
 Get default driver name. More...
 
const char * db_get_default_database_name (void)
 Get default database name. More...
 
const char * db_get_default_schema_name (void)
 Get default schema name. More...
 
const char * db_get_default_group_name (void)
 Get default group name. More...
 
int db_set_default_connection (void)
 Sets up database connection settings using GRASS default from dbmi.h. More...
 

Detailed Description

DBMI Library (base) - default settings.

Temporal GIS Library (base) - default settings.

(C) 1999-2010 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.

Author
Joel Jones (CERL/UIUC)
Upgraded to GRASS 5.7 by Radim Blazek

(C) 2012-2014 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.

Author
Soeren Gebbert Code is based on the dbmi library written by Joel Jones (CERL/UIUC) and Radim Blazek

Definition in file db/dbmi_base/default_name.c.

Function Documentation

const char* db_get_default_database_name ( void  )

Get default database name.

Returns
pointer to default database name
NULL if not set

Definition at line 43 of file db/dbmi_base/default_name.c.

References G_getenv_nofatal2(), G_store(), G_VAR_MAPSET, and NULL.

const char* db_get_default_driver_name ( void  )

Get default driver name.

Returns
pointer to default driver name
NULL if not set

Definition at line 27 of file db/dbmi_base/default_name.c.

References G_getenv_nofatal2(), G_store(), G_VAR_MAPSET, and NULL.

const char* db_get_default_group_name ( void  )

Get default group name.

Returns
pointer to default group name
NULL if not set

Definition at line 75 of file db/dbmi_base/default_name.c.

References G_getenv_nofatal2(), G_store(), G_VAR_MAPSET, and NULL.

const char* db_get_default_schema_name ( void  )

Get default schema name.

Returns
pointer to default schema name
NULL if not set

Definition at line 59 of file db/dbmi_base/default_name.c.

References G_getenv_nofatal2(), G_store(), G_VAR_MAPSET, and NULL.

int db_set_default_connection ( void  )

Sets up database connection settings using GRASS default from dbmi.h.

Todo:
DB_OK on success, DB_* error code on fail
Returns
returns DB_OK

Definition at line 92 of file db/dbmi_base/default_name.c.

References _, _db_connection::databaseName, DB_DEFAULT_DRIVER, db_get_connection(), DB_OK, db_set_connection(), _db_connection::driverName, G_debug(), G_fatal_error(), G_location_path(), G_make_mapset_element(), G_mapset(), and GPATH_MAX.

Referenced by Vect_default_field_info().