~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/oldlibdrizzle/libdrizzle.h

  • Committer: Monty Taylor
  • Date: 2009-09-30 07:01:32 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20090930070132-b1ol1xu1rpajdddy
Small namespace cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
/*
21
21
  This file defines the client API to DRIZZLE and also the ABI of the
22
 
  dynamically linked libdrizzle.
 
22
  dynamically linked libdrizzleclient.
23
23
 
24
24
  In case the file is changed so the ABI is broken, you must also
25
25
  update the SHARED_LIB_MAJOR_VERSION in configure.ac.
26
26
 
27
27
*/
28
28
 
29
 
#ifndef _libdrizzle_libdrizzle_h
30
 
#define _libdrizzle_libdrizzle_h
 
29
#ifndef PLUGIN_OLDLIBDRIZZLE_LIBDRIZZLE_H
 
30
#define PLUGIN_OLDLIBDRIZZLE_LIBDRIZZLE_H
31
31
 
32
32
#include <drizzled/common.h>
33
33
 
34
34
#define CLIENT_NET_READ_TIMEOUT    365*24*3600  /* Timeout on read */
35
35
#define CLIENT_NET_WRITE_TIMEOUT  365*24*3600  /* Timeout on write */
36
36
 
 
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 */
 
52
 
 
53
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
 
54
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
 
55
 
 
56
/* Gather all possible capabilites (flags) supported by the server */
 
57
#define CLIENT_ALL_FLAGS  (CLIENT_LONG_PASSWORD | \
 
58
                           CLIENT_FOUND_ROWS | \
 
59
                           CLIENT_LONG_FLAG | \
 
60
                           CLIENT_CONNECT_WITH_DB | \
 
61
                           CLIENT_NO_SCHEMA | \
 
62
                           CLIENT_COMPRESS | \
 
63
                           CLIENT_ODBC | \
 
64
                           CLIENT_IGNORE_SPACE | \
 
65
                           CLIENT_SSL | \
 
66
                           CLIENT_IGNORE_SIGPIPE | \
 
67
                           CLIENT_RESERVED | \
 
68
                           CLIENT_SECURE_CONNECTION | \
 
69
                           CLIENT_MULTI_STATEMENTS | \
 
70
                           CLIENT_MULTI_RESULTS | \
 
71
                           CLIENT_SSL_VERIFY_SERVER_CERT | \
 
72
                           CLIENT_REMEMBER_OPTIONS)
 
73
 
 
74
/*
 
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.
 
78
*/
 
79
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
 
80
                                               & ~CLIENT_COMPRESS) \
 
81
                                               & ~CLIENT_SSL_VERIFY_SERVER_CERT)
 
82
 
 
83
 
 
84
#include "drizzle_field.h"
 
85
#include "drizzle_rows.h"
 
86
#include "drizzle_data.h"
 
87
#include "options.h"
 
88
 
 
89
#include "drizzle.h"
 
90
#include "drizzle_methods.h"
 
91
 
37
92
#include <stdint.h>
38
 
#include <libdrizzle/drizzle_field.h>
39
 
#include <libdrizzle/drizzle_rows.h>
40
 
#include <libdrizzle/drizzle_data.h>
41
 
#include <libdrizzle/drizzle_options.h>
42
 
 
43
 
#include <libdrizzle/drizzle.h>
44
 
#include <libdrizzle/drizzle_parameters.h>
45
 
#include <libdrizzle/drizzle_methods.h>
46
93
 
47
94
#ifdef  __cplusplus
48
95
extern "C" {
49
96
#endif
50
97
 
51
 
  const char * drizzle_get_client_info(void);
52
 
  uint32_t drizzle_get_client_version(void);
53
 
  unsigned int drizzle_get_default_port(void);
54
 
  uint32_t drizzle_escape_string(char *to,const char *from,
 
98
  const char * drizzleclient_get_client_info(void);
 
99
  uint32_t drizzleclient_get_client_version(void);
 
100
  unsigned int drizzleclient_get_default_port(void);
 
101
  uint32_t drizzleclient_escape_string(char *to,const char *from,
55
102
                                 uint32_t from_length);
56
 
  uint32_t drizzle_hex_string(char *to,const char *from,
57
 
                              uint32_t from_length);
58
103
 
59
104
#ifdef  __cplusplus
60
105
}
61
106
#endif
62
107
 
63
 
#endif /* _libdrizzle_libdrizzle_h */
 
108
#endif /* PLUGIN_OLDLIBDRIZZLE_LIBDRIZZLE_H */