~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzleclient/options.h

Moved the last of the libdrizzleclient calls into Protocol.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#ifndef PLUGIN_DRIZZLE_PROTOCOL_OPTIONS_H
21
 
#define PLUGIN_DRIZZLE_PROTOCOL_OPTIONS_H
 
20
#ifndef LIBDRIZZLECLIENT_DRIZZLE_OPTIONS_H
 
21
#define LIBDRIZZLECLIENT_DRIZZLE_OPTIONS_H
22
22
 
23
 
namespace drizzle_protocol
24
 
{
 
23
#ifdef  __cplusplus
 
24
extern "C" {
 
25
#endif
25
26
 
26
27
enum drizzle_option
27
28
{
71
72
};
72
73
 
73
74
 
74
 
#define CLIENT_NET_READ_TIMEOUT    365*24*3600  /* Timeout on read */
75
 
#define CLIENT_NET_WRITE_TIMEOUT  365*24*3600  /* Timeout on write */
76
 
 
77
 
#define CLIENT_LONG_PASSWORD    1       /* new more secure passwords */
78
 
#define CLIENT_FOUND_ROWS       2       /* Found instead of affected rows */
79
 
#define CLIENT_LONG_FLAG        4       /* Get all column flags */
80
 
#define CLIENT_CONNECT_WITH_DB  8       /* One can specify db on connect */
81
 
#define CLIENT_NO_SCHEMA        16      /* Don't allow database.table.column */
82
 
#define CLIENT_COMPRESS         32      /* Can use compression protocol */
83
 
#define CLIENT_ODBC             64      /* Odbc client */
84
 
#define CLIENT_IGNORE_SPACE     256     /* Ignore spaces before '(' */
85
 
#define CLIENT_PROTOCOL_MYSQL41 512     /* New 4.1 protocol */
86
 
#define CLIENT_SSL              2048    /* Switch to SSL after handshake */
87
 
#define CLIENT_IGNORE_SIGPIPE   4096    /* IGNORE sigpipes */
88
 
#define CLIENT_RESERVED         16384   /* Old flag for 4.1 protocol  */
89
 
#define CLIENT_SECURE_CONNECTION 32768  /* New 4.1 authentication */
90
 
#define CLIENT_MULTI_STATEMENTS (1UL << 16) /* Enable/disable multi-stmt support */
91
 
#define CLIENT_MULTI_RESULTS    (1UL << 17) /* Enable/disable multi-results */
92
 
 
93
 
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
94
 
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
95
 
 
96
 
/* Gather all possible capabilites (flags) supported by the server */
97
 
#define CLIENT_ALL_FLAGS  (CLIENT_LONG_PASSWORD | \
98
 
                           CLIENT_FOUND_ROWS | \
99
 
                           CLIENT_LONG_FLAG | \
100
 
                           CLIENT_CONNECT_WITH_DB | \
101
 
                           CLIENT_NO_SCHEMA | \
102
 
                           CLIENT_COMPRESS | \
103
 
                           CLIENT_ODBC | \
104
 
                           CLIENT_IGNORE_SPACE | \
105
 
                           CLIENT_SSL | \
106
 
                           CLIENT_IGNORE_SIGPIPE | \
107
 
                           CLIENT_RESERVED | \
108
 
                           CLIENT_SECURE_CONNECTION | \
109
 
                           CLIENT_MULTI_STATEMENTS | \
110
 
                           CLIENT_MULTI_RESULTS | \
111
 
                           CLIENT_SSL_VERIFY_SERVER_CERT | \
112
 
                           CLIENT_REMEMBER_OPTIONS)
113
 
 
114
 
/*
115
 
  Switch off the flags that are optional and depending on build flags
116
 
  If any of the optional flags is supported by the build it will be switched
117
 
  on before sending to the client during the connection handshake.
118
 
*/
119
 
#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \
120
 
                                               & ~CLIENT_COMPRESS) \
121
 
                                               & ~CLIENT_SSL_VERIFY_SERVER_CERT)
122
 
 
123
 
} /* namespace drizzle_protocol */
124
 
 
125
 
#endif /* PLUGIN_DRIZZLE_PROTOCOL_OPTIONS_H */
 
75
#ifdef  __cplusplus
 
76
}
 
77
#endif
 
78
 
 
79
#endif /* LIBDRIZZLECLIENT_DRIZZLE_OPTIONS_H */