/// <summary>
/// Accelerometer Sensor Class. Used for registering callbacks for accelerometer and getting accelerometer data
/// </summary>
- public class Accelerometer : Sensor
+ public sealed class Accelerometer : Sensor
{
private static string AccelerometerKey = "http://tizen.org/feature/sensor.accelerometer";
/// <summary>
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// </summary>
public SensorDataAccuracy ActivityAccuracy { get; protected set; }
- protected abstract void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data);
+ protected internal abstract void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data);
internal ActivityDetector(uint index) : base(index)
{
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// FaceDownGestureDetector Class. Used for registering callbacks for face down gesture detector and getting the face down state
/// </summary>
- public class FaceDownGestureDetector : Sensor
+ public sealed class FaceDownGestureDetector : Sensor
{
private static string GestureDetectorKey = "http://tizen.org/feature/sensor.gesture_recognition";
/// </summary>
public event EventHandler<FaceDownGestureDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// GravitySensor Class. Used for registering callbacks for gravity sensor and getting gravity data
/// </summary>
- public class GravitySensor : Sensor
+ public sealed class GravitySensor : Sensor
{
private const string GravitySensorKey = "http://tizen.org/feature/sensor.gravity";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// Gyroscope Sensor Class. Used for registering callbacks for gyroscope and getting gyroscope data
/// </summary>
- public class Gyroscope : Sensor
+ public sealed class Gyroscope : Sensor
{
private const string GyroscopeKey = "http://tizen.org/feature/sensor.gyroscope";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// GyroscopeRotationVectorSensor Class. Used for registering callbacks for gyroscope rotation vector sensor and getting gyroscope rotation vector data
/// </summary>
- public class GyroscopeRotationVectorSensor : Sensor
+ public sealed class GyroscopeRotationVectorSensor : Sensor
{
private const string GyroscopeRVKey = "http://tizen.org/feature/sensor.gyroscope_rotation_vector";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// HeartRateMonitor Class. Used for registering callbacks for heart rate monitor and getting heart rate data
/// /// </summary>
- public class HeartRateMonitor : Sensor
+ public sealed class HeartRateMonitor : Sensor
{
private const string HRMKey = "http://tizen.org/feature/sensor.heart_rate_monitor";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// HumiditySensor Class. Used for registering callbacks for humidity sensor and getting humidity data
/// /// </summary>
- public class HumiditySensor : Sensor
+ public sealed class HumiditySensor : Sensor
{
private const string HumiditySensorKey = "http://tizen.org/feature/sensor.humidity";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// InVehicleActivityDetector Class. Used for registering callbacks for in vehicle activity detector and getting the in vehicle state
/// </summary>
- public class InVehicleActivityDetector : ActivityDetector
+ public sealed class InVehicleActivityDetector : ActivityDetector
{
private const string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
/// </summary>
public event EventHandler<InVehicleActivityDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ protected internal override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
{
Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
/// <summary>
/// LightSensor Class. Used for registering callbacks for light sensor and getting light data
/// /// </summary>
- public class LightSensor : Sensor
+ public sealed class LightSensor : Sensor
{
private const string LightSensorKey = "http://tizen.org/feature/sensor.photometer";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// LinearAccelerationSensor Class. Used for registering callbacks for linear acceleration sensor and getting linear acceleration data
/// /// </summary>
- public class LinearAccelerationSensor : Sensor
+ public sealed class LinearAccelerationSensor : Sensor
{
private const string LinearAccelerationSensorKey = "http://tizen.org/feature/sensor.linear_acceleration";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// Magnetometer Class. Used for registering callbacks for magnetometer and getting magnetometer data
/// /// </summary>
- public class Magnetometer : Sensor
+ public sealed class Magnetometer : Sensor
{
private static string MagnetometerKey = "http://tizen.org/feature/sensor.magnetometer";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// MagnetometerRotationVectorSensor Class. Used for registering callbacks for magnetometer rotation vector sensor and getting magnetometer rotation vector data
/// /// </summary>
- public class MagnetometerRotationVectorSensor : Sensor
+ public sealed class MagnetometerRotationVectorSensor : Sensor
{
private static string MagnetometerRVKey = "http://tizen.org/feature/sensor.geomagnetic_rotation_vector";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// OrientationSensor Class. Used for registering callbacks for orientation sensor and getting orientation data
/// /// </summary>
- public class OrientationSensor : Sensor
+ public sealed class OrientationSensor : Sensor
{
private static string OrientationSensorKey = "http://tizen.org/feature/sensor.tiltmeter";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// Pedometer Sensor Class. Used for registering callbacks for pedometer and getting pedometer data
/// /// </summary>
- public class Pedometer : Sensor
+ public sealed class Pedometer : Sensor
{
private static string PedometerKey = "http://tizen.org/feature/sensor.pedometer";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// PickUpGestureDetector Class. Used for registering callbacks for pick up activity detector and getting the pick up state
/// </summary>
- public class PickUpGestureDetector : Sensor
+ public sealed class PickUpGestureDetector : Sensor
{
private static string GestureDetectorKey = "http://tizen.org/feature/sensor.gesture_recognition";
/// </summary>
public event EventHandler<PickUpGestureDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// PressureSensor Class. Used for registering callbacks for pressure sensor and getting pressure data
/// /// </summary>
- public class PressureSensor : Sensor
+ public sealed class PressureSensor : Sensor
{
private static string PressureSensorKey = "http://tizen.org/feature/sensor.barometer";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// ProximitySensor Class. Used for registering callbacks for proximity sensor and getting proximity data
/// /// </summary>
- public class ProximitySensor : Sensor
+ public sealed class ProximitySensor : Sensor
{
private static string ProximitySensorKey = "http://tizen.org/feature/sensor.proximity";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// RotationVectorSensor Class. Used for registering callbacks for rotation vector sensor and getting rotation vector data
/// /// </summary>
- public class RotationVectorSensor : Sensor
+ public sealed class RotationVectorSensor : Sensor
{
private static string RotationVectorKey = "http://tizen.org/feature/sensor.rotation_vector";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// RunningActivityDetector Class. Used for registering callbacks for running activity detector and getting the running state
/// </summary>
- public class RunningActivityDetector : ActivityDetector
+ public sealed class RunningActivityDetector : ActivityDetector
{
private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
/// </summary>
public event EventHandler<RunningActivityDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ protected internal override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
{
Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
/// <summary>
/// SleepMonitor Class. Used for registering callbacks for sleep monitor and getting sleep data
/// /// </summary>
- public class SleepMonitor : Sensor
+ public sealed class SleepMonitor : Sensor
{
private static string SleepMonitorKey = "http://tizen.org/feature/sensor.sleep_monitor";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// StationaryActivityDetector Class. Used for registering callbacks for stationary activity detector and getting the stationary state
/// </summary>
- public class StationaryActivityDetector : ActivityDetector
+ public sealed class StationaryActivityDetector : ActivityDetector
{
private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
/// </summary>
public event EventHandler<StationaryActivityDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ protected internal override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
{
Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
/// <summary>
/// TemperatureSensor Class. Used for registering callbacks for temperature sensor and getting temperature data
/// /// </summary>
- public class TemperatureSensor : Sensor
+ public sealed class TemperatureSensor : Sensor
{
private static string TemperatureSensorKey = "http://tizen.org/feature/sensor.temperature";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// UltravioletSensor Class. Used for registering callbacks for ultraviolet sensor and getting ultraviolet data
/// /// </summary>
- public class UltravioletSensor : Sensor
+ public sealed class UltravioletSensor : Sensor
{
private static string UltravioletSensorKey = "http://tizen.org/feature/sensor.ultraviolet";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// UncalibratedGyroscope Sensor Class. Used for registering callbacks for uncalibrated gyroscope and getting uncalibrated gyroscope data
/// /// </summary>
- public class UncalibratedGyroscope : Sensor
+ public sealed class UncalibratedGyroscope : Sensor
{
private static string UncalibratedGyroscopeKey = "http://tizen.org/feature/sensor.gyroscope.uncalibrated";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// UncalibratedMagnetometer Sensor Class. Used for registering callbacks for uncalibrated magnetometer and getting uncalibrated magnetometer data
/// /// </summary>
- public class UncalibratedMagnetometer : Sensor
+ public sealed class UncalibratedMagnetometer : Sensor
{
private static string UncalibratedMagnetometerKey = "http://tizen.org/feature/sensor.magnetometer.uncalibrated";
return count;
}
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
/// <summary>
/// WalkingActivityDetector Class. Used for registering callbacks for walking activity detector and getting the walking state
/// </summary>
- public class WalkingActivityDetector : ActivityDetector
+ public sealed class WalkingActivityDetector : ActivityDetector
{
private static string ActivityDetectorKey = "http://tizen.org/feature/sensor.activity_recognition";
/// </summary>
public event EventHandler<WalkingActivityDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+ protected internal override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
{
Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
/// <summary>
/// WristUpGestureDetector Class. Used for registering callbacks for wrist up gesture detector and getting the wrist up state
/// </summary>
- public class WristUpGestureDetector : Sensor
+ public sealed class WristUpGestureDetector : Sensor
{
private static string WristUpKey = "http://tizen.org/feature/sensor.wrist_up";
/// </summary>
public event EventHandler<WristUpGestureDetectorDataUpdatedEventArgs> DataUpdated;
- protected override void EventListenStart()
+ protected internal override void EventListenStart()
{
int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
if (error != (int)SensorError.None)
}
}
- protected override void EventListenStop()
+ protected internal override void EventListenStop()
{
int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
if (error != (int)SensorError.None)
private IntPtr _listenerHandle = IntPtr.Zero;
internal abstract SensorType GetSensorType();
- protected abstract void EventListenStart();
- protected abstract void EventListenStop();
+ protected internal abstract void EventListenStart();
+ protected internal abstract void EventListenStop();
internal Sensor(uint index)
{