summaryrefslogtreecommitdiff
path: root/mg_tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'mg_tools.h')
-rw-r--r--mg_tools.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/mg_tools.h b/mg_tools.h
index 3b7bf12..3307e3e 100644
--- a/mg_tools.h
+++ b/mg_tools.h
@@ -1,10 +1,11 @@
/*! \file muggle_tools.h
+ * \ingroup muggle
* \brief A few utility functions for standalone and plugin messaging for the vdr muggle plugindatabase
*
* \version $Revision: 1.4 $
- * \date $Date: 2004/08/30 14:31:43 $
+ * \date $Date$
* \author Ralf Klueber, Lars von Wedel, Andreas Kellner
- * \author file owner: $Author: LarsAC $
+ * \author file owner: $Author$
*
*/
@@ -18,18 +19,30 @@
#define STANDALONE 1 // what's this?
-// mySql helper functions
+/*! \brief mySql helper function to execute read queries
+ * \ingroup muggle
+ *
+ * \todo Could be a member of mgDatabase?
+ */
MYSQL_RES* mgSqlReadQuery( MYSQL *db, const char *fmt, ... );
+
+/*! \brief mySql helper function to execute write queries
+ * \ingroup muggle
+ *
+ * \todo Could be a member of mgDatabase?
+ */
void mgSqlWriteQuery( MYSQL *db, const char *fmt, ... );
-// Messaging functions
+/*! \brief Logging utilities */
+//@{
void mgSetDebugLevel(int new_level);
void mgDebug(int level, const char *fmt, ...);
void mgDebug( const char *fmt, ... );
void mgWarning(const char *fmt, ...);
void mgError(const char *fmt, ...);
+//@}
#ifdef DEBUG
#define MGLOG(x) mgLog __thelog(x)
@@ -43,6 +56,13 @@ void mgError(const char *fmt, ...);
#define MGLOGSTREAM __thelog.getStream()
#endif
+/*! \brief simplified logging class
+ * \ingroup muggle
+ *
+ * Create a local instance at the beginning of the method
+ * and entering/leaving the function will be logged
+ * as constructors/destructors are called.
+ */
class mgLog
{
public: