1 /* 2 * Copyright (c) 2021 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 FOUNDATION_ACE_FRAMEWORKS_CORE_EVENT_MULTIMODAL_ACE_MULTIMODAL_DEFINE_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_EVENT_MULTIMODAL_ACE_MULTIMODAL_DEFINE_H 18 19 #include <cstdint> 20 #include <string> 21 22 namespace OHOS::Ace { 23 24 enum ModuleMask { 25 VOICE_MASK = 0x0, 26 BODY_LANGUAGE_MASK = 0x1, 27 LOCATION_MASK = 0x2, 28 TRADITIONAL_KEY_MASK = 0x4, 29 TRADITIONAL_TP_MASK = 0x8, 30 MASK_SHIFT = 3, 31 }; 32 33 enum class MultimodalSourceType { 34 SOURCE_INVALID = 0, 35 SOURCE_VOICE, 36 SOURCE_CV, 37 SOURCE_SENSOR, 38 SOURCE_KEY, 39 SOURCE_TP, 40 SOURCE_MOTION, 41 SOURCE_TYPE_MAX, 42 }; 43 44 struct VoiceLabel { 45 std::string hotWord; 46 std::string slot; 47 int32_t action; 48 std::string badge; 49 }; 50 51 enum class MultimodalGeneralEvent : uint32_t { 52 HOME = VOICE_MASK << MASK_SHIFT, 53 BACK, 54 OPEN_SETTING, 55 CLOSE_SETTING, 56 SWITCH_NIGHT_MODE, 57 QUIT_NIGHT_MODE, 58 SCREEN_CAPTURE, 59 NEXT, 60 PREV, 61 NO_INTENT 62 }; 63 64 } // namespace OHOS::Ace 65 66 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_EVENT_MULTIMODAL_ACE_MULTIMODAL_DEFINE_H 67