1/*
2 * Copyright (c) 2022 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_UTILS_H
17#define OHOS_ABILITY_RUNTIME_ACCESSIBILITY_ABILITY_UTILS_H
18
19#include "accessibility_ability_command.h"
20#include "accessibility_ability_info.h"
21
22namespace OHOS {
23namespace AAFwk {
24class AccessibilityUtils {
25public:
26    static std::string GetStaticCapabilityNames(const Accessibility::AccessibilityAbilityInfo& abilityInfo);
27    static std::string FormatAbilityInfos(
28        const std::vector<Accessibility::AccessibilityAbilityInfo>& installedAbilities);
29    static std::uint32_t GetCapabilityValue(const std::string& capabilityNames);
30    static std::string GetInvalidCapabilityNames(const std::string& enabledCapabilityNames,
31        const std::string& installedCapabilityNames);
32    static std::string GetUnknownArgumentsMsg(const std::vector<std::string>& unknownArguments);
33    static bool IsValidStateString(std::string& stateString);
34    static bool IsValidIntString(std::string& intString, const int32_t lowBound, const int32_t highBound);
35    static std::string& Trim(std::string& inputStr);
36    static int32_t AddPermission();
37};
38} // namespace AAFwk
39} // namespace OHOS
40#endif // OHOS_ABILITY_RUNTIME_ACCESSIBILITY_ABILITY_UTILS_H