Flora License
-Version 1.0, April, 2013
+Version 1.1, April, 2013
http://floralicense.org/license/
Derivative Works; or, within a display generated by the Derivative Works,
if and wherever such third-party notices normally appear.
The contents of the NOTICE file are for informational purposes only
- and do not modify the License.
-
-You may add Your own attribution notices within Derivative Works
-that You distribute, alongside or as an addendum to the NOTICE text
-from the Work, provided that such additional attribution notices
-cannot be construed as modifying the License. You may add Your own
-copyright statement to Your modifications and may provide additional or
-different license terms and conditions for use, reproduction, or
-distribution of Your modifications, or for any such Derivative Works
-as a whole, provided Your use, reproduction, and distribution of
-the Work otherwise complies with the conditions stated in this License.
+ and do not modify the License. You may add Your own attribution notices
+ within Derivative Works that You distribute, alongside or as an addendum
+ to the NOTICE text from the Work, provided that such additional attribution
+ notices cannot be construed as modifying the License. You may add Your own
+ copyright statement to Your modifications and may provide additional or
+ different license terms and conditions for use, reproduction, or
+ distribution of Your modifications, or for any such Derivative Works
+ as a whole, provided Your use, reproduction, and distribution of
+ the Work otherwise complies with the conditions stated in this License
+ and your own copyright statement or terms and conditions do not conflict
+ the conditions stated in the License including section 3.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
Copyright [yyyy] [name of copyright owner]
- Licensed under the Flora License, Version 1.0 (the "License");
+ Licensed under the Flora License, Version 1.1 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
Several source codes may have its original copyright owner and/or
-be licensed under other than Apache License, Version 2, say, Flora License, Version 1.
+be licensed under other than Apache License, Version 2, say, Flora License, Version 1.1.
Please, see copyright and license comments section in the header of each file,
-and the LICENSE.Flora for Flora License terms and conditions.
\ No newline at end of file
+and the LICENSE.Flora for Flora License, Version 1.1 terms and conditions.
\ No newline at end of file
/**
* @namespace Tizen::Uix
- * @brief This namespace contains the %Ui extension classes and the %Tizen interfaces.
+ * @brief This namespace contains %Ui extension classes and %Tizen interfaces.
* @since 2.0
*
* @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
*
- * The %Uix namespace contains classes and interfaces for the UI extension services, which cover unconventional user interface
+ * The %Uix namespace contains classes and interfaces for UI extension services, which cover unconventional user interface
* features not included in the basic UI namespace, such as vision based recognition, device sensor input and motion
- * detection, and speech recognition and synthesis.
+ * detection, as well as speech recognition and synthesis.
* @n
* For more information on the %Uix namespace features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/uix_namespace.htm">Uix Guide</a>.
*
* @since 2.0
*
* @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
+ * @b Library: @b osp-uix
*
- * The %Sensor namespace contains classes and interfaces for the %Sensor services, user control sensor and access data of each sensor.
+ * The %Sensor namespace contains classes and interfaces for %Sensor services, user control sensor and access data of each sensor.
*
*
* The following diagram illustrates the relationships between the classes belonging to the %Sensor namespace.
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %AccelerationSensorData class stores acceleration sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ AccelerationSensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %AccelerationSensorData
+ * @param[in] rhs An instance of %AccelerationSensorData to copy
*/
AccelerationSensorData(const AccelerationSensorData& rhs);
*
* @since 2.1
*
- * @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @return @c true if all the fields in the objects are equal, @n
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
* @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
*
* @since 2.1
*
- * @return A reference to this instance
- * @param[in] rhs An instance of %AccelerationSensorData
+ * @return A reference to this instance
+ * @param[in] rhs An instance of %AccelerationSensorData to copy
*/
AccelerationSensorData& operator =(const AccelerationSensorData& rhs);
*
* @since 2.1
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %DeviceOrientationSensorData class stores device-orientation sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ DeviceOrientationSensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %DeviceOrientationSensorData
+ * @param[in] rhs An instance of %DeviceOrientationSensorData to copy
*/
DeviceOrientationSensorData(const DeviceOrientationSensorData& rhs);
*
* @since 2.1
*
- * @return @c true if all the fields in the objects are equal, @n
- * else @c false
+ * @return @c true if all the fields in the objects are equal, @n
+ * else @c false
* @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
*
* @since 2.1
*
- * @return A reference to this instance
- * @param[in] rhs An instance of %DeviceOrientationSensorData
+ * @return A reference to this instance
+ * @param[in] rhs An instance of %DeviceOrientationSensorData to copy
*/
DeviceOrientationSensorData& operator =(const DeviceOrientationSensorData& rhs);
*
* @since 2.1
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %GravitySensorData class stores gravity sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ GravitySensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %GravitySensorData
+ * @param[in] rhs An instance of %GravitySensorData to copy
*/
GravitySensorData(const GravitySensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
*
* @since 2.1
*
- * @return A reference to this instance
- * @param[in] rhs An instance of %GravitySensorData
+ * @return A reference to this instance
+ * @param[in] rhs An instance of %GravitySensorData to copy
*/
GravitySensorData& operator =(const GravitySensorData& rhs);
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %GyroSensorData class stores gyro sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ GyroSensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %GyroSensorData
+ * @param[in] rhs An instance of %GyroSensorData to copy
*/
GyroSensorData(const GyroSensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.1
*
* @return A reference to this instance
- * @param[in] rhs An instance of %GyroSensorData
+ * @param[in] rhs An instance of %GyroSensorData to copy
*/
GyroSensorData& operator =(const GyroSensorData& rhs);
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %ISensorEventListener interface is an event listener used to receive sensor data asynchronously.
* It provides methods that are invoked when the sensor data is received from the device.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ ISensorEventListener
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %LightSensorData class stores light sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ LightSensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %LightSensorData
+ * @param[in] rhs An instance of %LightSensorData to copy
*/
LightSensorData(const LightSensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.1
*
* @return A reference to this instance
- * @param[in] rhs An instance of %LightSensorData
+ * @param[in] rhs An instance of %LightSensorData to copy
*/
LightSensorData& operator =(const LightSensorData& rhs);
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %MagneticSensorData class stores magnetic sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ MagneticSensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %MagneticSensorData
+ * @param[in] rhs An instance of %MagneticSensorData to copy
*/
MagneticSensorData(const MagneticSensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.1
*
* @return A reference to this instance
- * @param[in] rhs An instance of %MagneticSensorData
+ * @param[in] rhs An instance of %MagneticSensorData to copy
*/
MagneticSensorData& operator =(const MagneticSensorData& rhs);
/**
* @class Motion
- * @brief This class is used to probe the state or to receive an event about the conceptual states of the device's movement.
+ * @brief This class is used to probe the state or receive an event about the conceptual states of the device's movement.
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %Motion class allows an application to know about the movement of the device. The information is given in 2 ways:
* the application probes the state or the application registers a listener and receives an event when a movement is observed.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/device_motions.htm">Device Motions</a>.
*
* The following example demonstrates how to use the %Motion class to register a motion event listener and receive motion events.
* void OnSnapDetected(Tizen::Uix::Sensor::MotionSnapType snapType);
*
* private:
- * Tizen::Uix::Motion* pMotion;
+ * Tizen::Uix::Sensor::Motion* pMotion;
* };
*
* result MotionExample::Initialize(void)
/**
* Sets the motion event type. @n
- * If the %SetEnabled() method is not called, then by default all the motion event types will be captured by the listener.
- * If the motion events are not be captured, this method can be called with @c type set to @c MOTION_TYPE_NONE.
+ * If the %SetEnabled() method is not called, then by default all the motion event types are captured by the listener.
+ * If the motion events are not to be captured, this method can be called with @c type set to @c MOTION_TYPE_NONE.
*
* @since 2.0
*
* Multiple motion types of type Tizen::Uix::Sensor::MotionType can be combined using the logical OR operator.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_STATE This instance has not been constructed as yet.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetEnabled(unsigned long type);
/**
- * Checks whether the specified @c MotionType is supported. @n
- * @c MOTION_TYPE_NONE and @c MOTION_TYPE_ALL are invalid, and @c false will be returned for these types.
+ * Checks whether the specified @c type is supported. @n
+ * @c MOTION_TYPE_NONE and @c MOTION_TYPE_ALL are unsupported types, and @c false is returned for these types.
*
* @since 2.0
*
/**
* @file FUixSensorMotionCommon.h
- * @brief This is the header file for the declarations of the enumerations of the Sensor namespace.
+ * @brief This is the header file for the declarations of the enumerations of the %Sensor namespace.
*
* This header file contains the declarations of the enumerations of the Sensor namespace.
*/
*/
enum MotionType
{
- MOTION_TYPE_NONE = 0x0000, /**< The motion type: None */
- MOTION_TYPE_SNAP = 0x0001, /**< The motion type: Snap */
- MOTION_TYPE_SHAKE = 0x0002, /**< The motion type: Shake */
- MOTION_TYPE_DOUBLETAP = 0x0004, /**< The motion type: Tap */
+ MOTION_TYPE_NONE = 0x0000, /**< The motion type: None */
+ MOTION_TYPE_SNAP = 0x0001, /**< The motion type: Snap */
+ MOTION_TYPE_SHAKE = 0x0002, /**< The motion type: Shake */
+ MOTION_TYPE_DOUBLETAP = 0x0004, /**< The motion type: Tap */
MOTION_TYPE_MOVE_TO_EAR = 0x0008, /**< The motion type: Move to ear @b Since: @b 2.1 */
- MOTION_TYPE_ALL = 0xFFFF, /**< The motion type: All */
+ MOTION_TYPE_ALL = 0xFFFF, /**< The motion type: All */
};
/**
* @enum MotionState
*
* Defines the state of motions. @n
- * Some event can only be found in a subset of states described below.
+ * Some events can only be found in a subset of the states described below.
*
* @since 2.0
*
MOTION_STARTED, /**< The specified motion has just started */
MOTION_INPROGRESS, /**< The specified motion is happening */
MOTION_ENDED, /**< The specified motion has just ended */
- MOTION_CANCELLED, /**< The specified motion has just canceled */
+ MOTION_CANCELLED, /**< The specified motion has just cancelled */
};
/**
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %ProximitySensorData class stores proximity sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ ProximitySensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %ProximitySensorData
+ * @param[in] rhs An instance of %ProximitySensorData to copy
*/
ProximitySensorData(const ProximitySensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.1
*
* @return A reference to this instance
- * @param[in] rhs An instance of %ProximitySensorData
+ * @param[in] rhs An instance of %ProximitySensorData to copy
*/
ProximitySensorData& operator =(const ProximitySensorData& rhs);
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %SensorData class stores sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ SensorData
virtual ~SensorData(void);
/**
- * Gets sensor data with @c long value as the key input.
+ * Gets the sensor data with a @c long value as the key input.
*
* @since 2.0
*
* @return An error code
* @param[in] dataKey The key to access the sensor data
- * @param[out] value The @c long value representing the sensor data requested by the user
+ * @param[out] value The @c long value that represents the sensor data requested by the user
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The data matching the specified key and data type cannot be found.
*/
virtual result GetValue(SensorDataKey dataKey, long& value) const;
/**
- * Gets the sensor data with @c float value as the key input.
+ * Gets the sensor data with a @c float value as the key input.
*
* @since 2.0
*
* @return An error code
* @param[in] dataKey The key to access the sensor data
- * @param[out] value The @c float value representing the sensor data requested by the user
+ * @param[out] value The @c float value that represents the sensor data requested by the user
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The data matching the specified key and data type cannot be found.
*/
virtual result GetValue(SensorDataKey dataKey, float& value) const;
/**
- * Gets the sensor data with @c bool value as the key input.
+ * Gets the sensor data with a @c bool value as the key input.
*
* @since 2.0
*
* @return An error code
* @param[in] dataKey The key to access the sensor data
- * @param[out] value The @c bool value representing the sensor data requested by the user
+ * @param[out] value The @c bool value that represents the sensor data requested by the user
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The data matching the specified key and data type cannot be found.
*/
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %SensorManager class is used to receive and manage sensor data from the device, including adding or removing the sensor
* listeners, checking sensor availability, setting intervals, and getting the maximum or minimum intervals.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*
* The following examples demonstrate how to use the %SensorManager class with the acceleration sensor.
*
* @since 2.0
*
- * @remarks All listeners are removed
+ * @remarks All the listeners are removed
* and the internally allocated memory block is deleted when the instance is destroyed.
*/
virtual ~SensorManager(void);
* @endif
* @since 2.0
* @if OSPCOMPAT
- * @compatibility This method has compatibility issues with OSP compatible applications. @n
+ * @compatibility This method has compatibility issues with OSP compatible applications. @n
* For more information, see @ref CompSensorManagerAddSensorListenerPage "here".
* @endif
* @return An error code
* else @c false if the sensor data is received at every interval
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @exception E_INVALID_ARG An interval must be greater than the maximum interval or less than the minimum interval or the sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to add a sensor listener.
- * @exception E_USER_ALREADY_REGISTERED The specified @c listener is already registered for the specified sensor type.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c interval is neither greater than the maximum interval nor less than the minimum interval.
+ * - The sensor type is invalid.
+ * @exception E_OPERATION_FAILED The operation has failed to add the sensor listener.
+ * @exception E_USER_ALREADY_REGISTERED The specified @c listener is already registered for the specified @c sensorType.
* @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
* @if OSPCOMPAT
* @page CompSensorManagerAddSensorListenerPage Compatibility for AddSensorListener()
* @section CompSensorManagerAddSensorListenerIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerAddSensorListenerSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerRemoveSensorListenerPage "here".
+ * For more information, see @ref CompSensorManagerRemoveSensorListenerPage "here".
* @endif
* @return An error code
- * @param[in] listener The listener to remove
- * @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The specified @c listener is not found in the listener list.
- * @exception E_OPERATION_FAILED The operation has failed to remove sensor listeners.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @param[in] listener The listener to remove
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_OBJ_NOT_FOUND The specified @c listener is not found in the listener list.
+ * @exception E_OPERATION_FAILED The operation has failed to remove sensor listeners.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result RemoveSensorListener(ISensorEventListener& listener);
* @if OSPCOMPAT
* @page CompSensorManagerRemoveSensorListenerPage Compatibility for RemoveSensorListener()
* @section CompSensorManagerRemoveSensorListenerIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerRemoveSensorListenerSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerRemoveSensorListenerPage "here".
+ * For more information, see @ref CompSensorManagerRemoveSensorListenerPage "here".
* @endif
* @return An error code
* @param[in] listener The listener to remove
* @param[in] sensorType The sensor type
* @exception E_SUCCESS The method is successful.
- * @exception E_OBJ_NOT_FOUND The specified @c listener is not found in the listener list,
- * or the specified type of sensor is not valid.
+ * @exception E_OBJ_NOT_FOUND Either of the following conditions has occurred:
+ * - The specified @c listener is not found in the listener list.
+ * - The specified @c sensorType is invalid.
* @exception E_OPERATION_FAILED The operation has failed to remove the sensor listener.
* @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
/**
* @if OSPCOMPAT
* @page CompSensorManagerRemoveSensorListenerPage Compatibility for RemoveSensorListener ()
- * @section CompSensorManagerRemoveSensorListenerIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerRemoveSensorListenerIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerRemoveSensorListenerSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
/**
- * @{
- * @if OSPDEPREC
- * Sets an interval of a sensor.
+ * @cond OSPDEPREC
+ * Sets the interval of a sensor.
* @if OSPCOMPAT
* @brief <i> [Deprecated] [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerSetIntervalPage "here".
+ * For more information, see @ref CompSensorManagerSetIntervalPage "here".
* @endif
* @return An error code
* @param[in] sensorType The sensor type
* @param[in] interval The interval (in milliseconds) at which the sensor data is received
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG An interval must be greater than the maximum interval or less than the minimum interval,
- * or the sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to set interval of sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c interval is neither greater than the maximum interval nor less than the minimum interval.
+ * - The specified @c sensorType is invalid.
+ * @exception E_OPERATION_FAILED The operation has failed to set the interval of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
* @see SensorManager::GetMaxInterval() for getting the maximum intervals
* @see SensorManager::GetMinInterval() for getting the minimum intervals
- * @endif
- * @}
+ * @endcond
*/
result SetInterval(SensorType sensorType, long interval);
/**
* @if OSPCOMPAT
* @page CompSensorManagerSetIntervalPage Compatibility for SetInterval ()
- * @section CompSensorManagerSetIntervalIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerSetIntervalIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerSetIntervalSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
/**
- * Sets an interval of a sensor using the specified @c listener.
+ * Sets the interval of a sensor using the specified @c listener.
* @if OSPCOMPAT
* @brief <i> [Compatibility] </i>
* @endif
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerSetIntervalPage "here".
+ * For more information, see @ref CompSensorManagerSetIntervalPage "here".
* @endif
* @return An error code
* @param[in] listener The added listener
* @param[in] sensorType The sensor type
* @param[in] interval The interval (in milliseconds) at which the sensor data is received
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG An interval must be greater than the maximum interval or less than the minimum interval,
- * or the listener is not registered for this type of sensor, or the sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to set the interval of sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_INVALID_ARG Either of the following conditions has occurred:
+ * - The specified @c interval is neither greater than the maximum interval nor less than the minimum interval.
+ * - The listener is not registered for this type of sensor.
+ * - The specified @c sensorType is invalid.
+ * @exception E_OPERATION_FAILED The operation has failed to set the interval of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
* @see SensorManager::GetMaxInterval() for getting the maximum intervals
* @see SensorManager::GetMinInterval() for getting the minimum intervals
*/
/**
* @if OSPCOMPAT
* @page CompSensorManagerSetIntervalPage Compatibility for SetInterval ()
- * @section CompSensorManagerSetIntervalIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerSetIntervalIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerSetIntervalSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerIsAvailablePage "here".
+ * For more information, see @ref CompSensorManagerIsAvailablePage "here".
* @endif
* @return @c true if the sensor type is available, @n
* else @c false
* @param[in] sensorType The sensor type
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The sensor type is invalid.
+ * @exception E_INVALID_ARG The sensor type is invalid.
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
bool IsAvailable(SensorType sensorType) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerIsAvailablePage Compatibility for IsAvailable ()
- * @section CompSensorManagerIsAvailableIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerIsAvailableIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerIsAvailableSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerGetMinIntervalPage "here".
+ * For more information, see @ref CompSensorManagerGetMinIntervalPage "here".
* @endif
* @return An error code
* @param[in] sensorType The sensor type
* @param[out] interval The minimum interval in milliseconds
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to get interval of sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_OPERATION_FAILED The operation has failed to get interval of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result GetMinInterval(SensorType sensorType, long& interval) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerGetMinIntervalPage Compatibility for GetMinInterval()
- * @section CompSensorManagerGetMinIntervalIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerGetMinIntervalIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerGetMinIntervalSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
* @endif
* @since 2.0
* @if OSPCOMPAT
- * @compatibility This method has compatibility issues with OSP compatible applications. @n
+ * @compatibility This method has compatibility issues with OSP compatible applications. @n
* For more information, see @ref CompSensorManagerGetMaxIntervalPage "here".
* @endif
* @return An error code
* @param[out] interval The maximum interval in milliseconds
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to get interval of sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_OPERATION_FAILED The operation has failed to get interval of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result GetMaxInterval(SensorType sensorType, long& interval) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerGetMaxIntervalPage Compatibility for GetMaxInterval()
- * @section CompSensorManagerGetMaxIntervalIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerGetMaxIntervalIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerGetMaxIntervalSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
*
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerGetDescriptionPage "here".
+ * For more information, see @ref CompSensorManagerGetDescriptionPage "here".
* @endif
* @return An error code
* @param[in] sensorType The sensor type
* @param[out] description The sensor description
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to get description of sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_OPERATION_FAILED The operation has failed to get the description of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result GetDescription(SensorType sensorType, Tizen::Base::String& description) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerGetDescriptionPage Compatibility for GetDescription()
- * @section CompSensorManagerGetDescriptionIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerGetDescriptionIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerGetDescriptionSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
* @since 2.0
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerGetVendorPage "here".
+ * For more information, see @ref CompSensorManagerGetVendorPage "here".
* @endif
* @return An error code
* @param[in] sensorType The sensor type
* @param[out] vendor The vendor information
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to get vender information of sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_OPERATION_FAILED The operation has failed to get the vendor information of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result GetVendor(SensorType sensorType, Tizen::Base::String& vendor) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerGetVendorPage Compatibility for GetVendor()
- * @section CompSensorManagerGetVendorIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerGetVendorIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerGetVendorSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
*
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerGetModelIdPage "here".
+ * For more information, see @ref CompSensorManagerGetModelIdPage "here".
* @endif
* @return An error code
* @param[in] sensorType The sensor type
* @param[out] modelId The model ID of the sensor hardware
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed to get the model ID of the sensor.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_OPERATION_FAILED The operation has failed to get the model ID of the sensor.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result GetModelId(SensorType sensorType, Tizen::Base::String& modelId) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerGetModelIdPage Compatibility for GetModelId()
- * @section CompSensorManagerGetModelIdIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerGetModelIdIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerGetModelIdSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
*
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerGetMeasurementRangePage "here".
+ * For more information, see @ref CompSensorManagerGetMeasurementRangePage "here".
* @endif
* @return An error code
* @param[in] sensorType The sensor type
* This is a device specific characteristic.
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
+ * @exception E_OPERATION_FAILED The operation has failed.
+ * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor.
*/
result GetMeasurementRange(SensorType sensorType, float& min, float& max, float& resolution) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerGetMeasurementRangePage Compatibility for GetMeasurementRange()
- * @section CompSensorManagerGetMeasurementRangeIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
+ * @section CompSensorManagerGetMeasurementRangeIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor.
*
* @section CompSensorManagerGetMeasurementRangeSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
*
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerIsWakeupSupportedPage "here".
+ * For more information, see @ref CompSensorManagerIsWakeupSupportedPage "here".
* @endif
* @return @c true if the sensor type supports the wake up feature while the device is in the sleep mode, @n
- * else @c false if the wake up feature is not supported by the sensor or if the instance is not initialized properly
- * @param[in] sensorType The sensor type
- * @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The sensor type is invalid.
- * @exception E_OPERATION_FAILED The operation has failed.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor,or @n
- * the target device does not support wake-up feature originally or based on the specific sensor.
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * @remarks This method cannot be tested on the Emulator. It always returns true on the Emulator.
+ * else @c false if the wake up feature is not supported by the sensor or the instance is not initialized properly
+ * @param[in] sensorType The sensor type
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The sensor type is invalid.
+ * @exception E_OPERATION_FAILED The operation has failed.
+ * @exception E_UNSUPPORTED_OPERATION Either of the following conditions has occurred:
+ * - The target device does not support the specific sensor.
+ * - The target device does not support the wake-up feature originally or based on the specific sensor.
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - This method cannot be tested on the Emulator. It always returns @c true on the Emulator.
*/
bool IsWakeupSupported(SensorType sensorType) const;
/**
* @if OSPCOMPAT
* @page CompSensorManagerIsWakeupSupportedPage Compatibility for IsWakeupSupported()
- * @section CompSensorManagerIsWakeupSupportedIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensorl,or @n
- * the target device does not support wake-up feature originally or based on the specific sensor.
+ * @section CompSensorManagerIsWakeupSupportedIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor or @n
+ * the target device does not support the wake-up feature originally or based on the specific sensor.
*
* @section CompSensorManagerIsWakeupSupportedSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
*
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerSetWakeupEnabledPage "here".
+ * For more information, see @ref CompSensorManagerSetWakeupEnabledPage "here".
* @endif
* @feature %http://tizen.org/feature/sensor.accelerometer.wakeup
* @return An error code
* @exception E_INVALID_STATE There is no sensor listener registered for this type.
* @exception E_INVALID_ARG The sensor type is invalid.
* @exception E_OPERATION_FAILED The operation has failed.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor,or @n
- * the target device does not support wake-up feature originally or based on the specific sensor.
+ * @exception E_UNSUPPORTED_OPERATION Either of the following conditions has occurred:
+ * - The target device does not support the specific sensor.
+ * - The target device does not support the wake-up feature originally or based on the specific sensor.
* @remarks
* - The wake up feature is automatically disabled by the system as soon as the calling application is terminated.
* - This method cannot be tested on the Emulator. It always returns @c E_SUCCESS on the Emulator.
/**
* @if OSPCOMPAT
* @page CompSensorManagerSetWakeupEnabledPage Compatibility for SetWakeupEnabled()
- * @section CompSensorManagerSetWakeupEnabledIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor,or @n
- * the target device does not support wake-up feature originally or based on the specific sensor.
+ * @section CompSensorManagerSetWakeupEnabledIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor or @n
+ * the target device does not support the wake-up feature originally or based on the specific sensor.
*
* @section CompSensorManagerSetWakeupEnabledSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
*
* @if OSPCOMPAT
* @compatibility This method has compatibility issues with OSP compatible applications. @n
- * For more information, see @ref CompSensorManagerIsWakeupEnabledPage "here".
+ * For more information, see @ref CompSensorManagerIsWakeupEnabledPage "here".
* @endif
* @feature %http://tizen.org/feature/sensor.accelerometer.wakeup
* @return @c true if the wakeup feature is enabled for the specified sensor type for the calling application, @n
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_ARG The sensor type is invalid.
* @exception E_OPERATION_FAILED The operation has failed.
- * @exception E_UNSUPPORTED_OPERATION The target device does not support the specific sensor,or @n
- * the target device does not support wake-up feature originally or based on the specific sensor.
+ * @exception E_UNSUPPORTED_OPERATION Either of the following conditions has occurred:
+ * - The target device does not support the specific sensor.
+ * - The target device does not support the wake-up feature originally or based on the specific sensor.
* @remarks
* - The specific error code can be accessed using the GetLastResult() method.
* - This method cannot be tested on the Emulator. It always returns @c true on the Emulator.
/**
* @if OSPCOMPAT
* @page CompSensorManagerIsWakeupEnabledPage Compatibility for IsWakeupEnabled()
- * @section CompSensorManagerIsWakeupEnabledIssueSection Issues
- * Implementing this method in OSP compatible applications has the following issues: @n
- * -# The method returns E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor,or @n
- * the target device does not support wake-up feature originally or based on the specific sensor.
+ * @section CompSensorManagerIsWakeupEnabledIssueSection Issues
+ * Implementing this method in OSP compatible applications has the following issues: @n
+ * -# The method returns @c E_DEVICE_UNAVAILABLE if the target device does not support the specific sensor or @n
+ * the target device does not support the wake-up feature originally or based on the specific sensor.
*
* @section CompSensorManagerIsWakeupEnabledSolutionSection Resolutions
- * This issue has been resolved in Tizen. @n
- * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
- * -# E_DEVICE_UNAVAILABLE exception is removed.
+ * This issue has been resolved in Tizen. @n
+ * -# The method returns @c E_UNSUPPORTED_OPERATION if the target device does not support the specific sensor.
+ * -# @c E_DEVICE_UNAVAILABLE exception is removed.
* @endif
*/
/**
* @file FUixSensorSensorTypes.h
- * @brief This is the header file for the common data types used by the SensorData and SensorManager classes.
+ * @brief This is the header file for the common data types used by the %SensorData and %SensorManager classes.
*
* This header file contains the declarations of the common data types and constants used by the SensorData and SensorManager classes.
*/
*
* @since 2.0
*
-* @remarks Use actual key type, such as Tizen::Uix::Sensor::AccelerationDataKey, Tizen::Uix::Sensor::MagneticDataKey, Tizen::Uix::Sensor::ProximityDataKey, or Tizen::Uix::Sensor::TiltDataKey with type casting. For example, use Tizen::Uix::Sensor::SensorData::GetValue(static_cast<SensorDataKey>(ACCELERATION_DATA_KEY_X), value) to get the acceleration value in x-axis.
+* @remarks Use the actual key type, such as Tizen::Uix::Sensor::AccelerationDataKey, Tizen::Uix::Sensor::MagneticDataKey, Tizen::Uix::Sensor::ProximityDataKey, or Tizen::Uix::Sensor::TiltDataKey with type casting. For example, use Tizen::Uix::Sensor::SensorData::GetValue(static_cast<SensorDataKey>(ACCELERATION_DATA_KEY_X), value) to get the acceleration value on the x-axis.
*/
enum SensorDataKey
{
{
MAGNETIC_DATA_KEY_TIMESTAMP = 266, /**< The key to the timestamp of the magnetic sensor data */
MAGNETIC_DATA_KEY_X, /**< The key to the x-axis of the magnetic sensor data */
- MAGNETIC_DATA_KEY_Y, /**< The key to the y-axis of the magnetic sensor data */
- MAGNETIC_DATA_KEY_Z, /**< The key to the z-axis of the magnetic sensor data */
- MAGNETIC_DATA_KEY_COUNT = 4 /**< The number of indices to access magnetic sensor data */
+ MAGNETIC_DATA_KEY_Y, /**< The key to the y-axis of the magnetic sensor data */
+ MAGNETIC_DATA_KEY_Z, /**< The key to the z-axis of the magnetic sensor data */
+ MAGNETIC_DATA_KEY_COUNT = 4 /**< The number of indices to access the magnetic sensor data */
};
/**
enum TiltDataKey
{
TILT_DATA_KEY_TIMESTAMP = 286, /**< The key to the timestamp of the tilt sensor data */
- TILT_DATA_KEY_AZIMUTH, /**< The key to the azimuth of the tilt sensor data */
+ TILT_DATA_KEY_AZIMUTH, /**< The key to the azimuth of the tilt sensor data */
TILT_DATA_KEY_PITCH, /**< The key to the pitch of the tilt sensor data */
TILT_DATA_KEY_ROLL, /**< The key to the roll of the tilt sensor data */
TILT_DATA_KEY_COUNT = 4 /**< The number of indices to access the tilt sensor data */
*
* @since 2.0
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %TiltSensorData class stores tilt sensor data, including a time stamp.
- * @n
+ *
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*/
class _OSP_EXPORT_ TiltSensorData
*
* @since 2.1
*
- * @param[in] rhs An instance of %TiltSensorData
+ * @param[in] rhs An instance of %TiltSensorData to copy
*/
TiltSensorData(const TiltSensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.1
*
* @return A reference to this instance
- * @param[in] rhs An instance of %TiltSensorData
+ * @param[in] rhs An instance of %TiltSensorData to copy
*/
TiltSensorData& operator =(const TiltSensorData& rhs);
*
* @since 2.1
*
- * @remarks @b Header @b %file: @b \#include @b <FUix.h> @n
- * @b Library : @b osp-uix
- *
* The %UserAccelerationSensorData class stores user-acceleration sensor data, including a time stamp.
* @n
* For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/uix/sensor_manager.htm">Sensor Manager</a>.
*
* @since 2.1
*
- * @param[in] rhs An instance of %UserAccelerationSensorData
+ * @param[in] rhs An instance of %UserAccelerationSensorData to copy
*/
UserAccelerationSensorData(const UserAccelerationSensorData& rhs);
* @since 2.1
*
* @return @c true if all the fields in the objects are equal, @n
- * else @c false
- * @param[in] rhs The Tizen::Base::Object with which the comparison is done
- * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
+ * else @c false
+ * @param[in] rhs The Tizen::Base::Object with which the comparison is done
+ * @remarks An instance of Tizen::Graphics::Bitmap is not taken into account in the comparisons.
*/
virtual bool Equals(const Tizen::Base::Object& rhs) const;
* @since 2.1
*
* @return A reference to this instance
- * @param[in] rhs An instance of %UserAccelerationSensorData
+ * @param[in] rhs An instance of %UserAccelerationSensorData to copy
*/
UserAccelerationSensorData& operator =(const UserAccelerationSensorData& rhs);
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// limitations under the License.
//
+#include <sensors.h>
+
#include <FBaseErrors.h>
#include <FUixSensorMotion.h>
#include <FBaseSysLog.h>
namespace Tizen { namespace Uix { namespace Sensor
{
+
+
void
-_MotionImpl::__MotionEventReceiver(unsigned int eventType, sensor_event_data_t* pEventData, void* pData)
+_MotionImpl:: __MotionSnapEventReceiver(unsigned long long timeStamp, sensor_motion_snap_e snap, void *pData)
{
- int eventData = *((int*) pEventData->event_data);
- IMotionEventListener* pMotionEventListener = (IMotionEventListener*) pData;
+ IMotionEventListener* pMotionEventListener = (IMotionEventListener*) pData;
- if (pMotionEventListener != null)
- {
- switch (eventType)
- {
- case MOTION_ENGINE_EVENT_SNAP:
- {
- SysLog(NID_UIX, "Detected SNAP event(%d)\n", eventData);
- switch (eventData)
- {
- case MOTION_ENGIEN_POSITIVE_SNAP_X:
- pMotionEventListener->OnSnapDetected(MOTION_SNAP_X_POSITIVE);
- break;
-
- case MOTION_ENGIEN_NEGATIVE_SNAP_X:
- pMotionEventListener->OnSnapDetected(MOTION_SNAP_X_NEGATIVE);
- break;
-
- case MOTION_ENGIEN_POSITIVE_SNAP_Y:
- pMotionEventListener->OnSnapDetected(MOTION_SNAP_Y_POSITIVE);
- break;
-
- case MOTION_ENGIEN_NEGATIVE_SNAP_Y:
- pMotionEventListener->OnSnapDetected(MOTION_SNAP_Y_NEGATIVE);
- break;
-
- case MOTION_ENGIEN_POSITIVE_SNAP_Z:
- pMotionEventListener->OnSnapDetected(MOTION_SNAP_Z_POSITIVE);
- break;
-
- case MOTION_ENGIEN_NEGATIVE_SNAP_Z:
- pMotionEventListener->OnSnapDetected(MOTION_SNAP_Z_NEGATIVE);
- break;
- }
- }
- break;
+ SysLog(NID_UIX, "Detected SNAP event(%d)\n", snap);
- case MOTION_ENGINE_EVENT_SHAKE:
- {
- SysLog(NID_UIX, "Detected SHAKE event(%d)\n", eventData);
- switch (eventData)
- {
- case MOTION_ENGIEN_SHAKE_DETECTION:
- pMotionEventListener->OnShakeDetected(MOTION_STARTED);
- break;
-
- case MOTION_ENGIEN_SHAKE_CONTINUING:
- pMotionEventListener->OnShakeDetected(MOTION_INPROGRESS);
- break;
-
- case MOTION_ENGIEN_SHAKE_FINISH:
- pMotionEventListener->OnShakeDetected(MOTION_ENDED);
- break;
- }
- }
- break;
+ switch (snap)
+ {
+ case SENSOR_MOTION_SNAP_X_POSITIVE:
+ pMotionEventListener->OnSnapDetected(MOTION_SNAP_X_POSITIVE);
+ break;
+
+ case SENSOR_MOTION_SNAP_X_NEGATIVE:
+ pMotionEventListener->OnSnapDetected(MOTION_SNAP_X_NEGATIVE);
+ break;
+
+ case SENSOR_MOTION_SNAP_Y_NEGATIVE:
+ pMotionEventListener->OnSnapDetected(MOTION_SNAP_Y_NEGATIVE);
+ break;
+
+ case SENSOR_MOTION_SNAP_Y_POSITIVE:
+ pMotionEventListener->OnSnapDetected(MOTION_SNAP_Y_POSITIVE);
+ break;
+
+ case SENSOR_MOTION_SNAP_Z_POSITIVE:
+ pMotionEventListener->OnSnapDetected(MOTION_SNAP_Z_POSITIVE);
+ break;
+
+ case SENSOR_MOTION_SNAP_Z_NEGATIVE:
+ pMotionEventListener->OnSnapDetected(MOTION_SNAP_Z_NEGATIVE);
+ break;
+ }
+}
+void
+_MotionImpl::__MotionShakeEventReceiver(unsigned long long timeStamp, sensor_motion_shake_e shake, void *pData)
+{
+ IMotionEventListener* pMotionEventListener = (IMotionEventListener*) pData;
- case MOTION_ENGINE_EVENT_DOUBLETAP:
- {
- SysLog(NID_UIX, "Detected DOUBLETAP event(%d)\n", eventData);
+ SysLog(NID_UIX, "Detected SHAKE event(%d)\n", shake);
+ switch (shake)
+ {
+ case SENSOR_MOTION_SHAKE_DETECTED:
+ pMotionEventListener->OnShakeDetected(MOTION_STARTED);
+ break;
- if (eventData == MOTION_ENGIEN_DOUBLTAP_DETECTION)
- pMotionEventListener->OnDoubleTapDetected();
+ case SENSOR_MOTION_SHAKE_CONTINUING:
+ pMotionEventListener->OnShakeDetected(MOTION_INPROGRESS);
+ break;
- }
- break;
+ case SENSOR_MOTION_SHAKE_FINISHED:
+ pMotionEventListener->OnShakeDetected(MOTION_ENDED);
+ break;
+ }
- case MOTION_ENGINE_EVENT_DIRECT_CALL:
- {
- SysLog(NID_UIX, "Detected MOVE_TO_EAR event(%d)\n", eventData);
+}
+void
+_MotionImpl::__MotionDoubleTapEventReceiver(unsigned long long timeStamp, void *pData)
+{
+ IMotionEventListener* pMotionEventListener = (IMotionEventListener*) pData;
- if (eventData == MOTION_ENGINE_DIRECT_CALL_DETECTION)
- pMotionEventListener->OnMoveToEarDetected();
+ SysLog(NID_UIX, "Detected DOUBLETAP event \n");
+
+ pMotionEventListener->OnDoubleTapDetected();
- }
- break;
- }
- }
+}
+void
+_MotionImpl::__MotionDirectCallEventReceiver(unsigned long long timeStamp, void *pData)
+{
+ IMotionEventListener* pMotionEventListener = (IMotionEventListener*) pData;
+
+ SysLog(NID_UIX, "Detected MOVETOEAR event \n");
+
+ pMotionEventListener->OnMoveToEarDetected();
}
_MotionImpl::_MotionImpl(void)
: __pIMotionEventListener(null)
- , __handle(-1)
+ , __handle(null)
, __motionType(MOTION_TYPE_NONE)
{
}
_MotionImpl::~_MotionImpl(void)
{
- int ret = 0;
+ int sensorResult = SENSOR_ERROR_NONE;
+
+ if (__motionType & MOTION_TYPE_SNAP)
+ {
+ sensorResult = sensor_stop(__handle, SENSOR_MOTION_SNAP);
+ SysTryReturnVoidResult(NID_UIX, sensorResult != SENSOR_ERROR_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ }
+ if (__motionType & MOTION_TYPE_SHAKE)
+ {
+ sensorResult = sensor_stop(__handle, SENSOR_MOTION_SHAKE);
+ SysTryReturnVoidResult(NID_UIX, sensorResult != SENSOR_ERROR_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ }
+ if (__motionType & MOTION_TYPE_MOVE_TO_EAR)
+ {
+ sensorResult = sensor_stop(__handle, SENSOR_MOTION_DIRECTCALL);
+ SysTryReturnVoidResult(NID_UIX, sensorResult != SENSOR_ERROR_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ }
+ if (__motionType & MOTION_TYPE_DOUBLETAP)
+ {
+ sensorResult = sensor_stop(__handle, SENSOR_MOTION_DOUBLETAP);
+ SysTryReturnVoidResult(NID_UIX, sensorResult != SENSOR_ERROR_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ }
- ret = sf_stop(__handle);
- if (ret != 0)
- SysLog(NID_UIX, "Failed to call sf_stop() method.");
+ sensorResult = sensor_destroy(__handle);
+ SysTryReturnVoidResult(NID_UIX, sensorResult != SENSOR_ERROR_NONE, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
- ret = sf_disconnect(__handle);
- if (ret != 0)
- SysLog(NID_UIX, "Failed to call sf_disconnect() method.");
+ __handle = null;
}
result
_MotionImpl::Construct(IMotionEventListener& listener)
{
- result r = E_SUCCESS;
- int ret = 0;
- ret = sf_is_sensor_event_available(MOTION_SENSOR, 0);
- SysTryReturn(NID_UIX, ret == 0, E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
- __handle = sf_connect(MOTION_SENSOR);
- SysTryReturn(NID_UIX, __handle >= 0, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor handle was not created properly");
- ret = sf_start(__handle, 0);
- SysTryReturn(NID_UIX, ret == 0, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ result r = E_SUCCESS;
+
+ int sensorResult = SENSOR_ERROR_NONE;
+
+ sensorResult = sensor_create(&__handle);
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_OUT_OF_MEMORY, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] The motion detection feature instance is not created");
+
+ sensorResult = sensor_start(__handle, SENSOR_MOTION_SNAP);
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_NOT_SUPPORTED, E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_IO_ERROR, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_OPERATION_FAILED, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ sensor_set_always_on(__handle, SENSOR_MOTION_SNAP);
+
+ sensorResult = sensor_start(__handle, SENSOR_MOTION_SHAKE);
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_NOT_SUPPORTED, E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_IO_ERROR, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_OPERATION_FAILED, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ sensor_set_always_on(__handle, SENSOR_MOTION_SHAKE);
+
+ sensorResult = sensor_start(__handle, SENSOR_MOTION_DOUBLETAP);
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_NOT_SUPPORTED, E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_IO_ERROR, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_OPERATION_FAILED, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ sensor_set_always_on(__handle, SENSOR_MOTION_DOUBLETAP);
+
+ sensorResult = sensor_start(__handle, SENSOR_MOTION_DIRECTCALL);
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_NOT_SUPPORTED, E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The motion detection feature is not supported");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_IO_ERROR, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ SysTryReturn(NID_UIX, sensorResult != SENSOR_ERROR_OPERATION_FAILED, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Sensor couldn't start");
+ sensor_set_always_on(__handle, SENSOR_MOTION_DIRECTCALL);
__pIMotionEventListener = &listener;
return r;
SysLog(NID_UIX, "type(%d) / __motionType(%d)", (int)type, (int)__motionType);
+ SetLastResult(E_INVALID_STATE);
+
if (type & MOTION_TYPE_SNAP)
{
if (__motionType & MOTION_TYPE_SNAP)
}
else
{
- ret = sf_register_event(__handle, MOTION_ENGINE_EVENT_SNAP, null, __MotionEventReceiver, (void*) __pIMotionEventListener);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion snap event.");
+ ret = sensor_motion_snap_set_cb(__handle, __MotionSnapEventReceiver, (void*) __pIMotionEventListener);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion snap event.");
}
}
else
{
if (__motionType & MOTION_TYPE_SNAP)
{
- ret = sf_unregister_event(__handle, MOTION_ENGINE_EVENT_SNAP);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion snap event.");
+ ret = sensor_motion_snap_unset_cb(__handle);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion snap event.");
}
}
}
else
{
- ret = sf_register_event(__handle, MOTION_ENGINE_EVENT_SHAKE, null, __MotionEventReceiver, (void*) __pIMotionEventListener);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion shake event.");
+ ret = sensor_motion_shake_set_cb(__handle, __MotionShakeEventReceiver, (void*) __pIMotionEventListener);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion shake event.");
}
}
else
{
if (__motionType & MOTION_TYPE_SHAKE)
{
- ret = sf_unregister_event(__handle, MOTION_ENGINE_EVENT_SHAKE);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion shake event.");
+ ret = sensor_motion_shake_unset_cb(__handle);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion shake event.");
}
}
}
else
{
- ret = sf_register_event(__handle, MOTION_ENGINE_EVENT_DOUBLETAP, null, __MotionEventReceiver, (void*) __pIMotionEventListener);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion double tap event.");
+ ret = sensor_motion_doubletap_set_cb(__handle, __MotionDoubleTapEventReceiver, (void*) __pIMotionEventListener);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion double tap event.");
}
}
else
{
if (__motionType & MOTION_TYPE_DOUBLETAP)
{
- ret = sf_unregister_event(__handle, MOTION_ENGINE_EVENT_DOUBLETAP);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion double tap event.");
+ ret = sensor_motion_doubletap_unset_cb(__handle);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion double tap event.");
}
}
if (type & MOTION_TYPE_MOVE_TO_EAR)
- {
+ {
if (__motionType & MOTION_TYPE_MOVE_TO_EAR)
{
SysLog(NID_UIX, "MOTION_TYPE_MOVE_TO_EAR is already registered.");
}
else
{
- ret = sf_register_event(__handle, MOTION_ENGINE_EVENT_DIRECT_CALL, null, __MotionEventReceiver, (void*) __pIMotionEventListener);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion direct call event.");
+ ret = sensor_motion_directcall_set_cb(__handle, __MotionDirectCallEventReceiver, (void*) __pIMotionEventListener);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to register motion direct call event.");
}
}
else
{
if (__motionType & MOTION_TYPE_MOVE_TO_EAR)
{
- ret = sf_unregister_event(__handle, MOTION_ENGINE_EVENT_DIRECT_CALL);
- SysTryReturnVoidResult(NID_UIX, ret == 0, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion direct call event.");
+ ret = sensor_motion_directcall_unset_cb(__handle);
+ SysTryReturnVoidResult(NID_UIX, ret == SENSOR_ERROR_NONE, E_INVALID_STATE, "[E_INVALID_STATE] Failed to unregister motion direct call event.");
}
}
+
__motionType = type;
SetLastResult(E_SUCCESS);
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 2.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
#ifndef _FUIX_SENSOR_INTERNAL_MOTION_IMPL_H_
#define _FUIX_SENSOR_INTERNAL_MOTION_IMPL_H_
-#include <sensor.h>
+#include <sensors.h>
+
#include <FBaseObject.h>
#include <FBaseDataType.h>
#include <FBaseResult.h>
_MotionImpl(const _MotionImpl& value);
_MotionImpl& operator =(const _MotionImpl& value);
- static void __MotionEventReceiver(unsigned int eventType, sensor_event_data_t* pEventData, void* pData);
+ static void __MotionSnapEventReceiver(unsigned long long timeStamp, sensor_motion_snap_e snap, void *pData);
+ static void __MotionShakeEventReceiver(unsigned long long timeStamp, sensor_motion_shake_e shake, void *pData);
+ static void __MotionDoubleTapEventReceiver(unsigned long long timeStamp, void *pData);
+ static void __MotionDirectCallEventReceiver(unsigned long long timeStamp, void *pData);
private:
IMotionEventListener* __pIMotionEventListener;
- int __handle;
+ sensor_handle_s *__handle;
unsigned long __motionType;
}; // _MotionImpl
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//