2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef SOUND_SOUND_INSTANCE_H_
18 #define SOUND_SOUND_INSTANCE_H_
20 #include "common/extension.h"
21 #include "sound_manager.h"
26 class SoundInstance : public common::ParsedInstance, public SoundManagerSoundModeChangedListener {
29 virtual ~SoundInstance();
32 void SoundManagerSetVolume(const picojson::value& args, picojson::object& out);
33 void SoundManagerUnsetSoundModeChangeListener(const picojson::value& args, picojson::object& out);
34 void SoundManagerGetVolume(const picojson::value& args, picojson::object& out);
35 void SoundManagerUnsetVolumeChangeListener(const picojson::value& args, picojson::object& out);
36 void SoundManagerSetSoundModeChangeListener(const picojson::value& args, picojson::object& out);
37 void SoundManagerSetVolumeChangeListener(const picojson::value& args, picojson::object& out);
38 void SoundManagerGetSoundMode(const picojson::value& args, picojson::object& out);
39 void SoundManagerGetConnectedDeviceList(const picojson::value& args, picojson::object& out);
40 void SoundManagerGetActivatedDeviceList(const picojson::value& args, picojson::object& out);
41 void SoundManagerAddDeviceStateChangeListener(const picojson::value& args, picojson::object& out);
42 void SoundManagerRemoveDeviceStateChangeListener(const picojson::value& args,
43 picojson::object& out);
45 void OnSoundModeChange(const std::string& newmode);
47 SoundManager manager_;
49 // It is used in OnSoundModeChange function to prevent double firing of callback
50 std::string current_sound_mode;
54 } // namespace extension
56 #endif // SOUND_SOUND_INSTANCE_H_