1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems, Inc.
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.
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.
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
21
This file defines the client API to DRIZZLE and also the ABI of the
22
dynamically linked libdrizzleclient.
24
In case the file is changed so the ABI is broken, you must also
25
update the SHARED_LIB_MAJOR_VERSION in configure.ac.
29
#ifndef LIBDRIZZLECLIENT_LIBDRIZZLE_H
30
#define LIBDRIZZLECLIENT_LIBDRIZZLE_H
32
#include <drizzled/common.h>
34
#define CLIENT_NET_READ_TIMEOUT 365*24*3600 /* Timeout on read */
35
#define CLIENT_NET_WRITE_TIMEOUT 365*24*3600 /* Timeout on write */
37
#define CLIENT_LONG_PASSWORD 1 /* new more secure passwords */
38
#define CLIENT_FOUND_ROWS 2 /* Found instead of affected rows */
39
#define CLIENT_LONG_FLAG 4 /* Get all column flags */
40
#define CLIENT_CONNECT_WITH_DB 8 /* One can specify db on connect */
41
#define CLIENT_NO_SCHEMA 16 /* Don't allow database.table.column */
42
#define CLIENT_COMPRESS 32 /* Can use compression protocol */
43
#define CLIENT_ODBC 64 /* Odbc client */
44
#define CLIENT_IGNORE_SPACE 256 /* Ignore spaces before '(' */
45
#define UNUSED_CLIENT_PROTOCOL_41 512 /* New 4.1 protocol */
46
#define CLIENT_SSL 2048 /* Switch to SSL after handshake */
47
#define CLIENT_IGNORE_SIGPIPE 4096 /* IGNORE sigpipes */
48
#define CLIENT_RESERVED 16384 /* Old flag for 4.1 protocol */
49
#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
50
#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
51
#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
53
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
54
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
56
/* Gather all possible capabilites (flags) supported by the server */
57
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
60
CLIENT_CONNECT_WITH_DB | \
64
CLIENT_IGNORE_SPACE | \
66
CLIENT_IGNORE_SIGPIPE | \
68
CLIENT_SECURE_CONNECTION | \
69
CLIENT_MULTI_STATEMENTS | \
70
CLIENT_MULTI_RESULTS | \
71
CLIENT_SSL_VERIFY_SERVER_CERT | \
72
CLIENT_REMEMBER_OPTIONS)
75
Switch off the flags that are optional and depending on build flags
76
If any of the optional flags is supported by the build it will be switched
77
on before sending to the client during the connection handshake.
79
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
81
& ~CLIENT_SSL_VERIFY_SERVER_CERT)
84
#include "drizzle_field.h"
85
#include "drizzle_rows.h"
86
#include "drizzle_data.h"
90
#include "drizzle_methods.h"
98
unsigned int drizzleclient_get_default_port(void);
104
#endif /* LIBDRIZZLECLIENT_LIBDRIZZLE_H */