~linuxjedi/libdrizzle/5.1-binlogs-err

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle_local.h

  • Committer: Continuous Integration
  • Date: 2013-01-27 10:02:07 UTC
  • mfrom: (99.1.5 libdrizzle-5.1)
  • Revision ID: ci@drizzle.org-20130127100207-b2kd9o56kiv5e02q
Merge lp:~brianaker/libdrizzle/api-reworking Build: jenkins-Libdrizzle-59

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 * @param[in] function Name of function the error happened in. 
59
59
 * @param[in] format Format and variable argument list of message.
60
60
 */
61
 
void drizzle_set_error(drizzle_st *con, const char *function,
62
 
                       const char *format, ...);
63
 
 
64
 
/**
65
 
 * Initialize a connection structure. Always check the return value even if
66
 
 * passing in a pre-allocated structure. Some other initialization may have
67
 
 * failed.
68
 
 *
69
 
 * @param[in] drizzle Drizzle structure previously initialized with
70
 
 *  drizzle_create() or drizzle_clone().
71
 
 * @param[in] con Caller allocated structure, or NULL to allocate one.
72
 
 * @return On success, a pointer to the (possibly allocated) structure. On
73
 
 *  failure this will be NULL.
74
 
 */
75
 
drizzle_st *drizzle_create(void);
 
61
void drizzle_set_error(drizzle_st *con, const char *function, const char *format, ...);
76
62
 
77
63
/**
78
64
 * Free a connection structure.
84
70
 
85
71
drizzle_st *drizzle_clone(drizzle_st *drizzle, const drizzle_st *from);
86
72
 
 
73
bool drizzle_library_init(drizzle_st*);
 
74
 
87
75
/**
88
76
 * Log a message.
89
77
 *
123
111
/**
124
112
 * Log an error message, see drizzle_log() for argument details.
125
113
 */
126
 
static inline void drizzle_log_error(drizzle_st *con, const char *format,
127
 
                                     ...)
 
114
static inline void drizzle_log_error(drizzle_st *con, const char *format, ...)
128
115
{
129
116
  va_list args;
130
117
 
139
126
/**
140
127
 * Log an info message, see drizzle_log() for argument details.
141
128
 */
142
 
static inline void drizzle_log_info(drizzle_st *con, const char *format,
143
 
                                    ...)
 
129
static inline void drizzle_log_info(drizzle_st *con, const char *format, ...)
144
130
{
145
131
  va_list args;
146
132
 
155
141
/**
156
142
 * Log a debug message, see drizzle_log() for argument details.
157
143
 */
158
 
static inline void drizzle_log_debug(drizzle_st *con, const char *format,
159
 
                                     ...)
160
 
{
161
 
  va_list args;
162
 
 
163
 
  if (con->verbose >= DRIZZLE_VERBOSE_DEBUG)
164
 
  {
165
 
    va_start(args, format);
166
 
    drizzle_log(con, DRIZZLE_VERBOSE_DEBUG, format, args);
167
 
    va_end(args);
168
 
  }
169
 
}
170
 
 
171
 
/**
172
 
 * Log a crazy message, see drizzle_log() for argument details.
173
 
 */
174
 
static inline void drizzle_log_crazy(drizzle_st *con, const char *format,
175
 
                                     ...)
 
144
static inline void drizzle_log_debug(drizzle_st *con, const char *format, ...)
176
145
{
177
146
  va_list args;
178
147