~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzleclient/libdrizzle_priv.h

  • Committer: Padraig O'Sullivan
  • Date: 2009-03-24 15:33:01 UTC
  • mto: (968.2.18 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: osullivan.padraig@gmail.com-20090324153301-90gw63j1lsie1k9j
Removing a very mis-leading comment from sql_locale.cc

The comment was totally wrong and read "This file is build from
my_locale.pl"

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 LIBDRIZZLECLIENT_LIBDRIZZLE_PRIV_H
 
21
#define LIBDRIZZLECLIENT_LIBDRIZZLE_PRIV_H
 
22
 
 
23
#include "drizzle.h"
 
24
#include <drizzled/korr.h>
 
25
 
 
26
#include <sys/socket.h>
 
27
 
 
28
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_SECURE_CONNECTION)
 
29
 
 
30
#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
 
31
#define __builtin_expect(x, expected_value) (x)
 
32
#endif
 
33
 
 
34
#define likely(x)       __builtin_expect((x),1)
 
35
#define unlikely(x)     __builtin_expect((x),0)
 
36
 
 
37
#ifndef __cplusplus
 
38
#define max(a, b)       ((a) > (b) ? (a) : (b))
 
39
#define min(a, b)       ((a) < (b) ? (a) : (b))
 
40
#endif
 
41
 
 
42
const char * drizzleclient_sqlstate_get_unknown(void);
 
43
const char * drizzleclient_sqlstate_get_not_error(void);
 
44
const char * drizzleclient_sqlstate_get_cant_connect(void);
 
45
 
 
46
void drizzleclient_set_default_port(unsigned int port);
 
47
void drizzleclient_set_error(DRIZZLE *drizzle, int errcode, const char *sqlstate);
 
48
void drizzleclient_set_extended_error(DRIZZLE *drizzle, int errcode,
 
49
                                const char *sqlstate,
 
50
                                const char *format, ...);
 
51
void drizzleclient_free_old_query(DRIZZLE *drizzle);
 
52
 
 
53
int drizzleclient_connect_with_timeout(int fd, const struct sockaddr *name,
 
54
                         unsigned int namelen, int32_t timeout);
 
55
 
 
56
void drizzleclient_close_free_options(DRIZZLE *drizzle);
 
57
void drizzleclient_close_free(DRIZZLE *drizzle);
 
58
 
 
59
/* Hook Methods */
 
60
bool drizzleclient_cli_read_query_result(DRIZZLE *drizzle);
 
61
DRIZZLE_RES *drizzleclient_cli_use_result(DRIZZLE *drizzle);
 
62
void drizzleclient_cli_fetch_lengths(uint32_t *to, DRIZZLE_ROW column,
 
63
                       uint32_t field_count);
 
64
void drizzleclient_cli_flush_use_result(DRIZZLE *drizzle);
 
65
 
 
66
#endif