Add activity/gesture detectors as new sensor
authorkibak.yoon <kibak.yoon@samsung.com>
Tue, 26 Jul 2016 13:29:19 +0000 (22:29 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Tue, 23 Aug 2016 02:39:49 +0000 (11:39 +0900)
Change-Id: If2451f4d07264bdddf604c9874daf49861432955
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
19 files changed:
Tizen.System.Sensor/Tizen.System.Sensor.csproj [changed mode: 0644->0755]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/FaceDownGestureDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/InVehicleActivityDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/PickUpGestureDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/RunningActivityDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/StationaryActivityDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/WalkingActivityDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/WristUpGestureDetectorDataUpdatedEventArgs.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/ActivityDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/FaceDownGestureDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/InVehicleActivityDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/Pedometer.cs
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/PickUpGestureDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/RunningActivityDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/SleepMonitor.cs
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/StationaryActivityDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/WalkingActivityDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/Plugins/WristUpGestureDetector.cs [new file with mode: 0644]
Tizen.System.Sensor/Tizen.System.Sensor/SensorEnumerations.cs

old mode 100644 (file)
new mode 100755 (executable)
index d1a78aa..db06165
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{CB655C6A-F73B-448E-913C-CA4DCBC5E401}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <RootNamespace>Tizen.System.Sensor</RootNamespace>
-    <AssemblyName>Tizen.System.Sensor</AssemblyName>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
-    <TargetFrameworkProfile />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug</OutputPath>
-    <DefineConstants>DEBUG;</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Release</OutputPath>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <ConsolePause>false</ConsolePause>
-    <Prefer32Bit>false</Prefer32Bit>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>Tizen.System.Sensor.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <Import Project="CoreFx.References.targets" />
-  <ItemGroup Condition=" '$(CoreFxPath)' == '' ">
-    <Reference Include="System" />
-  </ItemGroup>
-  <ItemGroup>
-    <Reference Include="Tizen.Internals">
-      <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>
-    </Reference>
-    <Reference Include="Tizen">
-      <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>
-    </Reference>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Interop\Interop.Sensor.cs" />
-    <Compile Include="Tizen.System.Sensor\SensorEnumerations.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\GravitySensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeRotationVectorSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\HeartRateMonitorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\HumiditySensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\LightSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\LinearAccelerationSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerRotationVectorSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\OrientationSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\PedometerDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\PressureSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\ProximitySensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\RotationVectorSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\SleepMonitorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\TemperatureSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\UltravioletSensorDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedGyroscopeDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedMagnetometerDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\GravitySensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\Gyroscope.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\GyroscopeRotationVectorSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\HeartRateMonitor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\HumiditySensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\LightSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\LinearAccelerationSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\Magnetometer.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\MagnetometerRotationVectorSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\OrientationSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\Pedometer.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\PressureSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\ProximitySensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\RotationVectorSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\SleepMonitor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\TemperatureSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\UltravioletSensor.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedGyroscope.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedMagnetometer.cs" />
-    <Compile Include="Tizen.System.Sensor\Sensor.cs" />
-    <Compile Include="Interop\Interop.Libraries.cs" />
-    <Compile Include="Tizen.System.Sensor\Plugins\Accelerometer.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\SensorAccuracyChangedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\EventArgs\AccelerometerDataUpdatedEventArgs.cs" />
-    <Compile Include="Tizen.System.Sensor\SensorErrorFactory.cs" />
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ItemGroup>
-    <None Include="Tizen.System.Sensor.snk" />
-  </ItemGroup>
-  <ProjectExtensions>
-    <MonoDevelop>
-      <Properties>
-        <Policies>
-          <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />
-          <CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
-          <DotNetNamingPolicy DirectoryNamespaceAssociation="None" ResourceNamePolicy="FileFormatDefault" />
-          <StandardHeader Text="" IncludeInNewFiles="True" />
-          <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />
-          <TextStylePolicy inheritsSet="Mono" inheritsScope="text/plain" scope="application/xml" />
-          <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" />
-        </Policies>
-      </Properties>
-    </MonoDevelop>
-  </ProjectExtensions>
-</Project>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>8.0.30703</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{CB655C6A-F73B-448E-913C-CA4DCBC5E401}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <RootNamespace>Tizen.System.Sensor</RootNamespace>\r
+    <AssemblyName>Tizen.System.Sensor</AssemblyName>\r
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+    <TargetFrameworkProfile />\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Debug</OutputPath>\r
+    <DefineConstants>DEBUG;</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <ConsolePause>false</ConsolePause>\r
+    <Prefer32Bit>false</Prefer32Bit>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>none</DebugType>\r
+    <Optimize>false</Optimize>\r
+    <OutputPath>bin\Release</OutputPath>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+    <ConsolePause>false</ConsolePause>\r
+    <Prefer32Bit>false</Prefer32Bit>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <SignAssembly>true</SignAssembly>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <AssemblyOriginatorKeyFile>Tizen.System.Sensor.snk</AssemblyOriginatorKeyFile>\r
+  </PropertyGroup>\r
+  <Import Project="CoreFx.References.targets" />\r
+  <ItemGroup Condition=" '$(CoreFxPath)' == '' ">\r
+    <Reference Include="System" />\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Reference Include="Tizen.Internals">\r
+      <HintPath>..\..\tizen\Tizen.Internals\bin\Debug\Tizen.Internals.dll</HintPath>\r
+    </Reference>\r
+    <Reference Include="Tizen">\r
+      <HintPath>..\..\tizen\Tizen\bin\Debug\Tizen.dll</HintPath>\r
+    </Reference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Compile Include="Properties\AssemblyInfo.cs" />\r
+    <Compile Include="Interop\Interop.Sensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\FaceDownGestureDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\PickUpGestureDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\RunningActivityDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\StationaryActivityDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\InVehicleActivityDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\WalkingActivityDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\WristUpGestureDetectorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\ActivityDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\PickUpGestureDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\RunningActivityDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\InVehicleActivityDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\StationaryActivityDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\WalkingActivityDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\WristUpGestureDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\FaceDownGestureDetector.cs" />\r
+    <Compile Include="Tizen.System.Sensor\SensorEnumerations.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\GravitySensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\GyroscopeRotationVectorSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\HeartRateMonitorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\HumiditySensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\LightSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\LinearAccelerationSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\MagnetometerRotationVectorSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\OrientationSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\PedometerDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\PressureSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\ProximitySensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\RotationVectorSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\SleepMonitorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\TemperatureSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\UltravioletSensorDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedGyroscopeDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\UncalibratedMagnetometerDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\GravitySensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\Gyroscope.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\GyroscopeRotationVectorSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\HeartRateMonitor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\HumiditySensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\LightSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\LinearAccelerationSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\Magnetometer.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\MagnetometerRotationVectorSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\OrientationSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\Pedometer.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\PressureSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\ProximitySensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\RotationVectorSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\SleepMonitor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\TemperatureSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\UltravioletSensor.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedGyroscope.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\UncalibratedMagnetometer.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Sensor.cs" />\r
+    <Compile Include="Interop\Interop.Libraries.cs" />\r
+    <Compile Include="Tizen.System.Sensor\Plugins\Accelerometer.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\SensorAccuracyChangedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\EventArgs\AccelerometerDataUpdatedEventArgs.cs" />\r
+    <Compile Include="Tizen.System.Sensor\SensorErrorFactory.cs" />\r
+  </ItemGroup>\r
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />\r
+  <ItemGroup>\r
+    <None Include="Tizen.System.Sensor.snk" />\r
+  </ItemGroup>\r
+  <ProjectExtensions>\r
+    <MonoDevelop>\r
+      <Properties>\r
+        <Policies>\r
+          <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />\r
+          <CSharpFormattingPolicy inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />\r
+          <DotNetNamingPolicy DirectoryNamespaceAssociation="None" ResourceNamePolicy="FileFormatDefault" />\r
+          <StandardHeader Text="" IncludeInNewFiles="True" />\r
+          <TextStylePolicy EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />\r
+          <TextStylePolicy inheritsSet="Mono" inheritsScope="text/plain" scope="application/xml" />\r
+          <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" />\r
+        </Policies>\r
+      </Properties>\r
+    </MonoDevelop>\r
+  </ProjectExtensions>\r
+</Project>\r
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/FaceDownGestureDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/FaceDownGestureDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..7869fa4
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// FaceDownGestureDetector changed event arguments. Class for storing the data returned by face down gesture detector.
+    /// </summary>
+    public class FaceDownGestureDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal FaceDownGestureDetectorDataUpdatedEventArgs(float state)
+        {
+            FaceDown = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the face down state.
+        /// </summary>
+        public DetectorState FaceDown { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/InVehicleActivityDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/InVehicleActivityDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..df7fa04
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// InVehicleActivityDetector changed event arguments. Class for storing the data returned by in-vehicle activity detector
+    /// </summary>
+    public class InVehicleActivityDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal InVehicleActivityDetectorDataUpdatedEventArgs(float state)
+        {
+            InVehicle = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the in-vehicle state.
+        /// </summary>
+        public DetectorState InVehicle { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/PickUpGestureDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/PickUpGestureDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..17a2552
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// PickUpGestureDetector changed event arguments. Class for storing the data returned by pick up gesture detector
+    /// </summary>
+    public class PickUpGestureDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal PickUpGestureDetectorDataUpdatedEventArgs(float state)
+        {
+            PickUp = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the pick up state.
+        /// </summary>
+        public DetectorState PickUp { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/RunningActivityDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/RunningActivityDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..ccb8b27
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// RunningActivityDetector changed event arguments. Class for storing the data returned by running activity detector
+    /// </summary>
+    public class RunningActivityDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal RunningActivityDetectorDataUpdatedEventArgs(float state)
+        {
+            Running = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the running state.
+        /// </summary>
+        public DetectorState Running { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/StationaryActivityDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/StationaryActivityDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..6e13641
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// StationaryActivityDetector changed event arguments. Class for storing the data returned by stationary activity detector
+    /// </summary>
+    public class StationaryActivityDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal StationaryActivityDetectorDataUpdatedEventArgs(float state)
+        {
+            Stationary = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the stationary state.
+        /// </summary>
+        public DetectorState Stationary { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/WalkingActivityDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/WalkingActivityDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..aa309d0
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// WalkingActivityDetector changed event arguments. Class for storing the data returned by walking activity detector
+    /// </summary>
+    public class WalkingActivityDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal WalkingActivityDetectorDataUpdatedEventArgs(float state)
+        {
+            Walking = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the walking state.
+        /// </summary>
+        public DetectorState Walking { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/WristUpGestureDetectorDataUpdatedEventArgs.cs b/Tizen.System.Sensor/Tizen.System.Sensor/EventArgs/WristUpGestureDetectorDataUpdatedEventArgs.cs
new file mode 100644 (file)
index 0000000..69d6f4a
--- /dev/null
@@ -0,0 +1,28 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    /// <summary>
+    /// WristUpGestureDetector changed event arguments. Class for storing the data returned by wrist up gesture detector
+    /// </summary>
+    public class WristUpGestureDetectorDataUpdatedEventArgs : EventArgs
+    {
+        internal WristUpGestureDetectorDataUpdatedEventArgs(float state)
+        {
+            WristUp = (DetectorState) state;
+        }
+
+        /// <summary>
+        /// Gets the wrist up state.
+        /// </summary>
+        public DetectorState WristUp { get; private set; }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/ActivityDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/ActivityDetector.cs
new file mode 100644 (file)
index 0000000..41e5e2d
--- /dev/null
@@ -0,0 +1,46 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public abstract class ActivityDetector : Sensor
+    {
+        /// <summary>
+        /// Gets the activity accuracy of activity detector
+        /// </summary>
+        public SensorDataAccuracy ActivityAccuracy { get; protected set; }
+
+        protected abstract void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data);
+
+        internal ActivityDetector(int index) : base(index)
+        {
+        }
+
+        protected override void EventListenStart()
+        {
+            int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error setting event callback for activity detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for activity detector");
+            }
+        }
+
+        protected override void EventListenStop()
+        {
+            int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error unsetting event callback for activity detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for activity detector");
+            }
+        }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/FaceDownGestureDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/FaceDownGestureDetector.cs
new file mode 100644 (file)
index 0000000..e3cc4a2
--- /dev/null
@@ -0,0 +1,121 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class FaceDownGestureDetector : Sensor
+    {
+        /// <summary>
+        /// Gets the state of the face down gesture.
+        /// </summary>
+        public DetectorState FaceDown { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether face down gesture detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the face down gesture detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of face down gesture detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of face down gesture detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.FaceDownGestureDetector"/> class.
+        /// </summary>
+        /// <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)
+        {
+            Log.Info(Globals.LogTag, "Creating face down gesture detector object");
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.FaceDownGestureDetector;
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.FaceDownGestureDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if face down gesture detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.FaceDownGestureDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for face down gesture detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in face down gesture detector data.
+        /// </summary>
+        public event EventHandler<FaceDownGestureDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void EventListenStart()
+        {
+            int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error setting event callback for face down gesture detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for face down gesture detector");
+            }
+        }
+
+        protected override void EventListenStop()
+        {
+            int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error unsetting event callback for face down gesture detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for face down gesture detector");
+            }
+        }
+
+        private void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            FaceDown = (DetectorState) sensorData.values[0];
+
+            DataUpdated?.Invoke(this, new FaceDownGestureDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/InVehicleActivityDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/InVehicleActivityDetector.cs
new file mode 100644 (file)
index 0000000..21b5382
--- /dev/null
@@ -0,0 +1,102 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class InVehicleActivityDetector : ActivityDetector
+    {
+        /// <summary>
+        /// Gets the state of in-vehicle activity detector
+        /// </summary>
+        public DetectorState InVehicle { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether in-vehicle activity detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the in-vehicle activity detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of in-vehicle activity detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of in-vehicle activity detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.InVehicleActivityDetector"/> class.
+        /// </summary>
+        /// <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) : base(index)
+        {
+            Log.Info(Globals.LogTag, "Creating in-vehicle activity detector object");
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.InVehicleActivityDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if in-vehicle activity detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.InVehicleActivityDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for in-vehicle activity detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in in-vehicle activity detector data.
+        /// </summary>
+        public event EventHandler<InVehicleActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            InVehicle = (DetectorState)sensorData.values[0];
+            ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+            DataUpdated?.Invoke(this, new InVehicleActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.InVehicleActivityDetector;
+        }
+    }
+}
index 3ad8baae34feea323f40f6c8fb63ae830d6ba850..d399f2c0f51992218cd15e6b8a4afe8f9752fcde 100644 (file)
@@ -92,7 +92,7 @@ namespace Tizen.System.Sensor
 
         internal override SensorType GetSensorType()
         {
-            return SensorType.HumanPedometer;
+            return SensorType.Pedometer;
         }
 
         /// <summary>
@@ -104,7 +104,7 @@ namespace Tizen.System.Sensor
         private static bool CheckIfSupported()
         {
             bool isSupported;
-            int error = Interop.SensorManager.SensorIsSupported(SensorType.HumanPedometer, out isSupported);
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.Pedometer, out isSupported);
             if (error != (int)SensorError.None)
             {
                 Log.Error(Globals.LogTag, "Error checking if pedometer sensor is supported");
@@ -117,7 +117,7 @@ namespace Tizen.System.Sensor
         {
             IntPtr list;
             int count;
-            int error = Interop.SensorManager.GetSensorList(SensorType.HumanPedometer, out list, out count);
+            int error = Interop.SensorManager.GetSensorList(SensorType.Pedometer, out list, out count);
             if (error != (int)SensorError.None)
             {
                 Log.Error(Globals.LogTag, "Error getting sensor list for pedometer");
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/PickUpGestureDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/PickUpGestureDetector.cs
new file mode 100644 (file)
index 0000000..90a3288
--- /dev/null
@@ -0,0 +1,121 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class PickUpGestureDetector : Sensor
+    {
+        /// <summary>
+        /// Gets the state of the pick up gesture.
+        /// </summary>
+        public DetectorState PickUp { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether pick up gesture detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the pick up gesture detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of pick up gesture detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of pick up gesture detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.PickUpGestureDetector"/> class.
+        /// </summary>
+        /// <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)
+        {
+            Log.Info(Globals.LogTag, "Creating pick up gesture detector object");
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.PickUpGestureDetector;
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.PickUpGestureDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if pick up gesture detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.PickUpGestureDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for pick up gesture detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in pick up gesture detector data.
+        /// </summary>
+        public event EventHandler<PickUpGestureDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void EventListenStart()
+        {
+            int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error setting event callback for pick up gesture detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for pick up gesture detector");
+            }
+        }
+
+        protected override void EventListenStop()
+        {
+            int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error unsetting event callback for pick up gesture detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for pick up gesture detector");
+            }
+        }
+
+        private void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            PickUp = (DetectorState) sensorData.values[0];
+
+            DataUpdated?.Invoke(this, new PickUpGestureDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/RunningActivityDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/RunningActivityDetector.cs
new file mode 100644 (file)
index 0000000..d604bc5
--- /dev/null
@@ -0,0 +1,102 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class RunningActivityDetector : ActivityDetector
+    {
+        /// <summary>
+        /// Gets the state of running activity detector
+        /// </summary>
+        public DetectorState Running { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether running activity detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the running activity detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of running activity detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of running activity detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.RunningActivityDetector"/> class.
+        /// </summary>
+        /// <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) : base(index)
+        {
+            Log.Info(Globals.LogTag, "Creating running activity detector object");
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.RunningActivityDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if running activity detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.RunningActivityDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for running activity detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in running activity detector data.
+        /// </summary>
+        public event EventHandler<RunningActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            Running = (DetectorState)sensorData.values[0];
+            ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+            DataUpdated?.Invoke(this, new RunningActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.RunningActivityDetector;
+        }
+    }
+}
index f7b6c690e50d1f8832ec84a8dca4fd2b637d29bd..cdb2d5c8815383d408fb8655b5793283aa22b666 100644 (file)
@@ -57,7 +57,7 @@ namespace Tizen.System.Sensor
 
         internal override SensorType GetSensorType()
         {
-            return SensorType.HumanSleepMonitor;
+            return SensorType.SleepMonitor;
         }
 
         /// <summary>
@@ -69,7 +69,7 @@ namespace Tizen.System.Sensor
         private static bool CheckIfSupported()
         {
             bool isSupported;
-            int error = Interop.SensorManager.SensorIsSupported(SensorType.HumanSleepMonitor, out isSupported);
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.SleepMonitor, out isSupported);
             if (error != (int)SensorError.None)
             {
                 Log.Error(Globals.LogTag, "Error checking if sleep monitor is supported");
@@ -82,7 +82,7 @@ namespace Tizen.System.Sensor
         {
             IntPtr list;
             int count;
-            int error = Interop.SensorManager.GetSensorList(SensorType.HumanSleepMonitor, out list, out count);
+            int error = Interop.SensorManager.GetSensorList(SensorType.SleepMonitor, out list, out count);
             if (error != (int)SensorError.None)
             {
                 Log.Error(Globals.LogTag, "Error getting sensor list for sleep");
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/StationaryActivityDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/StationaryActivityDetector.cs
new file mode 100644 (file)
index 0000000..5684b75
--- /dev/null
@@ -0,0 +1,102 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class StationaryActivityDetector : ActivityDetector
+    {
+        /// <summary>
+        /// Gets the state of stationary activity detector
+        /// </summary>
+        public DetectorState Stationary { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether stationary activity detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the stationary activity detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of stationary activity detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of stationary activity detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.stationaryActivityDetector"/> class.
+        /// </summary>
+        /// <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) : base(index)
+        {
+            Log.Info(Globals.LogTag, "Creating stationary activity detector object");
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.StationaryActivityDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if stationary activity detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.StationaryActivityDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for stationary activity detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in stationary activity detector data.
+        /// </summary>
+        public event EventHandler<StationaryActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            Stationary = (DetectorState)sensorData.values[0];
+            ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+            DataUpdated?.Invoke(this, new StationaryActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.StationaryActivityDetector;
+        }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/WalkingActivityDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/WalkingActivityDetector.cs
new file mode 100644 (file)
index 0000000..24693b1
--- /dev/null
@@ -0,0 +1,102 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class WalkingActivityDetector : ActivityDetector
+    {
+        /// <summary>
+        /// Gets the state of walking activity detector
+        /// </summary>
+        public DetectorState Walking { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether walking activity detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the walking activity detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of walking activity detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of walking activity detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.walkingActivityDetector"/> class.
+        /// </summary>
+        /// <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) : base(index)
+        {
+            Log.Info(Globals.LogTag, "Creating walking activity gesture detector object");
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.WalkingActivityDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if walking activity detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.WalkingActivityDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for walking activity detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in walking activity gesture detector data.
+        /// </summary>
+        public event EventHandler<WalkingActivityDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            Walking = (DetectorState)sensorData.values[0];
+            ActivityAccuracy = (SensorDataAccuracy) sensorData.accuracy;
+
+            DataUpdated?.Invoke(this, new WalkingActivityDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.WalkingActivityDetector;
+        }
+    }
+}
diff --git a/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/WristUpGestureDetector.cs b/Tizen.System.Sensor/Tizen.System.Sensor/Plugins/WristUpGestureDetector.cs
new file mode 100644 (file)
index 0000000..9c79955
--- /dev/null
@@ -0,0 +1,121 @@
+// Copyright 2016 by Samsung Electronics, Inc.,
+//
+// This software is the confidential and proprietary information
+// of Samsung Electronics, Inc. ("Confidential Information"). You
+// shall not disclose such Confidential Information and shall use
+// it only in accordance with the terms of the license agreement
+// you entered into with Samsung.
+
+using System;
+
+namespace Tizen.System.Sensor
+{
+    public class WristUpGestureDetector : Sensor
+    {
+        /// <summary>
+        /// Gets the state of the wrist up gesture.
+        /// </summary>
+        public DetectorState WristUp { get; private set; }
+
+        /// <summary>
+        /// Returns true or false based on whether wrist up gesture detector is supported by device.
+        /// </summary>
+        public static bool IsSupported
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Checking if the wrist up gesture detector is supported");
+                return CheckIfSupported();
+            }
+        }
+
+        /// <summary>
+        /// Returns the number of wrist up gesture detector available on the device.
+        /// </summary>
+        public static int Count
+        {
+            get
+            {
+                Log.Info(Globals.LogTag, "Getting the count of wrist up gesture detectors");
+                return GetCount();
+            }
+        }
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Tizen.System.Sensor.WristUpGestureDetector"/> class.
+        /// </summary>
+        /// <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)
+        {
+            Log.Info(Globals.LogTag, "Creating wrist up gesture detector object");
+        }
+
+        internal override SensorType GetSensorType()
+        {
+            return SensorType.WristUpGestureDetector;
+        }
+
+        private static bool CheckIfSupported()
+        {
+            bool isSupported;
+            int error = Interop.SensorManager.SensorIsSupported(SensorType.WristUpGestureDetector, out isSupported);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error checking if wrist up gesture detector is supported");
+                isSupported = false;
+            }
+            return isSupported;
+        }
+
+        private static int GetCount()
+        {
+            IntPtr list;
+            int count;
+            int error = Interop.SensorManager.GetSensorList(SensorType.WristUpGestureDetector, out list, out count);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error getting sensor list for wrist up gesture detector");
+                count = 0;
+            }
+            else
+                Interop.Libc.Free(list);
+            return count;
+        }
+
+        /// <summary>
+        /// Event Handler for storing the callback functions for event corresponding to change in wrist up gesture detector data.
+        /// </summary>
+        public event EventHandler<WristUpGestureDetectorDataUpdatedEventArgs> DataUpdated;
+
+        protected override void EventListenStart()
+        {
+            int error = Interop.SensorListener.SetEventCallback(ListenerHandle, Interval, SensorEventCallback, IntPtr.Zero);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error setting event callback for wrist up gesture detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to set event callback for wrist up gesture detector");
+            }
+        }
+
+        protected override void EventListenStop()
+        {
+            int error = Interop.SensorListener.UnsetEventCallback(ListenerHandle);
+            if (error != (int)SensorError.None)
+            {
+                Log.Error(Globals.LogTag, "Error unsetting event callback for wrist up gesture detector");
+                throw SensorErrorFactory.CheckAndThrowException(error, "Unable to unset event callback for wrist up gesture detector");
+            }
+        }
+
+        private void SensorEventCallback(IntPtr sensorHandle, IntPtr sensorPtr, IntPtr data)
+        {
+            Interop.SensorEventStruct sensorData = Interop.IntPtrToEventStruct(sensorPtr);
+            TimeSpan = new TimeSpan((Int64)sensorData.timestamp);
+            WristUp = (DetectorState) sensorData.values[0];
+
+            DataUpdated?.Invoke(this, new WristUpGestureDetectorDataUpdatedEventArgs(sensorData.values[0]));
+        }
+    }
+}
index c71115295013d9cbefc26f1e87262922d6f7a401..29e8fd740a88bab2cb4b7e42ee4d77d4758d2e75 100644 (file)
@@ -94,11 +94,39 @@ namespace Tizen.System.Sensor
         /// <summary>
         /// Pedometer sensor.
         /// </summary>
-        HumanPedometer = 0x300,
+        Pedometer = 0x300,
         /// <summary>
         /// Sleep monitor sensor.
         /// </summary>
-        HumanSleepMonitor = 22
+        SleepMonitor = 0x301,
+        /// <summary>
+        /// Walking activity detector.
+        /// </summary>
+        WalkingActivityDetector = 0x401,
+        /// <summary>
+        /// Running activity detector.
+        /// </summary>
+        RunningActivityDetector = 0x402,
+        /// <summary>
+        /// Stationary activity detector.
+        /// </summary>
+        StationaryActivityDetector = 0x408,
+        /// <summary>
+        /// InVehicle activity detector.
+        /// </summary>
+        InVehicleActivityDetector = 0x409,
+        /// <summary>
+        /// Wrist up gesture detector.
+        /// </summary>
+        WristUpGestureDetector = 0x1201,
+        /// <summary>
+        /// Pick up gesture detector.
+        /// </summary>
+        PickUpGestureDetector = 0x1204,
+        /// <summary>
+        /// Face down gesture detector.
+        /// </summary>
+        FaceDownGestureDetector = 0x1205
     }
 
     /// <summary>
@@ -206,8 +234,8 @@ namespace Tizen.System.Sensor
         /// <summary>
         /// The wake state.
         /// </summary>
-
         Wake,
+
         /// <summary>
         /// The sleeping state.
         /// </summary>
@@ -229,4 +257,20 @@ namespace Tizen.System.Sensor
         /// </summary>
         Far = 5
     }
+
+    /// <summary>
+    /// Detector sensor state.
+    /// </summary>
+    public enum DetectorState
+    {
+        /// <summary>
+        /// None sate.
+        /// </summary>
+        NotDetected = 0,
+
+        /// <summary>
+        /// Detected state.
+        /// </summary>
+        Detected = 1
+    }
 }