csapi-sensor: change index type from int to unit in constructor
authorkibak.yoon <kibak.yoon@samsung.com>
Fri, 21 Oct 2016 06:02:33 +0000 (15:02 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Fri, 21 Oct 2016 10:27:59 +0000 (19:27 +0900)
- index shouldn't be the negative number.

Change-Id: I06de291893588bc22fff4486feda9b3cbf0922cb
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
29 files changed:
Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs
Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs
Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs
Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs
Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs
Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs
Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs
Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs
Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs
Tizen.Sensor/Tizen.Sensor/Sensor.cs

index 5cce251..4a32f9a 100644 (file)
@@ -65,7 +65,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular accelerometer sensor in case of multiple sensors
         /// </param>
-        public Accelerometer(int index = 0) : base(index)
+        public Accelerometer(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating Accelerometer object");
         }
index 917c88c..6dcb0ce 100644 (file)
@@ -31,7 +31,7 @@ namespace Tizen.Sensor
 
         protected abstract void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data);
 
-        internal ActivityDetector(int index) : base(index)
+        internal ActivityDetector(uint index) : base(index)
         {
         }
 
index 69adcc2..e29d6b7 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular face down gesture detector in case of multiple sensors.
         /// </param>
-        public FaceDownGestureDetector(int index = 0) : base(index)
+        public FaceDownGestureDetector(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating face down gesture detector object");
         }
index 07a330a..44b942b 100644 (file)
@@ -66,7 +66,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular gravity sensor in case of multiple sensors
         /// </param>
-        public GravitySensor (int index = 0) : base(index)
+        public GravitySensor (uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating GravitySensor object");
         }
index 579a634..10d7953 100644 (file)
@@ -65,7 +65,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular gyroscope sensor in case of multiple sensors
         /// </param>
-        public Gyroscope(int index = 0) : base(index)
+        public Gyroscope(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating Gyroscope object");
         }
index bfba8aa..4bd07ab 100644 (file)
@@ -75,7 +75,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular gyroscope rotation vector sensor in case of multiple sensors
         /// </param>
-        public GyroscopeRotationVectorSensor(int index = 0) : base(index)
+        public GyroscopeRotationVectorSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating GyroscopeRotationVectorSensor object");
         }
index c9f3497..54d6fb5 100644 (file)
@@ -59,7 +59,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular heart rate monitor in case of multiple sensors
         /// </param>
-        public HeartRateMonitor(int index = 0) : base(index)
+        public HeartRateMonitor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating HeartRateMonitor object");
         }
index 2c739a2..128e86e 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular humidity sensor in case of multiple sensors
         /// </param>
-        public HumiditySensor(int index = 0) : base(index)
+        public HumiditySensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating HumiditySensor object");
         }
index 7b518bb..7b5cffa 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular in-vehicle activity detector in case of multiple sensors.
         /// </param>
-        public InVehicleActivityDetector(int index = 0) : base(index)
+        public InVehicleActivityDetector(uint index = 0) : base(index)
         {
             SetAttribute((SensorAttribute)ActivityAttribute, (int)ActivityType.InVehicle);
             Log.Info(Globals.LogTag, "Creating in-vehicle activity detector object");
index 4e4d87b..2bbe5fd 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular light sensor in case of multiple sensors
         /// </param>
-        public LightSensor(int index = 0) : base(index)
+        public LightSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating LightSensor object");
         }
index aa767b7..eefb258 100644 (file)
@@ -66,7 +66,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular linear acceleration sensor in case of multiple sensors
         /// </param>
-        public LinearAccelerationSensor(int index = 0) : base(index)
+        public LinearAccelerationSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating LinearAccelerationSensor object");
         }
index e0ed9d2..80baee8 100644 (file)
@@ -66,7 +66,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular magnetometer in case of multiple sensors
         /// </param>
-        public Magnetometer(int index = 0) : base(index)
+        public Magnetometer(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating Magnetometer object");
         }
index 91fbb92..1b7b104 100644 (file)
@@ -76,7 +76,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular magnetometer rotation vector sensor in case of multiple sensors
         /// </param>
-        public MagnetometerRotationVectorSensor(int index = 0) : base(index)
+        public MagnetometerRotationVectorSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating MagnetometerRotationVectorSensor object");
         }
index 132456e..ae8512b 100644 (file)
@@ -66,7 +66,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular orientation sensor in case of multiple sensors
         /// </param>
-        public OrientationSensor(int index = 0) : base(index)
+        public OrientationSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating OrientationSensor object");
         }
index 9e5a0d6..32178d9 100644 (file)
@@ -94,7 +94,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular pedometer sensor in case of multiple sensors
         /// </param>
-        public Pedometer(int index = 0) : base(index)
+        public Pedometer(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating Pedometer object");
         }
index f236a4a..80c2739 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular pick up gesture detector in case of multiple sensors.
         /// </param>
-        public PickUpGestureDetector(int index = 0) : base(index)
+        public PickUpGestureDetector(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating pick up gesture detector object");
         }
index 5ee28ad..55d7b42 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular pressure sensor in case of multiple sensors
         /// </param>
-        public PressureSensor(int index = 0) : base(index)
+        public PressureSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating PressureSensor object");
         }
index 15195c6..898269f 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular proximity sensor in case of multiple sensors
         /// </param>
-        public ProximitySensor(int index = 0) : base(index)
+        public ProximitySensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating ProximitySensor object");
         }
index be44649..4c400c3 100644 (file)
@@ -76,7 +76,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular rotation vector sensor in case of multiple sensors
         /// </param>
-        public RotationVectorSensor(int index = 0) : base(index)
+        public RotationVectorSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating RotationVectorSensor object");
         }
index 917f930..72fe410 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular running activity detector in case of multiple sensors.
         /// </param>
-        public RunningActivityDetector(int index = 0) : base(index)
+        public RunningActivityDetector(uint index = 0) : base(index)
         {
             SetAttribute((SensorAttribute)ActivityAttribute, (int)ActivityType.Running);
             Log.Info(Globals.LogTag, "Creating running activity detector object");
index f08a80b..543f5e6 100644 (file)
@@ -59,7 +59,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular sleep monitor in case of multiple sensors
         /// </param>
-        public SleepMonitor(int index = 0) : base(index)
+        public SleepMonitor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating SleepMonitor object");
         }
index 73a83cd..b5c5b7c 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular stationary activity detector in case of multiple sensors.
         /// </param>
-        public StationaryActivityDetector(int index = 0) : base(index)
+        public StationaryActivityDetector(uint index = 0) : base(index)
         {
             SetAttribute((SensorAttribute)ActivityAttribute, (int)ActivityType.Stationary);
             Log.Info(Globals.LogTag, "Creating stationary activity detector object");
index ac09680..3fdc409 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular temperature sensor in case of multiple sensors
         /// </param>
-        public TemperatureSensor(int index = 0) : base(index)
+        public TemperatureSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating TemperatureSensor object");
         }
index d04a104..4aeba27 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular ultraviolet sensor in case of multiple sensors
         /// </param>
-        public UltravioletSensor(int index = 0) : base(index)
+        public UltravioletSensor(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating UltravioletSensor object");
         }
index 302efec..e3a8b87 100644 (file)
@@ -80,7 +80,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular uncalibrated gyroscope sensor in case of multiple sensors
         /// </param>
-        public UncalibratedGyroscope(int index = 0) : base(index)
+        public UncalibratedGyroscope(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating UncalibratedGyroscope object");
         }
index a9bb8b4..c877116 100644 (file)
@@ -81,7 +81,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular uncalibrated magnetometer sensor in case of multiple sensors
         /// </param>
-        public UncalibratedMagnetometer(int index = 0) : base(index)
+        public UncalibratedMagnetometer(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating UncalibratedMagnetometer object");
         }
index 307a16b..3b7dbf3 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular walking activity detector in case of multiple sensors.
         /// </param>
-        public WalkingActivityDetector(int index = 0) : base(index)
+        public WalkingActivityDetector(uint index = 0) : base(index)
         {
             SetAttribute((SensorAttribute)ActivityAttribute, (int)ActivityType.Walking);
             Log.Info(Globals.LogTag, "Creating walking activity gesture detector object");
index c7134ae..3c92416 100644 (file)
@@ -55,7 +55,7 @@ namespace Tizen.Sensor
         /// <param name='index'>
         /// Index. Default value for this is 0. Index refers to a particular wrist up gesture detector in case of multiple sensors.
         /// </param>
-        public WristUpGestureDetector(int index = 0) : base(index)
+        public WristUpGestureDetector(uint index = 0) : base(index)
         {
             Log.Info(Globals.LogTag, "Creating wrist up gesture detector object");
         }
index 0245e84..0c98272 100644 (file)
@@ -42,7 +42,7 @@ namespace Tizen.Sensor
         protected abstract void EventListenStart();
         protected abstract void EventListenStop();
 
-        internal Sensor(int index)
+        internal Sensor(uint index)
         {
             SensorType type = GetSensorType();
             GetHandleList(type, index);
@@ -350,7 +350,7 @@ namespace Tizen.Sensor
             }
         }
 
-        private void GetHandleList(SensorType type, int index)
+        private void GetHandleList(SensorType type, uint index)
         {
             IntPtr list;
             IntPtr[] sensorList;