390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
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 |
||
779.3.37
by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes |
20 |
#ifndef LIBDRIZZLECLIENT_LIBDRIZZLE_PRIV_H
|
21 |
#define LIBDRIZZLECLIENT_LIBDRIZZLE_PRIV_H
|
|
22 |
||
23 |
#include "drizzle.h" |
|
24 |
#include <drizzled/korr.h> |
|
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
25 |
|
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
26 |
#include <sys/socket.h> |
27 |
||
28 |
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | \
|
|
29 |
CLIENT_TRANSACTIONS | \
|
|
30 |
CLIENT_SECURE_CONNECTION)
|
|
31 |
||
32 |
#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
|
|
33 |
#define __builtin_expect(x, expected_value) (x)
|
|
34 |
#endif
|
|
35 |
||
36 |
#define likely(x) __builtin_expect((x),1)
|
|
37 |
#define unlikely(x) __builtin_expect((x),0)
|
|
38 |
||
39 |
#ifndef __cplusplus
|
|
40 |
#define max(a, b) ((a) > (b) ? (a) : (b))
|
|
41 |
#define min(a, b) ((a) < (b) ? (a) : (b))
|
|
42 |
#endif
|
|
43 |
||
840.1.20
by Monty Taylor
Renamed non-prefixed things from libdrizzleclient to drizzleclient. |
44 |
const char * drizzleclient_sqlstate_get_unknown(void); |
45 |
const char * drizzleclient_sqlstate_get_not_error(void); |
|
46 |
const char * drizzleclient_sqlstate_get_cant_connect(void); |
|
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
47 |
|
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
48 |
void drizzleclient_set_default_port(unsigned int port); |
49 |
void drizzleclient_set_error(DRIZZLE *drizzle, int errcode, const char *sqlstate); |
|
50 |
void drizzleclient_set_extended_error(DRIZZLE *drizzle, int errcode, |
|
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
51 |
const char *sqlstate, |
52 |
const char *format, ...); |
|
840.1.20
by Monty Taylor
Renamed non-prefixed things from libdrizzleclient to drizzleclient. |
53 |
void drizzleclient_free_old_query(DRIZZLE *drizzle); |
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
54 |
|
840.1.20
by Monty Taylor
Renamed non-prefixed things from libdrizzleclient to drizzleclient. |
55 |
int drizzleclient_connect_with_timeout(int fd, const struct sockaddr *name, |
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
56 |
unsigned int namelen, int32_t timeout); |
57 |
||
840.1.21
by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl. |
58 |
void drizzleclient_close_free_options(DRIZZLE *drizzle); |
59 |
void drizzleclient_close_free(DRIZZLE *drizzle); |
|
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
60 |
|
61 |
/* Hook Methods */
|
|
840.1.20
by Monty Taylor
Renamed non-prefixed things from libdrizzleclient to drizzleclient. |
62 |
bool drizzleclient_cli_read_query_result(DRIZZLE *drizzle); |
63 |
DRIZZLE_RES *drizzleclient_cli_use_result(DRIZZLE *drizzle); |
|
64 |
void drizzleclient_cli_fetch_lengths(uint32_t *to, DRIZZLE_ROW column, |
|
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
65 |
uint32_t field_count); |
840.1.20
by Monty Taylor
Renamed non-prefixed things from libdrizzleclient to drizzleclient. |
66 |
void drizzleclient_cli_flush_use_result(DRIZZLE *drizzle); |
390.1.6
by Monty Taylor
Oh dear god the changes. The changes. I'd tell you what they are, but I'd just be making stuff up. Suffice it to day it's mostly all around splitting files in libdrizzle into different files and removing interdepends. And whatever else I happened to see... |
67 |
|
390.1.5
by Monty Taylor
Moved more functions into drizzle.c as part of the split of code. |
68 |
#endif
|