1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_ABILITY_RUNTIME_ACCESSIBILITY_ABILITY_COMMOND_COMMON_TEST_H
17 #define OHOS_ABILITY_RUNTIME_ACCESSIBILITY_ABILITY_COMMOND_COMMON_TEST_H
18 namespace OHOS {
19 namespace AAFwk {
20 const std::string ACCESSIBILITY_TOOL_NAME = "accessibility";
21 const std::string ACCESSIBILITY_HELP_MSG =
22     "usage: accessibility <command>\n"
23     "these are common accessibility commands list:\n"
24     "  help                        list available commands\n"
25     "  enable                      enable ability with options\n"
26     "  disable                     disable ability with options\n"
27     "  list                        list the installed abilities info\n"
28     "  setShortKeyState            set the state of the short key configuration item\n"
29     "  setMouseKeyState            set the state of the mouse key configuration item\n"
30     "  setCaptionState             set the state of the caption configuration item\n"
31     "  setMouseAutoClick           set the time of the mouse auto click configuration item\n"
32     "  setShortKeyTarget           set the name of the short key target configuration item\n"
33     "  setHighContrastTextState    set the state of the high contrast text configuration item\n"
34     "  setInvertColorState         set the state of the invert color configuration item\n"
35     "  setDaltonizationColorFilter set the type of the daltonization color filter configuration item\n"
36     "  setContentTimeout           set the time of the toast content duration configuration item\n"
37     "  setAnimationOffState        set the state of the animation off configuration item\n"
38     "  setBrightnessDiscount       set the discount of the screen brightness configuration item\n"
39     "  setAudioMonoState           set the state of the audio mono configuration item\n"
40     "  setAudioBalance             set the value of the audio balance configuration item\n";
41 
42 const std::string ACCESSIBILITY_SET_SCREEN_MAGNIFICATION_STATE_OK = "set screen magnification state successfully.";
43 const std::string ACCESSIBILITY_SET_SCREEN_MAGNIFICATION_STATE_NG =
44     "error: failed to set screen magnification state";
45 const std::string ACCESSIBILITY_SET_SHORT_KEY_STATE_OK = "set short key state successfully.";
46 const std::string ACCESSIBILITY_SET_SHORT_KEY_STATE_NG = "error: failed to set short key state.";
47 const std::string ACCESSIBILITY_SET_MOUSE_KEY_STATE_OK = "set mouse key state successfully.";
48 const std::string ACCESSIBILITY_SET_MOUSE_KEY_STATE_NG = "error: failed to set mouse key state.";
49 const std::string ACCESSIBILITY_SET_CAPTION_STATE_OK = "set caption state successfully.";
50 const std::string ACCESSIBILITY_SET_CAPTION_STATE_NG = "error: failed to set caption state.";
51 const std::string ACCESSIBILITY_SET_AUTO_CLICK_TIME_OK = "set mouse auto click time successfully.";
52 const std::string ACCESSIBILITY_SET_AUTO_CLICK_TIME_NG = "error: failed to set mouse auto click time.";
53 const std::string ACCESSIBILITY_SET_HIGH_CONTRAST_TEXT_STATE_OK = "set high contrast text state successfully.";
54 const std::string ACCESSIBILITY_SET_HIGH_CONTRAST_TEXT_STATE_NG = "error: failed to set high contrast text state.";
55 const std::string ACCESSIBILITY_SET_INVERT_COLOR_STATE_OK = "set invert color state successfully.";
56 const std::string ACCESSIBILITY_SET_INVERT_COLOR_STATE_NG = "error: failed to set invert color state.";
57 const std::string ACCESSIBILITY_SET_DALTONIZATIONZATION_COLOR_FILTER_OK =
58     "set daltonization color filter successfully.";
59 const std::string ACCESSIBILITY_SET_DALTONIZATIONZATION_COLOR_FILTER_NG =
60     "error: failed to set daltonization color filter.";
61 const std::string ACCESSIBILITY_SET_CONTENT_TIME_OK = "set content timeout successfully.";
62 const std::string ACCESSIBILITY_SET_CONTENT_TIME_NG = "error: failed to set content timeout.";
63 const std::string ACCESSIBILITY_SET_ANIMATION_OFF_STATE_OK = "set animation off state successfully.";
64 const std::string ACCESSIBILITY_SET_ANIMATION_OFF_STATE_NG = "error: failed to set animation off state.";
65 const std::string ACCESSIBILITY_SET_BRIGHTNESS_DISCOUNT_OK = "set brightness discount successfully.";
66 const std::string ACCESSIBILITY_SET_BRIGHTNESS_DISCOUNT_NG = "error: failed to set brightness discount.\n";
67 const std::string ACCESSIBILITY_SET_AUDIO_MONO_STATE_OK = "set audio mono state successfully.";
68 const std::string ACCESSIBILITY_SET_AUDIO_MONO_STATE_NG = "error: failed to set audio mono state.";
69 const std::string ACCESSIBILITY_SET_AUDIO_BALANCE_OK = "set audio balance successfully.\n";
70 const std::string ACCESSIBILITY_SET_AUDIO_BALANCE_NG = "error: failed to set audio balance successfully.";
71 
72 const std::string ACCESSIBILITY_ABILITY_NO_ABILITY_ARGUMENT =
73     "argument -a <ability-name> or --ability=<ability-name> is required!";
74 const std::string ACCESSIBILITY_ABILITY_DUPLICATE_ARGUMENT = "there are duplicate arguments.";
75 const std::string ACCESSIBILITY_ABILITY_NO_ABILITY_ARGUMENT_VALUE = "option -a requires a value.";
76 const std::string ACCESSIBILITY_ABILITY_NO_BUNDLE_ARGUMENT =
77     "argument -b <bundle-name> or --bundle=<bundle-name> is required!";
78 const std::string ACCESSIBILITY_ABILITY_NO_BUNDLE_ARGUMENT_VALUE = "option -b requires a value.";
79 const std::string ACCESSIBILITY_ABILITY_NO_CAPABILITIES_ARGUMENT =
80     "argument -c <capabilities-abbr>"
81     " or --capabilities=<capabilities-abbr> is required!";
82 const std::string ACCESSIBILITY_ABILITY_NO_CAPABILITIES_ARGUMENT_VALUE = "option -c requires a value.";
83 const std::string ACCESSIBILITY_ABILITY_NO_SET_ARGUMENT_VALUE = "option -v requires a value.";
84 const std::string ACCESSIBILITY_ABILITY_SET_VALUE_INVALID = "value is invalid.";
85 const std::string ACCESSIBILITY_HELP_MSG_NO_OPTION = "missing options.";
86 const std::string ACCESSIBILITY_ABILITY_NOT_FOUND = " was not found!";
87 const std::string ACCESSIBILITY_ABILITY_TOO_MANY_ARGUMENT = "there are too many arguments ";
88 
89 const std::string ACCESSIBILITY_HELP_MSG_SET_SCREEN_MAGNIFICATION_STATE =
90     "usage: accessibility setScreenMagnificationState [-v <0 | 1> ]\n"
91     "set the state of the screen magnification configuration item\n";
92 
93 const std::string ACCESSIBILITY_HELP_MSG_SET_SHORT_KEY_STATE =
94     "usage: accessibility setShortKeyState [-v <0 | 1> ]\n"
95     "set the state of the short key configuration item\n";
96 
97 const std::string ACCESSIBILITY_HELP_MSG_SET_MOUSE_KEY_STATE =
98     "usage: accessibility setMouseKeyState [-v <0 | 1> ]\n"
99     "set the state of the mouse key configuration item\n";
100 
101 const std::string ACCESSIBILITY_HELP_MSG_SET_CAPTION_STATE =
102     "usage: accessibility setCaptionState [-v <0 | 1> ]\n"
103     "set the state of the caption configuration item\n";
104 
105 const std::string ACCESSIBILITY_HELP_MSG_SET_AUTO_CLICK_TIME =
106     "usage: accessibility setMouseAutoClick [-v <time-value>]\n"
107     "the range of time-value is 1000 to 5000 and the default unit is ms\n"
108     "set the time of the mouse auto click configuration item\n";
109 
110 const std::string ACCESSIBILITY_HELP_MSG_SET_SHORT_KEY_TARGET =
111     "usage: accessibility setShortKeyTarget -a <ability-name> -b <bundle-name>\n"
112     "set the name of the short key target configuration item\n";
113 
114 const std::string ACCESSIBILITY_HELP_MSG_HIGH_CONTRAST_TEXT_STATE =
115     "usage: accessibility setHighContrastTextState [-v <0 | 1> ]\n"
116     "set the state of the high contrast text configuration item\n";
117 
118 const std::string ACCESSIBILITY_HELP_MSG_SET_INVERT_COLOR_STATE =
119     "usage: accessibility setInvertColorState [-v <0 | 1>]\n"
120     "set the state of the invert color configuration item\n";
121 
122 const std::string ACCESSIBILITY_HELP_MSG_SET_DALTONIZATION_COLOR_FILTER =
123     "usage: accessibility setDaltonizationColorFilter [-v <0 | 1 | 2 | 3>]\n"
124     "normal = 0, protanomaly = 1, deuteranomaly = 2, tritanomaly = 3\n"
125     "set the type of the daltonization color filter configuration item\n";
126 
127 const std::string ACCESSIBILITY_HELP_MSG_SET_CONTENT_TIME_OUT =
128     "usage: accessibility setContentTimeout [-v <time-value>]\n"
129     "the range of time-value is 0 to 5000 and the default unit is ms\n"
130     "set the time of the toast content duration configuration item\n";
131 
132 const std::string ACCESSIBILITY_HELP_MSG_ANIMATION_OFF_STATE =
133     "usage: accessibility setAnimationOffState [-v <0 | 1>]\n"
134     "set the state of the animation off configuration item\n";
135 
136 const std::string ACCESSIBILITY_HELP_MSG_SET_BRIGHTNESS_DISCOUNT =
137     "usage: accessibility setBrightnessDiscount [-v <discount-value>]\n"
138     "the percentage of discount-value is 0 to 100\n"
139     "set the discount of the screen brightness configuration item\n";
140 
141 const std::string ACCESSIBILITY_HELP_MSG_SET_AUDIO_MONO_STATE =
142     "usage: accessibility setAudioMonoState [-v <0 | 1>]\n"
143     "set the state of the audio mono configuration item\n";
144 
145 const std::string ACCESSIBILITY_HELP_MSG_SET_AUDIO_BALANCE =
146     "usage: accessibility setAudioBalance [-v <balance-value>]\n"
147     "the percentage of balance-value is -100 to 100\n"
148     "the negative values represent the left channel and positive values represent the right channel\n"
149     "set the value of the audio balance configuration item\n";
150 
151 const std::string ACCESSIBILITY_HELP_MSG_ENABLE_ABILITY =
152     "usage: accessibility enable [-a <ability-name>] [-b <bundle-name>] [-c <capabilities-abbr>]\n"
153     "enable the auxiliary application with bundle-name and ability-name and capabilities-abbr\n";
154 
155 const std::string ACCESSIBILITY_HELP_MSG_DISABLE_ABILITY =
156     "usage: accessibility disable [-a <ability-name>] [-b <bundle-name>]\n"
157     "disable the auxiliary application with bundle-name and ability-name\n";
158 }  // AAFwk
159 }  // OHOS
160 #endif // OHOS_ABILITY_RUNTIME_ACCESSIBILITY_ABILITY_COMMOND_COMMON_TEST_H