~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/drizzle_parameters.h

  • Committer: Monty Taylor
  • Date: 2008-09-14 21:41:34 UTC
  • mto: This revision was merged to the branch mainline in revision 388.
  • Revision ID: monty@inaugust.com-20080914214134-gi3by91262dmk1hj
Finished splitting libdrizzle header files.

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_parameters_h
 
22
#define _libdrizzle_drizzle_parameters_h
 
23
 
 
24
#ifdef  __cplusplus
 
25
extern "C" {
 
26
#endif
 
27
 
 
28
#include <stdint.h>
 
29
 
 
30
typedef struct st_drizzle_parameters
 
31
{
 
32
  uint32_t *p_max_allowed_packet;
 
33
  uint32_t *p_net_buffer_length;
 
34
  void *extension;
 
35
} DRIZZLE_PARAMETERS;
 
36
 
 
37
const DRIZZLE_PARAMETERS * drizzle_get_parameters(void);
 
38
 
 
39
#if !defined(DRIZZLE_SERVER)
 
40
#define max_allowed_packet (*drizzle_get_parameters()->p_max_allowed_packet)
 
41
#define net_buffer_length (*drizzle_get_parameters()->p_net_buffer_length)
 
42
#endif
 
43
 
 
44
#ifdef  __cplusplus
 
45
}
 
46
#endif
 
47
 
 
48
#endif /* _libdrizzle_drizzle_parameters_h */