summaryrefslogtreecommitdiff
path: root/mg_database.h
diff options
context:
space:
mode:
authorlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-06 06:28:44 +0000
committerlvw <lvw@e10066b5-e1e2-0310-b819-94efdf66514b>2004-10-06 06:28:44 +0000
commitebdf27d9e7c5d167101adf3c9df5efe3d7d52586 (patch)
tree6dd53ed3300743ebadc98c6cce602d946e45a5ab /mg_database.h
parent05f0b754ac1e951a65f6301b2749025ebe5d5849 (diff)
downloadvdr-plugin-muggle-ebdf27d9e7c5d167101adf3c9df5efe3d7d52586.tar.gz
vdr-plugin-muggle-ebdf27d9e7c5d167101adf3c9df5efe3d7d52586.tar.bz2
Added more stuff to mg_database and added status display for gLCD
git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@203 e10066b5-e1e2-0310-b819-94efdf66514b
Diffstat (limited to 'mg_database.h')
-rw-r--r--mg_database.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/mg_database.h b/mg_database.h
index 3f2c323..54baef1 100644
--- a/mg_database.h
+++ b/mg_database.h
@@ -35,22 +35,47 @@ class mgDB
* \param pass
* \param port
*/
- mgDB( std::string host, std::string name,
- std::string user, std::string pass,
- int port );
+ mgDB( std::string host, std::string name,
+ std::string user="", std::string pass="",
+ int port = 0 );
+
+ // add constructor for sockets
/*! \brief constructor */
~mgDB();
- /*! \brief obtain database handle*/
+ /*!
+ * \brief obtain database handle
+ */
MYSQL getDBHandle();
+ /*!
+ * \brief database initialization
+ */
+ // int initialize();
+
+ /*!
+ * \brief helper function to execute read queries
+ *
+ * \todo Could be a member of mgDatabase?
+ */
+ MYSQL_RES* read_query( const char *fmt, ... );
+
+ /*!
+ * \brief helper function to execute write queries
+ *
+ * \todo Could be a member of mgDatabase?
+ */
+ void write_query( const char *fmt, ... );
+
/*!
* \brief escape arguments to be contained in a query
*
* \todo use m_dbase member of this class
*/
static std::string escape_string( MYSQL *db, std::string s );
+
+
private:
MYSQL m_dbase;