mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / server-tools / instance-manager / command.h
blob8a2f29b0533739a1122e79691b96afc61709c56f
1 #ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_COMMAND_H
2 #define INCLUDES_MYSQL_INSTANCE_MANAGER_COMMAND_H
3 /* Copyright (c) 2004-2006 MySQL AB
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
18 #include <my_global.h>
20 #if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
21 #pragma interface
22 #endif
24 /* Class responsible for allocation of IM commands. */
26 class Guardian;
27 class Instance_map;
29 struct st_net;
32 Command - entry point for any command.
33 GangOf4: 'Command' design pattern
36 class Command
38 public:
39 Command();
40 virtual ~Command();
43 This operation incapsulates behaviour of the command.
45 SYNOPSIS
46 net The network connection to the client.
47 connection_id Client connection ID
49 RETURN
50 0 On success
51 non 0 On error. Client error code is returned.
53 virtual int execute(st_net *net, ulong connection_id) = 0;
55 protected:
56 Guardian *guardian;
57 Instance_map *instance_map;
60 #endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_COMMAND_H */