00001 #ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H 00002 #define INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H 00003 00004 /* 00005 Copyright (C) 2006 MySQL AB 00006 00007 This program is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 */ 00021 00022 /* 00023 This header contains declarations of classes inteded to support 00024 user-management commands (such as add user, get list of users, etc). 00025 00026 The general idea is to have one interface (pure abstract class) for such a 00027 command. Each concrete user-management command is implemented in concrete 00028 class, derived from the common interface. 00029 */ 00030 00031 #if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE) 00032 #pragma interface 00033 #endif 00034 00035 /************************************************************************* 00036 User_management_cmd -- base class for User-management commands. 00037 *************************************************************************/ 00038 00039 class User_management_cmd 00040 { 00041 public: 00042 User_management_cmd() 00043 { } 00044 00045 virtual ~User_management_cmd() 00046 { } 00047 00048 public: 00049 /* 00050 Executes user-management command. 00051 00052 SYNOPSYS 00053 execute() 00054 00055 RETURN 00056 See exit_codes.h for possible values. 00057 */ 00058 00059 virtual int execute() = 0; 00060 }; 00061 00062 00063 /************************************************************************* 00064 Print_password_line_cmd: support for --print-password-line command-line 00065 option. 00066 *************************************************************************/ 00067 00068 class Print_password_line_cmd : public User_management_cmd 00069 { 00070 public: 00071 Print_password_line_cmd() 00072 { } 00073 00074 public: 00075 virtual int execute(); 00076 }; 00077 00078 00079 /************************************************************************* 00080 Add_user_cmd: support for --add-user command-line option. 00081 *************************************************************************/ 00082 00083 class Add_user_cmd : public User_management_cmd 00084 { 00085 public: 00086 Add_user_cmd() 00087 { } 00088 00089 public: 00090 virtual int execute(); 00091 }; 00092 00093 00094 /************************************************************************* 00095 Drop_user_cmd: support for --drop-user command-line option. 00096 *************************************************************************/ 00097 00098 class Drop_user_cmd : public User_management_cmd 00099 { 00100 public: 00101 Drop_user_cmd() 00102 { } 00103 00104 public: 00105 virtual int execute(); 00106 }; 00107 00108 00109 /************************************************************************* 00110 Edit_user_cmd: support for --edit-user command-line option. 00111 *************************************************************************/ 00112 00113 class Edit_user_cmd : public User_management_cmd 00114 { 00115 public: 00116 Edit_user_cmd() 00117 { } 00118 00119 public: 00120 virtual int execute(); 00121 }; 00122 00123 00124 /************************************************************************* 00125 Clean_db_cmd: support for --clean-db command-line option. 00126 *************************************************************************/ 00127 00128 class Clean_db_cmd : public User_management_cmd 00129 { 00130 public: 00131 Clean_db_cmd() 00132 { } 00133 00134 public: 00135 virtual int execute(); 00136 }; 00137 00138 00139 /************************************************************************* 00140 Check_db_cmd: support for --check-db command-line option. 00141 *************************************************************************/ 00142 00143 class Check_db_cmd : public User_management_cmd 00144 { 00145 public: 00146 Check_db_cmd() 00147 { } 00148 00149 public: 00150 virtual int execute(); 00151 }; 00152 00153 00154 /************************************************************************* 00155 List_users_cmd: support for --list-users command-line option. 00156 *************************************************************************/ 00157 00158 class List_users_cmd : public User_management_cmd 00159 { 00160 public: 00161 List_users_cmd() 00162 { } 00163 00164 public: 00165 virtual int execute(); 00166 }; 00167 00168 #endif // INCLUDES_MYSQL_INSTANCE_MANAGER_USER_MANAGEMENT_CMD_H
1.4.7

