~drizzle-trunk/drizzle/development

383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
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
390.1.3 by Monty Taylor
Copyright header fixes.
8
 *  the Free Software Foundation; version 2 of the License.
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
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_DRIZZLE_OPTIONS_H
21
#define LIBDRIZZLECLIENT_DRIZZLE_OPTIONS_H
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
22
629.1.1 by Monty Taylor
More solaris fixes.
23
#if !defined(__cplusplus)
24
# include <stdbool.h>
25
#endif
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
26
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
27
#ifdef  __cplusplus
28
extern "C" {
29
#endif
30
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
31
enum drizzle_option
32
{
33
  DRIZZLE_OPT_CONNECT_TIMEOUT, DRIZZLE_OPT_COMPRESS, DRIZZLE_OPT_NAMED_PIPE,
34
  DRIZZLE_INIT_COMMAND, DRIZZLE_READ_DEFAULT_FILE, DRIZZLE_READ_DEFAULT_GROUP,
35
  DRIZZLE_OPT_PROTOCOL, DRIZZLE_SHARED_MEMORY_BASE_NAME, DRIZZLE_OPT_READ_TIMEOUT,
36
  DRIZZLE_OPT_WRITE_TIMEOUT, DRIZZLE_OPT_USE_RESULT,
37
  DRIZZLE_OPT_USE_REMOTE_CONNECTION,
38
  DRIZZLE_OPT_GUESS_CONNECTION, DRIZZLE_SET_CLIENT_IP, DRIZZLE_SECURE_AUTH,
39
  DRIZZLE_REPORT_DATA_TRUNCATION, DRIZZLE_OPT_RECONNECT,
40
  DRIZZLE_OPT_SSL_VERIFY_SERVER_CERT
41
};
42
840.1.21 by Monty Taylor
ZOMG. Renamed all the rest of the stuff in libdrizzleclient to be drizzleclient_*. I love commandline perl.
43
struct st_drizzleclient_options {
383.1.45 by Monty Taylor
libdrizzle.h cleanup. Removed some unused things. Started splitting header into
44
  unsigned int connect_timeout, read_timeout, write_timeout;
45
  unsigned int port;
46
  unsigned long client_flag;
47
  char *host,*user,*password,*db;
48
  char *my_cnf_file,*my_cnf_group;
49
  char *ssl_key;        /* PEM key file */
50
  char *ssl_cert;        /* PEM cert file */
51
  char *ssl_ca;          /* PEM CA file */
52
  char *ssl_capath;        /* PEM directory of CA-s? */
53
  char *ssl_cipher;        /* cipher to use */
54
  char *shared_memory_base_name;
55
  unsigned long max_allowed_packet;
56
  bool use_ssl;        /* if to use SSL or not */
57
  bool compress,named_pipe;
58
  bool unused1;
59
  bool unused2;
60
  bool unused3;
61
  bool unused4;
62
  enum drizzle_option methods_to_use;
63
  char *client_ip;
64
  /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
65
  bool secure_auth;
66
  /* 0 - never report, 1 - always report (default) */
67
  bool report_data_truncation;
68
69
  /* function pointers for local infile support */
70
  int (*local_infile_init)(void **, const char *, void *);
71
  int (*local_infile_read)(void *, char *, unsigned int);
72
  void (*local_infile_end)(void *);
73
  int (*local_infile_error)(void *, char *, unsigned int);
74
  void *local_infile_userdata;
75
  void *extension;
76
};
77
78
79
#ifdef  __cplusplus
80
}
81
#endif
82
779.3.37 by Monty Taylor
Renmaed libdrizzle in the tree to libdrizzleclient to avoid namespace clashes
83
#endif /* LIBDRIZZLECLIENT_DRIZZLE_OPTIONS_H */