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 INTELL_VOICE_SERVICE_PROXY_H 17 #define INTELL_VOICE_SERVICE_PROXY_H 18 19 #include <iremote_proxy.h> 20 #include "i_intell_voice_service.h" 21 #include "i_intell_voice_engine.h" 22 23 namespace OHOS { 24 namespace IntellVoiceEngine { 25 class IntellVoiceServiceProxy : public IRemoteProxy<IIntellVoiceService> { 26 public: IntellVoiceServiceProxy(const sptr<IRemoteObject> & impl)27 explicit IntellVoiceServiceProxy(const sptr<IRemoteObject> &impl) : IRemoteProxy<IIntellVoiceService>(impl) {} ~IntellVoiceServiceProxy()28 virtual ~IntellVoiceServiceProxy() {}; 29 30 int32_t CreateIntellVoiceEngine(IntellVoiceEngineType type, sptr<IIntellVoiceEngine> &inst) override; 31 int32_t ReleaseIntellVoiceEngine(IntellVoiceEngineType type) override; 32 int32_t GetUploadFiles(int numMax, std::vector<UploadHdiFile> &files) override; 33 int32_t SetParameter(const std::string &keyValueList) override; 34 std::string GetParameter(const std::string &key) override; 35 int32_t GetWakeupSourceFilesList(std::vector<std::string> &cloneFiles) override; 36 int32_t GetWakeupSourceFile(const std::string &filePath, std::vector<uint8_t> &buffer) override; 37 int32_t SendWakeupFile(const std::string &filePath, const std::vector<uint8_t> &buffer) override; 38 int32_t EnrollWithWakeupFilesForResult(const std::string &wakeupInfo, const sptr<IRemoteObject> object) override; 39 int32_t ClearUserData() override; 40 41 private: 42 static inline BrokerDelegator<IntellVoiceServiceProxy> delegator_; 43 }; 44 } 45 } 46 47 #endif 48