00001 #ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H 00002 #define INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H 00003 /* Copyright (C) 2003 MySQL AB & MySQL Finland AB & TCX DataKonsult AB 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program; if not, write to the Free Software 00017 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ 00018 00019 /* 00020 Options - all possible command-line options for the Instance Manager grouped 00021 in one struct. 00022 */ 00023 00024 #include <my_global.h> 00025 00026 #if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE) 00027 #pragma interface 00028 #endif 00029 00030 class User_management_cmd; 00031 00032 struct Options 00033 { 00034 /* 00035 NOTE: handle_options() expects value of my_bool type for GET_BOOL 00036 accessor (i.e. bool must not be used). 00037 */ 00038 00039 struct User_management 00040 { 00041 static User_management_cmd *cmd; 00042 00043 static char *user_name; 00044 static char *password; 00045 }; 00046 00047 struct Main 00048 { 00049 /* this is not an option parsed by handle_options(). */ 00050 static bool is_forced_default_file; 00051 00052 static const char *pid_file_name; 00053 static const char *socket_file_name; 00054 static const char *password_file_name; 00055 static const char *default_mysqld_path; 00056 static uint monitoring_interval; 00057 static uint port_number; 00058 static const char *bind_address; 00059 static const char *config_file; 00060 static my_bool mysqld_safe_compatible; 00061 }; 00062 00063 #ifndef DBUG_OFF 00064 struct Debug 00065 { 00066 static const char *config_str; 00067 }; 00068 #endif 00069 00070 #ifndef __WIN__ 00071 00072 struct Daemon 00073 { 00074 static my_bool run_as_service; 00075 static const char *log_file_name; 00076 static const char *user; 00077 static const char *angel_pid_file_name; 00078 }; 00079 00080 #else 00081 00082 struct Service 00083 { 00084 static my_bool install_as_service; 00085 static my_bool remove_service; 00086 static my_bool stand_alone; 00087 }; 00088 00089 #endif 00090 00091 public: 00092 static int load(int argc, char **argv); 00093 static void cleanup(); 00094 00095 private: 00096 Options(); /* Deny instantiation of this class. */ 00097 00098 private: 00099 /* argv pointer returned by load_defaults() to be used by free_defaults() */ 00100 static char **saved_argv; 00101 }; 00102 00103 #endif // INCLUDES_MYSQL_INSTANCE_MANAGER_OPTIONS_H
1.4.7

