Lines Matching refs:string

23 const std::string TOOL_NAME = "acm";
24 const std::string HELP_MSG_NO_OPTION = "error: you must specify an option at least.";
25 const std::string HELP_MSG = "usage: acm <command> [<options>]\n"
35 const std::string HELP_MSG_CREATE =
44 const std::string HELP_MSG_DELETE =
50 const std::string HELP_MSG_DUMP =
57 const std::string HELP_MSG_SET =
63 const std::string HELP_MSG_SWITCH =
69 const std::string HELP_MSG_DEACTIVATE =
76 const std::string HELP_MSG_STOP =
82 const std::string HELP_MSG_OPTION_REQUIRES_AN_ARGUMENT = "error: option requires an argument.";
83 const std::string HELP_MSG_NO_NAME_OPTION = "error: -n <local-account-name> is expected";
84 const std::string HELP_MSG_NO_TYPE_OPTION = "error: -t <type> is expected";
85 const std::string HELP_MSG_NO_ID_OPTION = "error: -i <local-account-id> is expected";
86 const std::string HELP_MSG_NO_CONSTRAINTS_OPTION = "error: -c <constraints> is expected";
87 const std::string HELP_MSG_INVALID_TYPE_ARGUMENT = "error: invalid type argument";
88 const std::string HELP_MSG_INVALID_ID_ARGUMENT = "error: invalid id argument";
90 const std::string STRING_CREATE_OS_ACCOUNT_OK = "create the local account successfully.";
91 const std::string STRING_CREATE_OS_ACCOUNT_NG = "error: failed to create the local account.";
92 const std::string STRING_DELETE_OS_ACCOUNT_OK = "delete the local account successfully.";
93 const std::string STRING_DELETE_OS_ACCOUNT_NG = "error: failed to delete the local account.";
94 const std::string STRING_DUMP_OS_ACCOUNT_NG = "error: failed to dump state.";
95 const std::string STRING_SET_OS_ACCOUNT_CONSTRAINTS_OK = "set constraints for the local account successfully.";
96 const std::string STRING_SET_OS_ACCOUNT_CONSTRAINTS_NG = "error: failed to set constraints for the local account.";
97 const std::string STRING_SWITCH_OS_ACCOUNT_OK = "switch the local account successfully.";
98 const std::string STRING_SWITCH_OS_ACCOUNT_NG = "error: failed to switch the local account.";
99 const std::string STRING_STOP_OS_ACCOUNT_OK = "stop the local account successfully.";
100 const std::string STRING_STOP_OS_ACCOUNT_NG = "error: failed to stop the local account.";
101 const std::string STRING_DEACTIVATE_OS_ACCOUNT_OK = "deactivate the local account successfully.";
102 const std::string STRING_DEACTIVATE_OS_ACCOUNT_NG = "error: failed to deactivate the local account.";
103 const std::string STRING_DEACTIVATE_ALL_OS_ACCOUNTS_OK = "deactivate all local account successfully.";
104 const std::string STRING_DEACTIVATE_ALL_OS_ACCOUNTS_NG = "error: failed to deactivate all local account.";
110 std::string ExecCommand();
115 std::string GetCommandErrorMsg() const;
116 std::string GetUnknownOptionMsg(std::string& unknownOption) const;
128 ErrCode RunAsCreateCommandExistentOptionArgument(const int &option, std::string &name,
129 std::string &shortName, OsAccountType &type, std::vector<std::string> &disallowedList);
133 const int &option, int &id, std::vector<std::string> &constraints, bool &enable);
135 ErrCode RunAsCommonCommandMissingOptionArgument(const std::string &command);
136 ErrCode RunCommandError(const std::string &command);
138 void ParseCommandOpt(const std::string &command, ErrCode &result, int &id);
139 void RunCommand(int &counter, ErrCode &result, bool &enable, int &id, std::vector<std::string> &constraints);
140 ErrCode ParseCreateCommandOpt(std::string &name,
141 std::string &shortName, OsAccountType &osAccountType, std::vector<std::string> &disallowedList);
144 ErrCode AnalyzeDisallowedListArgument(std::vector<std::string> &disallowedList);
146 ErrCode AnalyzeConstraintArgument(std::vector<std::string> &constraints);
152 std::string cmd_;
153 std::vector<std::string> argList_;
155 std::string name_;
156 std::map<std::string, std::function<int()>> commandMap_;
158 std::string resultReceiver_;