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.
16 #ifndef WRTDEVICEAPIS_HAPTICS_IMANAGER_H_
17 #define WRTDEVICEAPIS_HAPTICS_IMANAGER_H_
20 #include <dpl/noncopyable.h>
23 namespace WrtDeviceApis {
26 class IManager : public DPL::Noncopyable
29 static IManager& getInstance();
32 virtual ~IManager() = 0;
35 * Gets specified haptic motor.
36 * @param index Index of a motor to get (1-based).
37 * @return Haptic motor.
38 * @throw OutOfRangeException If index is greater than available motors.
39 * @throw UnsupportedException If current platform doesn't support it.
40 * @remarks On some platforms passing 0 as index may return motor object
41 * which represents all available motors as one.
43 virtual IMotor* getMotor(std::size_t index) const = 0;
46 * Gets number of available haptic motors.
47 * @return Number of motors.
49 virtual std::size_t getMotorsCount() const = 0;
55 #endif /* WRTDEVICEAPIS_HAPTICS_IMANAGER_H_ */