1/*
2 * Copyright (c) 2024 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/**
17 * @addtogroup HdiIntelligentVoiceEngine
18 * @{
19 *
20 * @brief Provides unified APIs for intelligent voice framework services to access intelligent voice engine drivers.
21 *
22 * 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
23 * access different types of intelligent voice engine devices based on the intelligent voice engine IDs, thereby obtaining or sending intelligent voice engine information,
24 * creating or releasing an intelligent voice engine adapter, attaching or detaching the intelligent voice engine,
25 * starting or stopping the intelligent voice engine, setting parameter to or getting parameter from the intelligent voice engine,
26 * writing audio or reading files from the intelligent voice engine, subscribing callback to the intelligent voice engine.
27 *
28 * @since 4.0
29 * @version 1.2
30 */
31
32/**
33 * @file IIntellVoiceEngineManager.idl
34 *
35 * @brief Declares the APIs provided by the intelligent voice engine manager for obtaining or sending intelligent voice engine information,
36 * creating or releasing an intelligent voice engine adapter.
37 *
38 * @since 5.0
39 * @version 1.2
40 */
41
42package ohos.hdi.intelligent_voice.engine.v1_2;
43
44import ohos.hdi.intelligent_voice.engine.v1_1.IIntellVoiceEngineManager;
45import ohos.hdi.intelligent_voice.engine.v1_0.IntellVoiceEngineTypes;
46import ohos.hdi.intelligent_voice.engine.v1_2.IntellVoiceEngineTypes;
47import ohos.hdi.intelligent_voice.engine.v1_2.IIntellVoiceEngineAdapter;
48
49/**
50 * @brief Defines the functions in intelligent voice engine manager.
51 *
52 * The operations include obtaining or sending intelligent voice engine information, creating or releasing an intelligent voice engine adapter.
53 *
54 * @since 4.0
55 * @version 1.2
56 */
57interface IIntellVoiceEngineManager extends ohos.hdi.intelligent_voice.engine.v1_1.IIntellVoiceEngineManager {
58    /**
59     * @brief Creates intelligent voice engine adapter.
60     * @param descriptor Indicates intelligent voice engine adapter description.
61     * The description includes intelligent voice engine adapter type, see {@link IntellVoiceEngineAdapterDescriptor}.
62     * @param adapter Indicates the pointer to the intelligent voice engine adapter to operate, see {@link IIntellVoiceEngineAdapter}.
63     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
64     *
65     * @since 5.0
66     * @version 1.2
67     */
68    CreateAdapter_V_2([in] struct IntellVoiceEngineAdapterDescriptor descriptor, [out] IIntellVoiceEngineAdapter adapter);
69
70    /**
71     * @brief Obtains files needed to upload.
72     * @param numMax Indicates the maximum count of files needed to upload.
73     * @param files Indicates the vector of files needed to upload.
74     * The file includes upload hdi file type, files description, files content, see {@link UploadHdiFile}.
75     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
76     *
77     * @since 5.0
78     * @version 1.2
79     */
80    GetUploadFiles([in] int numMax, [out] List<struct UploadHdiFile> files);
81
82    /**
83     * @brief Obtains clone files list.
84     * @param cloneFiles Indicates files list needed to clone.
85     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
86     *
87     * @since 5.0
88     * @version 1.2
89     */
90    GetCloneFilesList([out] List <String> cloneFiles);
91
92    /**
93     * @brief Obtains clone file.
94     * @param filePath Indicates the path of file that will be cloned.
95     * @param buffer Indicates the content of file that will be cloned.
96     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
97     *
98     * @since 5.0
99     * @version 1.2
100     */
101    GetCloneFile([in] String filePath, [out] List <unsigned char> buffer);
102
103    /**
104     * @brief Sends clone file.
105     * @param filePath Indicates the path of file that will be send.
106     * @param buffer Indicates the content of file that will be send.
107     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
108     *
109     * @since 5.0
110     * @version 1.2
111     */
112    SendCloneFile([in] String filePath, [in] List <unsigned char> buffer);
113    /**
114     * @brief Clear user wakeup data.
115     * @param wakeupPhrase Indicates wakeup phrase.
116     * @return Returns <b>0</b> if the operation is successful; returns a negative value otherwise.
117     *
118     * @since 5.0
119     * @version 1.2
120     */
121    ClearUserWakeupData([in] String wakeupPhrase);
122}
123