Merge "Revert "[secureelement] - Checking privileges moved to JS layer"" into tizen_3.0
[platform/core/api/webapi-plugins.git] / src / sound / sound_instance.h
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef SOUND_SOUND_INSTANCE_H_
18 #define SOUND_SOUND_INSTANCE_H_
19
20 #include "common/extension.h"
21 #include "sound_manager.h"
22
23 namespace extension {
24 namespace sound {
25
26 class SoundInstance : public common::ParsedInstance, public SoundManagerSoundModeChangedListener {
27  public:
28   SoundInstance();
29   virtual ~SoundInstance();
30
31  private:
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(
43       const picojson::value& args, picojson::object& out);
44
45   void OnSoundModeChange(const std::string& newmode);
46
47   SoundManager manager_;
48 };
49
50 } // namespace sound
51 } // namespace extension
52
53 #endif // SOUND_SOUND_INSTANCE_H_