~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle_options.h

  • Committer: Monty Taylor
  • Date: 2008-09-15 00:46:33 UTC
  • mfrom: (383.1.55 client-split)
  • Revision ID: monty@inaugust.com-20080915004633-fmjw27fi41cxs35w
Merged from client-split.

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; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#ifndef _libdrizzle_drizzle_options_h
 
22
#define _libdrizzle_drizzle_options_h
 
23
 
 
24
#ifdef  __cplusplus
 
25
extern "C" {
 
26
#endif
 
27
 
 
28
 
 
29
#include <stdbool.h>
 
30
 
 
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_LOCAL_INFILE,
 
36
  DRIZZLE_OPT_PROTOCOL, DRIZZLE_SHARED_MEMORY_BASE_NAME, DRIZZLE_OPT_READ_TIMEOUT,
 
37
  DRIZZLE_OPT_WRITE_TIMEOUT, DRIZZLE_OPT_USE_RESULT,
 
38
  DRIZZLE_OPT_USE_REMOTE_CONNECTION,
 
39
  DRIZZLE_OPT_GUESS_CONNECTION, DRIZZLE_SET_CLIENT_IP, DRIZZLE_SECURE_AUTH,
 
40
  DRIZZLE_REPORT_DATA_TRUNCATION, DRIZZLE_OPT_RECONNECT,
 
41
  DRIZZLE_OPT_SSL_VERIFY_SERVER_CERT
 
42
};
 
43
 
 
44
struct st_drizzle_options {
 
45
  unsigned int connect_timeout, read_timeout, write_timeout;
 
46
  unsigned int port;
 
47
  unsigned long client_flag;
 
48
  char *host,*user,*password,*db;
 
49
  char *my_cnf_file,*my_cnf_group;
 
50
  char *ssl_key;        /* PEM key file */
 
51
  char *ssl_cert;        /* PEM cert file */
 
52
  char *ssl_ca;          /* PEM CA file */
 
53
  char *ssl_capath;        /* PEM directory of CA-s? */
 
54
  char *ssl_cipher;        /* cipher to use */
 
55
  char *shared_memory_base_name;
 
56
  unsigned long max_allowed_packet;
 
57
  bool use_ssl;        /* if to use SSL or not */
 
58
  bool compress,named_pipe;
 
59
  bool unused1;
 
60
  bool unused2;
 
61
  bool unused3;
 
62
  bool unused4;
 
63
  enum drizzle_option methods_to_use;
 
64
  char *client_ip;
 
65
  /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
 
66
  bool secure_auth;
 
67
  /* 0 - never report, 1 - always report (default) */
 
68
  bool report_data_truncation;
 
69
 
 
70
  /* function pointers for local infile support */
 
71
  int (*local_infile_init)(void **, const char *, void *);
 
72
  int (*local_infile_read)(void *, char *, unsigned int);
 
73
  void (*local_infile_end)(void *);
 
74
  int (*local_infile_error)(void *, char *, unsigned int);
 
75
  void *local_infile_userdata;
 
76
  void *extension;
 
77
};
 
78
 
 
79
 
 
80
#ifdef  __cplusplus
 
81
}
 
82
#endif
 
83
 
 
84
#endif /* _libdrizzle_drizzle_options_h */