mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / server-tools / instance-manager / user_management_commands.h
blob5d3f9a12b4185fcb172a78902ee0d3a2f5a42d7a
1 #ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H
2 #define INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H
4 /*
5 Copyright (C) 2006 MySQL AB
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; version 2 of the License.
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.
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 Street, Fifth Floor, Boston, MA 02110-1301, USA
22 This header contains declarations of classes inteded to support
23 user-management commands (such as add user, get list of users, etc).
25 The general idea is to have one interface (pure abstract class) for such a
26 command. Each concrete user-management command is implemented in concrete
27 class, derived from the common interface.
30 #if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
31 #pragma interface
32 #endif
34 /*************************************************************************
35 User_management_cmd -- base class for User-management commands.
36 *************************************************************************/
38 class User_management_cmd
40 public:
41 User_management_cmd()
42 { }
44 virtual ~User_management_cmd()
45 { }
47 public:
49 Executes user-management command.
51 SYNOPSIS
52 execute()
54 RETURN
55 See exit_codes.h for possible values.
58 virtual int execute() = 0;
62 /*************************************************************************
63 Print_password_line_cmd: support for --print-password-line command-line
64 option.
65 *************************************************************************/
67 class Print_password_line_cmd: public User_management_cmd
69 public:
70 Print_password_line_cmd()
71 { }
73 public:
74 virtual int execute();
78 /*************************************************************************
79 Add_user_cmd: support for --add-user command-line option.
80 *************************************************************************/
82 class Add_user_cmd: public User_management_cmd
84 public:
85 Add_user_cmd()
86 { }
88 public:
89 virtual int execute();
93 /*************************************************************************
94 Drop_user_cmd: support for --drop-user command-line option.
95 *************************************************************************/
97 class Drop_user_cmd: public User_management_cmd
99 public:
100 Drop_user_cmd()
103 public:
104 virtual int execute();
108 /*************************************************************************
109 Edit_user_cmd: support for --edit-user command-line option.
110 *************************************************************************/
112 class Edit_user_cmd: public User_management_cmd
114 public:
115 Edit_user_cmd()
118 public:
119 virtual int execute();
123 /*************************************************************************
124 Clean_db_cmd: support for --clean-db command-line option.
125 *************************************************************************/
127 class Clean_db_cmd: public User_management_cmd
129 public:
130 Clean_db_cmd()
133 public:
134 virtual int execute();
138 /*************************************************************************
139 Check_db_cmd: support for --check-db command-line option.
140 *************************************************************************/
142 class Check_db_cmd: public User_management_cmd
144 public:
145 Check_db_cmd()
148 public:
149 virtual int execute();
153 /*************************************************************************
154 List_users_cmd: support for --list-users command-line option.
155 *************************************************************************/
157 class List_users_cmd: public User_management_cmd
159 public:
160 List_users_cmd()
163 public:
164 virtual int execute();
167 #endif // INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H