/* * Copyright (C) 2012 - Juan Ferrer Toribio * * 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 . */ #ifndef DB_MYSQL_H #define DB_MYSQL_H #include #include #define DB_TYPE_MYSQL (db_mysql_get_type ()) #define DB_MYSQL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DB_TYPE_MYSQL, DbMysql)) #define DB_IS_MYSQL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DB_TYPE_MYSQL)) #define DB_MYSQL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DB_TYPE_MYSQL, DbMysqlClass)) #define DB_IS_MYSQL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DB_TYPE_MYSQL)) #define DB_MYSQL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DB_TYPE_MYSQL, DbMysqlClass)) typedef struct _DbMysql DbMysql; typedef struct _DbMysqlClass DbMysqlClass; struct _DbMysql { DbPlugin parent; MYSQL * mysql; gchar * host; gchar * user; gchar * pass; gulong thread_id; gint socket; gboolean is_open; }; struct _DbMysqlClass { DbPluginClass parent; }; GType db_mysql_get_type (); DbConn * db_mysql_new (); #endif