GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73577
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
temporal/lib/default_name.c File Reference
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/temporal.h>
#include <grass/glocale.h>
Include dependency graph for temporal/lib/default_name.c:

Go to the source code of this file.

Functions

const char * tgis_get_default_driver_name (void)
 Get default TGIS driver name. More...
 
char * tgis_get_default_database_name (void)
 Get default TGIS database name for the sqlite connection. More...
 
int tgis_set_default_connection (void)
 Sets up TGIS database connection settings using GRASS default. More...
 

Function Documentation

char* tgis_get_default_database_name ( void  )

Get default TGIS database name for the sqlite connection.

The default name is $GISDBASE/$LOCATION_NAME/$MAPSET/tgis/sqlite.db

Returns
pointer to default TGIS database name

Definition at line 39 of file temporal/lib/default_name.c.

References G_snprintf(), G_store(), and TGISDB_DEFAULT_SQLITE_PATH.

Referenced by tgis_set_default_connection().

const char* tgis_get_default_driver_name ( void  )

Get default TGIS driver name.

Returns
pointer to default TGIS driver name

Definition at line 27 of file temporal/lib/default_name.c.

References TGISDB_DEFAULT_DRIVER.

int tgis_set_default_connection ( void  )

Sets up TGIS database connection settings using GRASS default.

Returns
returns DB_OK

Definition at line 54 of file temporal/lib/default_name.c.

References _, _db_connection::databaseName, DB_OK, _db_connection::driverName, G_fatal_error(), G_free(), G_snprintf(), tgis_get_default_database_name(), tgis_set_connection(), and TGISDB_DEFAULT_DRIVER.