1c5e268c6Sopenharmony_ci/*
2c5e268c6Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
3c5e268c6Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4c5e268c6Sopenharmony_ci * you may not use this file except in compliance with the License.
5c5e268c6Sopenharmony_ci * You may obtain a copy of the License at
6c5e268c6Sopenharmony_ci *
7c5e268c6Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8c5e268c6Sopenharmony_ci *
9c5e268c6Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10c5e268c6Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11c5e268c6Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c5e268c6Sopenharmony_ci * See the License for the specific language governing permissions and
13c5e268c6Sopenharmony_ci * limitations under the License.
14c5e268c6Sopenharmony_ci */
15c5e268c6Sopenharmony_ci
16c5e268c6Sopenharmony_ci/**
17c5e268c6Sopenharmony_ci * @addtogroup HdiIntelligentVoiceEngine
18c5e268c6Sopenharmony_ci * @{
19c5e268c6Sopenharmony_ci *
20c5e268c6Sopenharmony_ci * @brief Provides unified APIs for intelligent voice framework services to access intelligent voice engine drivers.
21c5e268c6Sopenharmony_ci *
22c5e268c6Sopenharmony_ci * An intelligent voice framework service can obtain an intelligent voice engine driver object or agent and then call APIs provided by this object or agent to
23c5e268c6Sopenharmony_ci * access different types of intelligent voice engine devices based on the intelligent voice engine IDs, thereby obtaining or sending intelligent voice engine information,
24c5e268c6Sopenharmony_ci * creating or releasing an intelligent voice engine adapter, attaching or detaching the intelligent voice engine,
25c5e268c6Sopenharmony_ci * starting or stopping the intelligent voice engine, setting parameter to or getting parameter from the intelligent voice engine, 
26c5e268c6Sopenharmony_ci * writing audio or reading files from the intelligent voice engine, subscribing callback to the intelligent voice engine.
27c5e268c6Sopenharmony_ci *
28c5e268c6Sopenharmony_ci * @since 4.0
29c5e268c6Sopenharmony_ci * @version 1.2
30c5e268c6Sopenharmony_ci */
31c5e268c6Sopenharmony_ci
32c5e268c6Sopenharmony_ci/**
33c5e268c6Sopenharmony_ci * @file IIntellVoiceEngineManager.idl
34c5e268c6Sopenharmony_ci *
35c5e268c6Sopenharmony_ci * @brief Declares the APIs provided by the intelligent voice engine manager for obtaining or sending intelligent voice engine information,
36c5e268c6Sopenharmony_ci * creating or releasing an intelligent voice engine adapter.
37c5e268c6Sopenharmony_ci *
38c5e268c6Sopenharmony_ci * @since 5.0
39c5e268c6Sopenharmony_ci * @version 1.2
40c5e268c6Sopenharmony_ci */
41c5e268c6Sopenharmony_ci
42c5e268c6Sopenharmony_cipackage ohos.hdi.intelligent_voice.engine.v1_2;
43c5e268c6Sopenharmony_ci
44c5e268c6Sopenharmony_ciimport ohos.hdi.intelligent_voice.engine.v1_1.IIntellVoiceEngineManager;
45c5e268c6Sopenharmony_ciimport ohos.hdi.intelligent_voice.engine.v1_0.IntellVoiceEngineTypes;
46c5e268c6Sopenharmony_ciimport ohos.hdi.intelligent_voice.engine.v1_2.IntellVoiceEngineTypes;
47c5e268c6Sopenharmony_ciimport ohos.hdi.intelligent_voice.engine.v1_2.IIntellVoiceEngineAdapter;
48c5e268c6Sopenharmony_ci
49c5e268c6Sopenharmony_ci/**
50c5e268c6Sopenharmony_ci * @brief Defines the functions in intelligent voice engine manager.
51c5e268c6Sopenharmony_ci *
52c5e268c6Sopenharmony_ci * The operations include obtaining or sending intelligent voice engine information, creating or releasing an intelligent voice engine adapter.
53c5e268c6Sopenharmony_ci *
54c5e268c6Sopenharmony_ci * @since 4.0
55c5e268c6Sopenharmony_ci * @version 1.2
56c5e268c6Sopenharmony_ci */
57c5e268c6Sopenharmony_ciinterface IIntellVoiceEngineManager extends ohos.hdi.intelligent_voice.engine.v1_1.IIntellVoiceEngineManager {
58c5e268c6Sopenharmony_ci    /**
59c5e268c6Sopenharmony_ci     * @brief Creates intelligent voice engine adapter.
60c5e268c6Sopenharmony_ci     * @param descriptor Indicates intelligent voice engine adapter description.
61c5e268c6Sopenharmony_ci     * The description includes intelligent voice engine adapter type, see {@link IntellVoiceEngineAdapterDescriptor}.
62c5e268c6Sopenharmony_ci     * @param adapter Indicates the pointer to the intelligent voice engine adapter to operate, see {@link IIntellVoiceEngineAdapter}.
63c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
64c5e268c6Sopenharmony_ci     *
65c5e268c6Sopenharmony_ci     * @since 5.0
66c5e268c6Sopenharmony_ci     * @version 1.2
67c5e268c6Sopenharmony_ci     */
68c5e268c6Sopenharmony_ci    CreateAdapter_V_2([in] struct IntellVoiceEngineAdapterDescriptor descriptor, [out] IIntellVoiceEngineAdapter adapter);
69c5e268c6Sopenharmony_ci
70c5e268c6Sopenharmony_ci    /**
71c5e268c6Sopenharmony_ci     * @brief Obtains files needed to upload.
72c5e268c6Sopenharmony_ci     * @param numMax Indicates the maximum count of files needed to upload.
73c5e268c6Sopenharmony_ci     * @param files Indicates the vector of files needed to upload.
74c5e268c6Sopenharmony_ci     * The file includes upload hdi file type, files description, files content, see {@link UploadHdiFile}.
75c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
76c5e268c6Sopenharmony_ci     *
77c5e268c6Sopenharmony_ci     * @since 5.0
78c5e268c6Sopenharmony_ci     * @version 1.2
79c5e268c6Sopenharmony_ci     */
80c5e268c6Sopenharmony_ci    GetUploadFiles([in] int numMax, [out] List<struct UploadHdiFile> files);
81c5e268c6Sopenharmony_ci
82c5e268c6Sopenharmony_ci    /**
83c5e268c6Sopenharmony_ci     * @brief Obtains clone files list.
84c5e268c6Sopenharmony_ci     * @param cloneFiles Indicates files list needed to clone.
85c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
86c5e268c6Sopenharmony_ci     *
87c5e268c6Sopenharmony_ci     * @since 5.0
88c5e268c6Sopenharmony_ci     * @version 1.2
89c5e268c6Sopenharmony_ci     */
90c5e268c6Sopenharmony_ci    GetCloneFilesList([out] List <String> cloneFiles);
91c5e268c6Sopenharmony_ci
92c5e268c6Sopenharmony_ci    /**
93c5e268c6Sopenharmony_ci     * @brief Obtains clone file.
94c5e268c6Sopenharmony_ci     * @param filePath Indicates the path of file that will be cloned.
95c5e268c6Sopenharmony_ci     * @param buffer Indicates the content of file that will be cloned.
96c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
97c5e268c6Sopenharmony_ci     *
98c5e268c6Sopenharmony_ci     * @since 5.0
99c5e268c6Sopenharmony_ci     * @version 1.2
100c5e268c6Sopenharmony_ci     */
101c5e268c6Sopenharmony_ci    GetCloneFile([in] String filePath, [out] List <unsigned char> buffer);
102c5e268c6Sopenharmony_ci
103c5e268c6Sopenharmony_ci    /**
104c5e268c6Sopenharmony_ci     * @brief Sends clone file.
105c5e268c6Sopenharmony_ci     * @param filePath Indicates the path of file that will be send.
106c5e268c6Sopenharmony_ci     * @param buffer Indicates the content of file that will be send.
107c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
108c5e268c6Sopenharmony_ci     *
109c5e268c6Sopenharmony_ci     * @since 5.0
110c5e268c6Sopenharmony_ci     * @version 1.2
111c5e268c6Sopenharmony_ci     */
112c5e268c6Sopenharmony_ci    SendCloneFile([in] String filePath, [in] List <unsigned char> buffer);
113c5e268c6Sopenharmony_ci    /**
114c5e268c6Sopenharmony_ci     * @brief Clear user wakeup data.
115c5e268c6Sopenharmony_ci     * @param wakeupPhrase Indicates wakeup phrase.
116c5e268c6Sopenharmony_ci     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
117c5e268c6Sopenharmony_ci     *
118c5e268c6Sopenharmony_ci     * @since 5.0
119c5e268c6Sopenharmony_ci     * @version 1.2
120c5e268c6Sopenharmony_ci     */
121c5e268c6Sopenharmony_ci    ClearUserWakeupData([in] String wakeupPhrase);
122c5e268c6Sopenharmony_ci}
123