2 * Copyright (c) 2011 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 * @author Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
20 #ifndef WRTDEVICEAPIS_PROFILE_IMANAGER_H_
21 #define WRTDEVICEAPIS_PROFILE_IMANAGER_H_
25 #include "IRingtone.h"
28 namespace WrtDeviceApis {
34 static IManager& getInstance();
38 NORMAL, SILENT, DRIVING, MEETING, OUTDOOR, FLIGHT
42 virtual ~IManager() = 0;
45 * Gets desktop settings interface for current profile.
46 * @param index 1-based index
47 * @return Desktop interface (or NULL if 0 is passed and general desktop is not supported).
48 * @throw PlatformException If error in platform occurs.
49 * @throw OutOfRangeException If desktop doesn't exist.
50 * @throw UnsupportedException If platform doesn't support it.
51 * @remarks Passing IDesktop::DEFAULT as index results in returning default
52 * desktop interface (or first one if platform doesn't distinct them).
53 * @remarks Ownership is NOT passed to the caller.
55 virtual IDesktopPtr getDesktop(std::size_t index) const = 0;
58 * Gets number of available desktops on current platform.
59 * @return Number of desktops.
60 * @throw PlatformException If error in platform occurs.
62 virtual std::size_t getDesktopCount() const = 0;
65 * Gets ringtone interface for specific type of received message.
66 * @param scope Received message/call type.
67 * @return Ringtone interface.
68 * @throw PlatformException If error in platform occurs.
69 * @throw UnsupportedException If platform doesn't support it.
70 * @remarks Some platforms may not distinct between different types of messages
71 * as far as ringtone settings are concerned, e.g. they may assign
72 * SMS, MMS and EMAIL the same ringtone settings.
73 * @remarks Ownership is NOT passed to the caller.
75 virtual IRingtone* getRingtone(RingtoneScope scope) const = 0;
78 * Returns profile setting.
79 * @return ProfileType enum.
80 * @throw ConversionException
81 * @throw OutOfRangeException
83 virtual ProfileType getProfileType() const = 0;
86 * Returns system volume value.
87 * @return system volume as int.
88 * @throw ConversionException
90 virtual int getSystemVolume() const = 0;
95 virtual void Release() const = 0;
96 virtual int getVibrateType() const = 0;
102 #endif // WRTDEVICEAPIS_PROFILE_IMANAGER_H_