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_EVENT_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_EVENT_MULTIMODAL_ACE_MULTIMODAL_EVENT_H 18 19 #include "core/event/multimodal/ace_multimodal_define.h" 20 21 namespace OHOS::Ace { 22 23 class AceMultimodalEvent final { 24 public: GetSourceType()25 MultimodalSourceType GetSourceType() const 26 { 27 return sourceType_; 28 } 29 SetSourceType(MultimodalSourceType sourceType)30 void SetSourceType(MultimodalSourceType sourceType) 31 { 32 sourceType_ = sourceType; 33 } 34 GetVoice()35 const VoiceLabel& GetVoice() const 36 { 37 return voice_; 38 } 39 SetVoice(const VoiceLabel & voice)40 void SetVoice(const VoiceLabel& voice) 41 { 42 voice_ = voice; 43 } 44 GetMultimodalGeneralEvent()45 MultimodalGeneralEvent GetMultimodalGeneralEvent() const 46 { 47 return multimodalGeneralEvent_; 48 } 49 SetMultimodalGeneralEvent(MultimodalGeneralEvent multimodalGeneralEvent)50 void SetMultimodalGeneralEvent(MultimodalGeneralEvent multimodalGeneralEvent) 51 { 52 multimodalGeneralEvent_ = multimodalGeneralEvent; 53 } 54 55 private: 56 VoiceLabel voice_; 57 MultimodalSourceType sourceType_ = MultimodalSourceType::SOURCE_VOICE; 58 MultimodalGeneralEvent multimodalGeneralEvent_ = MultimodalGeneralEvent::NO_INTENT; 59 }; 60 61 } // namespace OHOS::Ace 62 63 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_EVENT_MULTIMODAL_ACE_MULTIMODAL_EVENT_H 64