#include <conn.h>
Public Types | |
enum | { evConnected = 1, evPing = 2, evClosed = 3, evError = 4, evQuery = 5, evWarningNote = 6, evWarning = 7, evWarningError = 8 } |
Log events. More... | |
Public Member Functions | |
virtual | ~Events () |
Destructor. | |
virtual Events * | copy () const=0 |
Makes a copy of the object. | |
virtual void | log_event (Conn &conn, int event, unsigned int code, char const *msg) const =0 |
Logs an event. |
anonymous enum |
virtual Events* mysql_cli::Events::copy | ( | ) | const [pure virtual] |
Makes a copy of the object. This is called by Conn's copy constructor and assignment operator.
virtual void mysql_cli::Events::log_event | ( | Conn & | conn, | |
int | event, | |||
unsigned int | code, | |||
char const * | msg | |||
) | const [pure virtual] |
Logs an event.
[in] | conn | The connection where the event happened. |
[in] | event | Can be one of the following values: evConnected, evClosed, evError, evQuery, evWarningNote, evWarning or evWarningError. |
[in] | code | For evWarningNote, evWarning and evWarningError, the corresponding warning code. |
[in] | msg | A message associated to the event, if any. For evError events, it is the context of the error, for evQuery it is the query that has been executed, and for evWarningNote, evWarning and evWarningError, the contents of the warnings. |