~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/oldlibdrizzle/libdrizzle_priv.h

Merged in latest plugin-slot-reorg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; version 2 of the License.
 
9
 *
 
10
 *  This program is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with this program; if not, write to the Free Software
 
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 */
 
19
 
 
20
#ifndef PLUGIN_OLDLIBDRIZZLE_LIBDRIZZLE_PRIV_H
 
21
#define PLUGIN_OLDLIBDRIZZLE_LIBDRIZZLE_PRIV_H
 
22
 
 
23
#include <drizzled/global.h>
 
24
 
 
25
#include "drizzle.h"
 
26
#include <drizzled/korr.h>
 
27
 
 
28
#include <sys/socket.h>
 
29
 
 
30
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_SECURE_CONNECTION)
 
31
 
 
32
#if defined(__cplusplus)
 
33
extern "C" {
 
34
#endif
 
35
 
 
36
const char * drizzleclient_sqlstate_get_unknown(void);
 
37
const char * drizzleclient_sqlstate_get_not_error(void);
 
38
const char * drizzleclient_sqlstate_get_cant_connect(void);
 
39
 
 
40
void drizzleclient_set_default_port(unsigned int port);
 
41
void drizzleclient_set_error(DRIZZLE *drizzle, int errcode, const char *sqlstate);
 
42
void drizzleclient_set_extended_error(DRIZZLE *drizzle, int errcode,
 
43
                                const char *sqlstate,
 
44
                                const char *format, ...);
 
45
void drizzleclient_free_old_query(DRIZZLE *drizzle);
 
46
 
 
47
int drizzleclient_connect_with_timeout(int fd, const struct sockaddr *name,
 
48
                         unsigned int namelen, int32_t timeout);
 
49
 
 
50
void drizzleclient_close_free_options(DRIZZLE *drizzle);
 
51
void drizzleclient_close_free(DRIZZLE *drizzle);
 
52
 
 
53
/* Hook Methods */
 
54
bool drizzleclient_cli_read_query_result(DRIZZLE *drizzle);
 
55
DRIZZLE_RES *drizzleclient_cli_use_result(DRIZZLE *drizzle);
 
56
void drizzleclient_cli_fetch_lengths(uint32_t *to, DRIZZLE_ROW column,
 
57
                       uint32_t field_count);
 
58
void drizzleclient_cli_flush_use_result(DRIZZLE *drizzle);
 
59
 
 
60
#if defined(__cplusplus)
 
61
}
 
62
#endif
 
63
 
 
64
#endif /* PLUGIN_OLDLIBDRIZZLE_LIBDRIZZLE_PRIV_H */