1
#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H
2
#define INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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)
34
/*************************************************************************
35
User_management_cmd -- base class for User-management commands.
36
*************************************************************************/
38
class User_management_cmd
44
virtual ~User_management_cmd()
49
Executes user-management command.
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
65
*************************************************************************/
67
class Print_password_line_cmd: public User_management_cmd
70
Print_password_line_cmd()
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
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
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
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
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
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
164
virtual int execute();
167
#endif // INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H