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:
src/Tizen.Sensor/Tizen.Sensor/Plugins/Accelerometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/ActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/FaceDownGestureDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/GravitySensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/Gyroscope.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/GyroscopeRotationVectorSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/HeartRateMonitor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/HumiditySensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/InVehicleActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/LightSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/LinearAccelerationSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/Magnetometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/MagnetometerRotationVectorSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/OrientationSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/Pedometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/PickUpGestureDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/PressureSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/ProximitySensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/RotationVectorSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/RunningActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/SleepMonitor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/StationaryActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/TemperatureSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/UltravioletSensor.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedGyroscope.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/UncalibratedMagnetometer.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/WalkingActivityDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Plugins/WristUpGestureDetector.cs
src/Tizen.Sensor/Tizen.Sensor/Sensor.cs

index 5cce25199c01dec2225607ed9b538c4c2010cd37..4a32f9af36f300225d1ddf2900c06f6860887213 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 917c88c18defb9a0b8a568391058a1ebd8633337..6dcb0ce5d983ed35be0464fab7b956cf2c4f3fce 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 69adcc286ea306bdaf656ef5ca25d95fff5e100e..e29d6b7a30da7dd337eca5c71f4461f290727118 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 07a330ad8d2a269c73ffed0cfdea5068e1ba1858..44b942be3b527dbf0e427b6d615a65444fde7fe8 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 579a63411bdfe5ddd7b762bd2c9c96c06686316a..10d7953b49e8c6a276a6ad0810c5ff877b846679 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 bfba8aa65cf14f907830d29f430c917e5f23717b..4bd07abdc95c28ac8e7cb404f2e0a8a1548aea0d 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 c9f3497d5cc3660062d445814b809cdb1767e407..54d6fb58d6e5b9dd05828d2771307be0d77b05d1 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 2c739a2e452fc61d605b39057532d46be953bc59..128e86e34be775e0b25e37a2b79ba11d96f52b7e 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 7b518bbdf51f33b47b2ad4a9f7beba9768bb3e40..7b5cffaef4ea958134c1d2a18ec87fd9f7677188 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 4e4d87b99bf9a7fd57cbf81f0b39bc590975e8e8..2bbe5fd3bc599b9a0d0aa0493b8fa315203e1e8c 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 aa767b7887fd40bbc6c64aba91cf584fb4d51a93..eefb2586d8d8d8523b57924abe53cadf31703ce9 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 e0ed9d21d7600eddf7b723f2494116813a4a1177..80baee8a1f497fc3ca700fd2d2a71ead3424f0e4 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 91fbb928138e13d37be01a3c636f44a601d3cfa2..1b7b1044d62553970f80992569aa2c00acd65a06 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 132456ed45da50b8c86049c3ca1af3c4060e2327..ae8512b25c9b49b49fe7fd137e15d51aee44f955 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 9e5a0d68528b237889fa43d4697edbf1a22b4412..32178d9af792c0c903b4d920fb158977bcd51d9d 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 f236a4a9ed9a94a68bd18c838142677f2d3fdf17..80c273901a8112a2db7313ef27c44e796e1b46b7 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 5ee28adb5ffe2a14f3b2c98c66e1ac47754b2f01..55d7b424a05fdd02ff439f2662941b29a72d1d94 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 15195c6a737a4d98331cd5e37521ff12cab7cae5..898269f3d79690202f1a4ae0648e4f598af91a25 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 be446496d5c8b3749881d8132ab835133982d9f9..4c400c3bef9d648e825bf7242df501398dbcd3d5 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 917f930a745322ea5932e19c90519b379b145a96..72fe41043c6472a831cdd5ee26991870fa3db5a9 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 f08a80b06d113a48bfab2aa210b43df80978d9fd..543f5e6faafa8e0f3b727be83788823b0b38914b 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 73a83cd4f5795352d2c1a437c94d8a2b53c3475b..b5c5b7c132e979e2d63c871eb15a17c31a48714d 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 ac09680cecc5f24515ceff5b83f59f8b9f64285b..3fdc409691c6e07abd8d5e0b8012dbaa32b8ae1d 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 d04a10493c3a4aa8fed04d8655e48626924793c5..4aeba27b15225cfbff1d9744f1ee308a6f2bc35c 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 302efec48de10ac2f697afd5a92c261b90de3c19..e3a8b87ff3ecc09a44edbba9d36d4ece27425f06 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 a9bb8b4a520dfb78d13e0499122528f243947ac9..c8771162fc11d4f65762542c49e5faf01372f842 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 307a16bcaa3535d6ed09669107f9b98e8a9c1f40..3b7dbf39b003075671f4aa4ca6687bd81e7143e1 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 c7134aea491e2caf2b280d7b6a772ce6ab00118b..3c92416e4c82a66c22eeaf2edf2910cb28a00884 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 0245e84740fffbaf4390c58a3e9b72a0b79cd2a1..0c98272bc94e8dbf73cb0499dd28d3ff0c8fd38d 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;