diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-08-19 13:30:35 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2007-08-19 13:30:35 +0000 |
commit | 32d5cff1b7c2266779b63fb97eb6b91cab34e7ad (patch) | |
tree | a6334d3ceff71716e9e1399fb376963782a5404b /src/sql.h | |
parent | 106472e9039e46a5468ed15f118a2cf7d74f6ec8 (diff) | |
download | wydawca-32d5cff1b7c2266779b63fb97eb6b91cab34e7ad.tar.gz wydawca-32d5cff1b7c2266779b63fb97eb6b91cab34e7ad.tar.bz2 |
New module: wydawca
git-svn-id: file:///svnroot/wydawca/trunk@279 6bb4bd81-ecc2-4fd4-a2d4-9571d19c0d33
Diffstat (limited to 'src/sql.h')
-rw-r--r-- | src/sql.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/sql.h b/src/sql.h new file mode 100644 index 0000000..ef60ddc --- /dev/null +++ b/src/sql.h @@ -0,0 +1,38 @@ +/* wydawca - FTP release synchronisation daemon + Copyright (C) 2007 Sergey Poznyakoff + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <mysql/mysql.h> + +struct sqlconn +{ + char *ident; + char *host; + char *socket; + short port; + char *database; + char *user; + char *password; + int init; + MYSQL mysql; +}; + +void sql_register_conn (struct sqlconn *); +int sql_connection_exists_p (const char *); +struct sqlconn *sql_find_connection (const char *ident); + +int sql_init_method (struct access_method *method); +int sql_done_method (struct access_method *method); +int sql_run_method (struct access_method *method, const char *cmd); |