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_ACCELEROMETER_ISENSOR_H_
21 #define WRTDEVICEAPIS_ACCELEROMETER_ISENSOR_H_
23 #include <dpl/noncopyable.h>
25 namespace WrtDeviceApis {
26 namespace Accelerometer {
29 class ISensor : private DPL::Noncopyable
33 * Gets instance of accelerometer sensor.
34 * @return Accelerometer sensor interface.
35 * @throw UnsupportedException If platform does not support it.
37 static ISensor& getInstance();
40 virtual ~ISensor() = 0;
43 * Gets value on X-axis.
44 * @return Value on X-axis.
45 * @throw PlatformException If error in platform occurs.
47 virtual double getX() const = 0;
50 * Gets value on Y-axis.
51 * @return Value on Y-axis.
52 * @throw PlatformException If error in platform occurs.
54 virtual double getY() const = 0;
57 * Gets value on Z-axis.
58 * @return Value on Z-axis.
59 * @throw PlatformException If error in platform occurs.
61 virtual double getZ() const = 0;
67 #endif // WRTDEVICEAPIS_ACCELEROMETER_ISENSOR_H_