1 /* 2 * Copyright (c) 2022-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_DM_ABILITY_MANAGER_H 17 #define OHOS_DM_ABILITY_MANAGER_H 18 19 #include <semaphore.h> 20 21 #include <mutex> 22 #include <string> 23 #include <vector> 24 25 #include "dm_single_instance.h" 26 27 namespace OHOS { 28 namespace DistributedHardware { 29 enum AbilityStatus { ABILITY_STATUS_FAILED = 0, ABILITY_STATUS_SUCCESS = 1, ABILITY_STATUS_START = 2 }; 30 31 enum UiAction { 32 USER_OPERATION_TYPE_ALLOW_AUTH = 0, 33 USER_OPERATION_TYPE_CANCEL_AUTH = 1, 34 USER_OPERATION_TYPE_AUTH_CONFIRM_TIMEOUT = 2, 35 USER_OPERATION_TYPE_CANCEL_PINCODE_DISPLAY = 3, 36 USER_OPERATION_TYPE_CANCEL_PINCODE_INPUT = 4, 37 USER_OPERATION_TYPE_DONE_PINCODE_INPUT = 5, 38 USER_OPERATION_TYPE_ALLOW_AUTH_ALWAYS = 6, 39 }; 40 41 class DmAbilityManager { 42 public: 43 AbilityStatus StartAbility(const std::string ¶ms); 44 }; 45 } // namespace DistributedHardware 46 } // namespace OHOS 47 #endif 48