Fix errata
authorsooyeon.kim <sooyeon.kim@samsung.com>
Mon, 10 Jul 2017 09:35:35 +0000 (18:35 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 12 Jul 2017 07:26:47 +0000 (16:26 +0900)
Change-Id: If93f5279dec1feebfb50c09f4e3963e7908e5115
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
src/Tizen.Uix.Stt/Tizen.Uix.Stt.csproj
src/Tizen.Uix.Stt/Tizen.Uix.Stt/EngineChangedEventArgs.cs
src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccuredEventArgs.cs [deleted file]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccurredEventArgs.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/ExceptionFactory.cs
src/Tizen.Uix.Stt/Tizen.Uix.Stt/SttClient.cs

index ae98eb8f8be6b875567c66e906d55159315c4b9a..8ce6d507f8f225f58df418f0d315afed53fed32f 100644 (file)
@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <Version>1.0.2</Version>
+    <Version>1.0.3</Version>
     <Authors>Samsung Electronics</Authors>
     <Copyright>© Samsung Electronics Co., Ltd All Rights Reserved</Copyright>
     <Description>STT Uix API for Tizen .NET</Description>
index 3694bbd915b7bf42132ba915a46955847a058b92..c6b5eee2455b19358f5708dfe1cb46d1b89b01dd 100755 (executable)
@@ -42,7 +42,7 @@ namespace Tizen.Uix.Stt
         }
 
         /// <summary>
-        /// Default Lanaguage
+        /// Default Language
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public string Language
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccuredEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccuredEventArgs.cs
deleted file mode 100755 (executable)
index c860cdd..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
-* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
-*
-* Licensed under the Apache License, Version 2.0 (the License);
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an AS IS BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-
-using System;
-using static Interop.Stt;
-
-namespace Tizen.Uix.Stt
-{
-    /// <summary>
-    /// This class holds information related to the STT ErrorOccured Event
-    /// </summary>
-    /// <since_tizen> 3 </since_tizen>
-    public class ErrorOccuredEventArgs
-    {
-        private IntPtr _handle;
-
-        internal ErrorOccuredEventArgs(IntPtr handle, Interop.Stt.SttError error)
-        {
-            this._handle = handle;
-            switch (error)
-            {
-                case Interop.Stt.SttError.None:
-                    {
-                        ErrorValue = Error.None;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.OutOfMemory:
-                    {
-                        ErrorValue = Error.OutOfMemory;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.IoError:
-                    {
-                        ErrorValue = Error.IoError;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.InvalidParameter:
-                    {
-                        ErrorValue = Error.InvalidParameter;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.TimedOut:
-                    {
-                        ErrorValue = Error.TimedOut;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.RecorderBusy:
-                    {
-                        ErrorValue = Error.RecorderBusy;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.OutOfNetwork:
-                    {
-                        ErrorValue = Error.OutOfNetwork;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.PermissionDenied:
-                    {
-                        ErrorValue = Error.PermissionDenied;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.NotSupported:
-                    {
-                        ErrorValue = Error.NotSupported;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.InvalidState:
-                    {
-                        ErrorValue = Error.InvalidState;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.InvalidLanguage:
-                    {
-                        ErrorValue = Error.InvalidLanguage;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.EngineNotFound:
-                    {
-                        ErrorValue = Error.EngineNotFound;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.OperationFailed:
-                    {
-                        ErrorValue = Error.OperationFailed;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.NotSupportedFeature:
-                    {
-                        ErrorValue = Error.NotSupportedFeature;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.RecordingTimedOut:
-                    {
-                        ErrorValue = Error.RecordingTimedOut;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.NoSpeech:
-                    {
-                        ErrorValue = Error.NoSpeech;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.InProgressToReady:
-                    {
-                        ErrorValue = Error.InProgressToReady;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.InProgressToRecording:
-                    {
-                        ErrorValue = Error.InProgressToRecording;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.InProgressToProcessing:
-                    {
-                        ErrorValue = Error.InProgressToProcessing;
-                        break;
-                    }
-
-                case Interop.Stt.SttError.ServiceReset:
-                    {
-                        ErrorValue = Error.ServiceReset;
-                        break;
-                    }
-
-            }
-        }
-
-        /// <summary>
-        /// The Error Value
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        public Error ErrorValue
-        {
-            get;
-            internal set;
-        }
-
-        /// <summary>
-        /// Gets the current error message.
-        /// </summary>
-        /// <since_tizen> 3 </since_tizen>
-        /// <returns>
-        /// string error message
-        /// </returns>
-        public string ErrorMessage
-        {
-            get
-            {
-                string errorMesage = "";
-                SttError error = SttGetErrorMessage(_handle, out errorMesage);
-                if (error != SttError.None)
-                {
-                    Log.Error(LogTag, "GetErrorMessage Failed with error " + error);
-                    return "";
-                }
-
-                return errorMesage;
-            }
-
-        }
-    }
-}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccurredEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccurredEventArgs.cs
new file mode 100755 (executable)
index 0000000..f479c2e
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using System;
+using static Interop.Stt;
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This class holds information related to the STT ErrorOccurred Event
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class ErrorOccurredEventArgs
+    {
+        private IntPtr _handle;
+
+        internal ErrorOccurredEventArgs(IntPtr handle, Interop.Stt.SttError error)
+        {
+            this._handle = handle;
+            switch (error)
+            {
+                case Interop.Stt.SttError.None:
+                    {
+                        ErrorValue = Error.None;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.OutOfMemory:
+                    {
+                        ErrorValue = Error.OutOfMemory;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.IoError:
+                    {
+                        ErrorValue = Error.IoError;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InvalidParameter:
+                    {
+                        ErrorValue = Error.InvalidParameter;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.TimedOut:
+                    {
+                        ErrorValue = Error.TimedOut;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.RecorderBusy:
+                    {
+                        ErrorValue = Error.RecorderBusy;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.OutOfNetwork:
+                    {
+                        ErrorValue = Error.OutOfNetwork;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.PermissionDenied:
+                    {
+                        ErrorValue = Error.PermissionDenied;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.NotSupported:
+                    {
+                        ErrorValue = Error.NotSupported;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InvalidState:
+                    {
+                        ErrorValue = Error.InvalidState;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InvalidLanguage:
+                    {
+                        ErrorValue = Error.InvalidLanguage;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.EngineNotFound:
+                    {
+                        ErrorValue = Error.EngineNotFound;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.OperationFailed:
+                    {
+                        ErrorValue = Error.OperationFailed;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.NotSupportedFeature:
+                    {
+                        ErrorValue = Error.NotSupportedFeature;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.RecordingTimedOut:
+                    {
+                        ErrorValue = Error.RecordingTimedOut;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.NoSpeech:
+                    {
+                        ErrorValue = Error.NoSpeech;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InProgressToReady:
+                    {
+                        ErrorValue = Error.InProgressToReady;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InProgressToRecording:
+                    {
+                        ErrorValue = Error.InProgressToRecording;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InProgressToProcessing:
+                    {
+                        ErrorValue = Error.InProgressToProcessing;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.ServiceReset:
+                    {
+                        ErrorValue = Error.ServiceReset;
+                        break;
+                    }
+
+            }
+        }
+
+        /// <summary>
+        /// The Error Value
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public Error ErrorValue
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// Gets the current error message.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <returns>
+        /// string error message
+        /// </returns>
+        public string ErrorMessage
+        {
+            get
+            {
+                string errorMesage = "";
+                SttError error = SttGetErrorMessage(_handle, out errorMesage);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "GetErrorMessage Failed with error " + error);
+                    return "";
+                }
+
+                return errorMesage;
+            }
+
+        }
+    }
+}
index 5b59574a6e9941a1f589c1d1c5b81b17b99d8b24..6636ec35eceba1326654d39a6725d6425108b63b 100755 (executable)
@@ -36,7 +36,7 @@ namespace Tizen.Uix.Stt
 
                 case SttError.IoError:
                     {
-                        exp = new InvalidOperationException("I/O Error Occured");
+                        exp = new InvalidOperationException("I/O Error Occurred");
                         break;
                     }
 
index 4e52840628230552d7aae4703a98b96e4055af63..c08f3903c5c52e2bfb87bc8d6a0c2179ea60d5b8 100644 (file)
@@ -323,7 +323,7 @@ namespace Tizen.Uix.Stt
         private Object thisLock = new Object();
         private event EventHandler<RecognitionResultEventArgs> _recognitionResult;
         private event EventHandler<StateChangedEventArgs> _stateChanged;
-        private event EventHandler<ErrorOccuredEventArgs> _errorOccured;
+        private event EventHandler<ErrorOccurredEventArgs> _errorOccurred;
         private event EventHandler<DefaultLanguageChangedEventArgs> _defaultLanguageChanged;
         private event EventHandler<EngineChangedEventArgs> _engineChanged;
         private bool disposedValue = false;
@@ -462,7 +462,7 @@ namespace Tizen.Uix.Stt
         /// Event to be invoked when an error occurs.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public event EventHandler<ErrorOccuredEventArgs> ErrorOccured
+        public event EventHandler<ErrorOccurredEventArgs> ErrorOccurred
         {
             add
             {
@@ -470,18 +470,18 @@ namespace Tizen.Uix.Stt
                 {
                     _errorDelegate = (IntPtr handle, SttError reason, IntPtr userData) =>
                 {
-                    ErrorOccuredEventArgs args = new ErrorOccuredEventArgs(handle, reason);
-                    _errorOccured?.Invoke(this, args);
+                    ErrorOccurredEventArgs args = new ErrorOccurredEventArgs(handle, reason);
+                    _errorOccurred?.Invoke(this, args);
                 };
                     SttError error = SttSetErrorCB(_handle, _errorDelegate, IntPtr.Zero);
                     if (error != SttError.None)
                     {
-                        Log.Error(LogTag, "Add ErrorOccured Failed with error " + error);
+                        Log.Error(LogTag, "Add ErrorOccurred Failed with error " + error);
                     }
 
                     else
                     {
-                        _errorOccured += value;
+                        _errorOccurred += value;
                     }
                 }
 
@@ -494,16 +494,16 @@ namespace Tizen.Uix.Stt
                     SttError error = SttUnsetErrorCB(_handle);
                     if (error != SttError.None)
                     {
-                        Log.Error(LogTag, "Remove ErrorOccured Failed with error " + error);
+                        Log.Error(LogTag, "Remove ErrorOccurred Failed with error " + error);
                     }
 
-                    _errorOccured -= value;
+                    _errorOccurred -= value;
                 }
             }
         }
 
         /// <summary>
-        /// Event to be invoked when default laungage change.
+        /// Event to be invoked when default language change.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         public event EventHandler<DefaultLanguageChangedEventArgs> DefaultLanguageChanged
@@ -606,7 +606,7 @@ namespace Tizen.Uix.Stt
         /// http://tizen.org/privilege/recorder
         /// </privilege>
         /// <returns>
-        /// Default Lanaguage string value.
+        /// Default Language string value.
         /// </returns>
         public string DefaultLanguage
         {
@@ -618,7 +618,7 @@ namespace Tizen.Uix.Stt
                     SttError error = SttGetDefaultLanguage(_handle, out language);
                     if (error != SttError.None)
                     {
-                        Log.Error(LogTag, "DefaultLanaguage Failed with error " + error);
+                        Log.Error(LogTag, "DefaultLanguage Failed with error " + error);
                         return "";
                     }
                 }
@@ -705,7 +705,7 @@ namespace Tizen.Uix.Stt
         /// http://tizen.org/privilege/recorder
         /// </privilege>
         /// <exception cref="InvalidOperationException">
-        /// This Exception can occur while setting due to the following reaons
+        /// This Exception can occur while setting due to the following reasons
         /// 1. Operation Failed
         /// 2. Invalid State
         /// </exception>
@@ -765,7 +765,7 @@ namespace Tizen.Uix.Stt
         /// <remarks>
         /// This function should only be called in RecognitionResult Event
         /// </remarks>
-        /// <exception cref="InvalidOperationException"> This Exception can be due to Opearation Failed. </exception>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
         /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
         /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
         public IEnumerable<ResultTime> GetDetailedResult()
@@ -868,7 +868,7 @@ namespace Tizen.Uix.Stt
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <returns>
-        /// IEnumerable<SupportedEngine> list of supported engines
+        /// IEnumerable&lt;SupportedEngine&gt; list of supported engines
         /// </returns>
         /// <privilege>
         /// http://tizen.org/privilege/recorder
@@ -920,7 +920,7 @@ namespace Tizen.Uix.Stt
         /// http://tizen.org/feature/microphone
         /// </feature>
         /// <exception cref="InvalidOperationException">
-        /// This Exception can be due to the following reaons
+        /// This Exception can be due to the following reasons
         /// 1. Operation Failed
         /// 2. Invalid State
         /// </exception>
@@ -963,7 +963,7 @@ namespace Tizen.Uix.Stt
         /// </pre>
         /// <post>
         /// If this function is successful, the STT state will be Ready
-        /// If this function is unsuccessful, ErrorOccured event will be invoked
+        /// If this function is unsuccessful, ErrorOccurred event will be invoked
         /// </post>
         public void Prepare()
         {
@@ -1034,7 +1034,7 @@ namespace Tizen.Uix.Stt
         /// </exception>
         /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
         /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
-        public IEnumerable<string> GetSupportedLangauages()
+        public IEnumerable<string> GetSupportedLanguages()
         {
             List<string> languageList = new List<string>();
             lock (thisLock)
@@ -1049,7 +1049,7 @@ namespace Tizen.Uix.Stt
                 SttError error = SttForeachSupportedLanguages(_handle, supportedLanguageDelegate, IntPtr.Zero);
                 if (error != SttError.None)
                 {
-                    Log.Error(LogTag, "GetSupportedLangauages Failed with error " + error);
+                    Log.Error(LogTag, "GetSupportedLanguages Failed with error " + error);
                     throw ExceptionFactory.CreateException(error);
                 }
             }
@@ -1352,7 +1352,7 @@ namespace Tizen.Uix.Stt
         /// The state should be Ready.
         /// </pre>
         /// <post>
-        /// It will invoke StateChanged Event if registerd.
+        /// It will invoke StateChanged Event if registered.
         /// If this function succeeds, the STT state will be Recording.
         /// If you call this function again before state changes, you will receive ErrorINProgressToRecording.
         /// </post>
@@ -1429,7 +1429,7 @@ namespace Tizen.Uix.Stt
         /// The state should be Recording.
         /// </pre>
         /// <post>
-        /// It will invoke StateChanged Event if registerd.
+        /// It will invoke StateChanged Event if registered.
         /// If this function succeeds, the STT state will be Processing.
         /// If you call this function again before state changes, you will receive ErrorINProgressToProcessing.
         /// After processing of engine, RecognitionResult event is invoked
@@ -1450,7 +1450,7 @@ namespace Tizen.Uix.Stt
         /// <summary>
         /// Cancels processing recognition and recording asynchronously.
         /// This function cancels recording and engine cancels recognition processing.
-        /// After successful cancel, StateChanged event is invoked otherwise if error is occurred, ErrorOccured event is invoked.
+        /// After successful cancel, StateChanged event is invoked otherwise if error is occurred, ErrorOccurred event is invoked.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <privilege>
@@ -1474,7 +1474,7 @@ namespace Tizen.Uix.Stt
         /// The state should be Recording or Processing.
         /// </pre>
         /// <post>
-        /// It will invoke StateChanged Event if registerd.
+        /// It will invoke StateChanged Event if registered.
         /// If this function succeeds, the STT state will be Ready.
         /// If you call this function again before state changes, you will receive ErrorINProgressToReady.
         /// </post>