tizen beta release
[framework/web/wrt-plugins-common.git] / src / modules / API / Profile / IRingtone.h
1 /*
2  * Copyright (c) 2011 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  * @author       Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
18  */
19
20 #ifndef WRTDEVICEAPIS_PROFILE_IRINGTONE_H_
21 #define WRTDEVICEAPIS_PROFILE_IRINGTONE_H_
22
23 #include <Filesystem/IPath.h>
24 #include <Haptics/Types.h>
25 #include <Profile/Types.h>
26
27 namespace WrtDeviceApis {
28 namespace Profile {
29 namespace Api {
30 class IRingtone
31 {
32   public:
33     virtual ~IRingtone() = 0;
34
35     /**
36      * Gets volume level.
37      * @return Volume value.
38      * @throw PlatformException If error in platform occurs.
39      * @throw UnsupportedException If platform doesn't support this feature.
40      * @remarks Different platforms may have different ranges of values.
41      */
42     virtual Volume getVolume() const = 0;
43
44     /**
45      * Sets volume level.
46      * @param level Volume value.
47      * @throw PlatformException If error in platform occurs.
48      * @throw UnsupportedException If platform doesn't support this feature.
49      * @remarks Different platforms may respect different ranges of values.
50      */
51     virtual void setVolume(Volume level) = 0;
52
53     /**
54      * Gets path to ringtone audio file.
55      * @return File path.
56      * @throw PlatformException If error in platform occurs.
57      * @throw UnsupportedException If platform doesn't support this feature.
58      */
59     virtual Filesystem::Api::IPathPtr getAudio() const = 0;
60
61     /**
62      * Sets path to ringtone audio file.
63      * @param path File path.
64      * @throw PlatformException If error in platform occurs.
65      * @throw UnsupportedException If platform doesn't support this feature.
66      */
67     virtual void setAudio(const Filesystem::Api::IPathPtr& path) = 0;
68
69     /**
70      * Gets haptics level.
71      * @return Haptics intensity.
72      * @throw PlatformException If error in platform occurs.
73      * @throw UnsupportedException If platform doesn't support this feature.
74      * @remarks Different platforms may have different ranges of values.
75      */
76     virtual Haptics::Api::Feedback getHaptics() const = 0;
77
78     /**
79      * Sets haptics level.
80      * @param level Haptics intensity.
81      * @throw PlatformException If error in platform occurs.
82      * @throw UnsupportedException If platform doesn't support this feature.
83      * @remarks Different platforms may respect different ranges of values.
84      */
85     virtual void setHaptics(Haptics::Api::Feedback level) = 0;
86 };
87 } // Api
88 } // Profile
89 } // WrtDeviceApis
90
91 #endif // WRTDEVICEAPIS_PROFILE_IRINGTONE_H_