1 /* 2 * Copyright (c) 2023 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 IINTELL_VOICE_SERVICE_H 17 #define IINTELL_VOICE_SERVICE_H 18 #include "iremote_broker.h" 19 #include "v1_2/intell_voice_engine_types.h" 20 #include "i_intell_voice_engine.h" 21 22 #include "i_intell_voice_update_callback.h" 23 24 namespace OHOS { 25 namespace IntellVoiceEngine { 26 using OHOS::HDI::IntelligentVoice::Engine::V1_2::UploadHdiFile; 27 28 class IIntellVoiceService : public IRemoteBroker { 29 public: 30 DECLARE_INTERFACE_DESCRIPTOR(u"IntellVoiceFramework.Service"); 31 32 enum { 33 HDI_INTELL_VOICE_SERVICE_CREATE_ENGINE = 0, 34 HDI_INTELL_VOICE_SERVICE_RELEASE_ENGINE, 35 HDI_INTELL_VOICE_SERVICE_GET_REPORTED_FILES, 36 HDI_INTELL_VOICE_SERVICE_CREATE_EVALUATOR, 37 HDI_INTELL_VOICE_SERVICE_RELEASE_EVALUATOR, 38 HDI_INTELL_VOICE_SERVICE_GET_PARAMETER, 39 HDI_INTELL_VOICE_SERVICE_GET_CLONE_FILES_LIST, 40 HDI_INTELL_VOICE_SERVICE_GET_CLONE_FILE, 41 HDI_INTELL_VOICE_SERVICE_SEND_CLONE_FILE, 42 HDI_INTELL_VOICE_SERVICE_CLONE_FOR_RESULT, 43 HDI_INTELL_VOICE_SERVICE_SET_PARAMETER, 44 HDI_INTELL_VOICE_SERVICE_CLEAR_USER_DATA 45 }; 46 47 virtual int32_t CreateIntellVoiceEngine(IntellVoiceEngineType type, sptr<IIntellVoiceEngine> &inst) = 0; 48 virtual int32_t ReleaseIntellVoiceEngine(IntellVoiceEngineType type) = 0; 49 virtual int32_t GetUploadFiles(int numMax, std::vector<UploadHdiFile> &files) = 0; 50 virtual int32_t SetParameter(const std::string &keyValueList) = 0; 51 virtual std::string GetParameter(const std::string &key) = 0; 52 virtual int32_t GetWakeupSourceFilesList(std::vector<std::string>& cloneFiles) = 0; 53 virtual int32_t GetWakeupSourceFile(const std::string &filePath, std::vector<uint8_t> &buffer) = 0; 54 virtual int32_t SendWakeupFile(const std::string &filePath, const std::vector<uint8_t> &buffer) = 0; 55 virtual int32_t EnrollWithWakeupFilesForResult(const std::string &wakeupInfo, 56 const sptr<IRemoteObject> object) = 0; 57 virtual int32_t ClearUserData() = 0; 58 }; 59 } 60 } 61 #endif 62