summaryrefslogtreecommitdiff
path: root/src/libstrongswan/database
diff options
context:
space:
mode:
authorRene Mayrhofer <rene@mayrhofer.eu.org>2008-10-29 11:11:01 +0000
committerRene Mayrhofer <rene@mayrhofer.eu.org>2008-10-29 11:11:01 +0000
commit8b80ab5a6950ce6515f477624794defd7531642a (patch)
treeaa8303f3806c5615fbeafc4dc82febe3cd7c24dc /src/libstrongswan/database
parentdb67c87db3c9089ea8d2e14f617bf3d9e2af261f (diff)
downloadvyos-strongswan-8b80ab5a6950ce6515f477624794defd7531642a.tar.gz
vyos-strongswan-8b80ab5a6950ce6515f477624794defd7531642a.zip
[svn-upgrade] Integrating new upstream version, strongswan (4.2.8)
Diffstat (limited to 'src/libstrongswan/database')
-rw-r--r--src/libstrongswan/database/database.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/libstrongswan/database/database.h b/src/libstrongswan/database/database.h
index 1cf5c2542..39f909cd7 100644
--- a/src/libstrongswan/database/database.h
+++ b/src/libstrongswan/database/database.h
@@ -22,6 +22,7 @@
#define DATABASE_H_
typedef enum db_type_t db_type_t;
+typedef enum db_driver_t db_driver_t;
typedef struct database_t database_t;
#include <utils/enumerator.h>
@@ -44,6 +45,15 @@ enum db_type_t {
DB_NULL,
};
+/**
+ * Database implementation type.
+ */
+enum db_driver_t {
+ /** SQLite database */
+ DB_SQLITE,
+ /** MySQL database */
+ DB_MYSQL,
+};
/**
* Interface for a database implementation.
@@ -95,6 +105,16 @@ struct database_t {
int (*execute)(database_t *this, int *rowid, char *sql, ...);
/**
+ * Get the database implementation type.
+ *
+ * To allow driver specific SQL or performance optimizations each database
+ * implementations can be queried for its type.
+ *
+ * @return database implementation type
+ */
+ db_driver_t (*get_driver)(database_t *this);
+
+ /**
* Destroy a database connection.
*/
void (*destroy)(database_t *this);