~drizzle-trunk/drizzle/development

390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
390.1.2 by Monty Taylor
Fixed copyright headers in drizzled/
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; version 2 of the License.
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
 */
1 by brian
clean slate
19
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
20
#pragma once
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
21
2241.2.10 by Olaf van der Spek
Refactor
22
#include <bitset>
23
#include <drizzled/error_t.h>
24
#include <drizzled/lex_string.h>
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
25
#include <drizzled/memory/sql_alloc.h>
26
#include <drizzled/visibility.h>
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
27
2241.2.10 by Olaf van der Spek
Refactor
28
namespace drizzled {
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
29
2241.2.10 by Olaf van der Spek
Refactor
30
class DRIZZLE_ERROR : public memory::SqlAlloc
1 by brian
clean slate
31
{
32
public:
1100.3.35 by Padraig O'Sullivan
Updated mysql_show_warnings to take a std::bitset instead of a uint32_t to
33
  static const uint32_t NUM_ERRORS= 4;
2445.1.11 by Olaf van der Spek
Use str_ref
34
  enum enum_warning_level 
35
  {
2087.3.1 by Brian Aker
Entire convert over to time_t.
36
    WARN_LEVEL_NOTE,
37
    WARN_LEVEL_WARN,
38
    WARN_LEVEL_ERROR,
39
    WARN_LEVEL_END
40
  };
1 by brian
clean slate
41
2087.3.1 by Brian Aker
Entire convert over to time_t.
42
  drizzled::error_t code;
1 by brian
clean slate
43
  enum_warning_level level;
2445.1.11 by Olaf van der Spek
Use str_ref
44
  const char *msg;
660.1.3 by Eric Herman
removed trailing whitespace with simple script:
45
2445.1.11 by Olaf van der Spek
Use str_ref
46
  DRIZZLE_ERROR(Session *session, drizzled::error_t code_arg, enum_warning_level level_arg, const char *msg_arg) :
2087.3.1 by Brian Aker
Entire convert over to time_t.
47
    code(code_arg),
48
    level(level_arg)
1 by brian
clean slate
49
  {
50
    if (msg_arg)
520.1.22 by Brian Aker
Second pass of thd cleanup
51
      set_msg(session, msg_arg);
1 by brian
clean slate
52
  }
2087.3.1 by Brian Aker
Entire convert over to time_t.
53
520.1.22 by Brian Aker
Second pass of thd cleanup
54
  void set_msg(Session *session, const char *msg_arg);
1 by brian
clean slate
55
};
56
2445.1.11 by Olaf van der Spek
Use str_ref
57
DRIZZLED_API DRIZZLE_ERROR *push_warning(Session*, DRIZZLE_ERROR::enum_warning_level level, error_t code, const char *msg);
2087.3.1 by Brian Aker
Entire convert over to time_t.
58
2445.1.11 by Olaf van der Spek
Use str_ref
59
DRIZZLED_API void push_warning_printf(Session*, DRIZZLE_ERROR::enum_warning_level level, error_t code, const char *format, ...);
2087.3.1 by Brian Aker
Entire convert over to time_t.
60
2318.6.104 by Olaf van der Spek
Refactor
61
void drizzle_reset_errors(Session&, bool force);
2445.1.11 by Olaf van der Spek
Use str_ref
62
bool show_warnings(Session *session, std::bitset<DRIZZLE_ERROR::NUM_ERRORS> &levels_to_show);
1 by brian
clean slate
63
2371.1.2 by Brian Aker
Remove the typedef on lexkey
64
extern const lex_string_t warning_level_names[];
575.1.6 by Monty Taylor
Cleaned up some headers for PCH.
65
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
66
} /* namespace drizzled */
67