1/*
2 * Copyright (c) 2021-2022 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
16import Log from '../../../../../../common/src/main/ets/default/Log';
17import {getAudioManager}from '../../../../../../common/src/main/ets/default/SingleInstanceHelper';
18
19const SYSTEMUI_AUDIOVOLUMETYPE_MEDIA = 'settings.audio.media'
20let TAG = 'Control-VolumeModel';
21var mVolumeValue = AppStorage.SetAndLink('VolumeValue', 5);
22
23export class VolumeModel {
24  helper: any
25  uri: string
26
27  init(): void{
28  }
29
30  registerVolume() {
31  }
32
33  unRegisterVolume() {
34  }
35
36  setVolume(callback) {
37    let value = parseInt(callback.value);
38    Log.showInfo(TAG, `setVolume ${value}`);
39    mVolumeValue.set(value);
40  }
41
42  getVolume() {
43    Log.showInfo(TAG, 'getVolume');
44  }
45
46  getMaxVolume(callback, volumeType) {
47    Log.showInfo(TAG, `getMaxVolume volumeType:${volumeType} `);
48  }
49
50  getMinVolume(callback, volumeType) {
51    Log.showInfo(TAG, `getMaxVolume volumeType:${volumeType} `);
52  }
53}
54
55let mVolumeModel = new VolumeModel();
56
57export default mVolumeModel as VolumeModel;