f55df8d5c79ca402aaa27b41a0b2a914d3fdf933
[platform/core/csapi/uix-voice-control.git] / Tizen.Uix.VoiceControl / Tizen.Uix.VoiceControl / ErrorOccuredEventArgs.cs
1 /*
2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 using System;
18 using static Interop.VoiceControl;
19
20 namespace Tizen.Uix.VoiceControl
21 {
22     /// <summary>
23     /// This class holds information related to the VoiceControl ErrorOccured Event
24     /// </summary>
25     public class ErrorOccuredEventArgs
26     {
27         internal ErrorOccuredEventArgs(ErrorCode error)
28         {
29             switch (error)
30             {
31                 case ErrorCode.None:
32                     {
33                         ErrorValue = Error.None;
34                         break;
35                     }
36
37                 case ErrorCode.OutOfMemory:
38                     {
39                         ErrorValue = Error.OutOfMemory;
40                         break;
41                     }
42
43                 case ErrorCode.IoError:
44                     {
45                         ErrorValue = Error.IoError;
46                         break;
47                     }
48
49                 case ErrorCode.InvalidParameter:
50                     {
51                         ErrorValue = Error.InvalidParameter;
52                         break;
53                     }
54
55                 case ErrorCode.TimedOut:
56                     {
57                         ErrorValue = Error.TimedOut;
58                         break;
59                     }
60
61                 case ErrorCode.RecorderBusy:
62                     {
63                         ErrorValue = Error.RecorderBusy;
64                         break;
65                     }
66
67                 case ErrorCode.PermissionDenied:
68                     {
69                         ErrorValue = Error.PermissionDenied;
70                         break;
71                     }
72
73                 case ErrorCode.NotSupported:
74                     {
75                         ErrorValue = Error.NotSupported;
76                         break;
77                     }
78
79                 case ErrorCode.InvalidState:
80                     {
81                         ErrorValue = Error.InvalidState;
82                         break;
83                     }
84
85                 case ErrorCode.InvalidLanguage:
86                     {
87                         ErrorValue = Error.InvalidLanguage;
88                         break;
89                     }
90
91                 case ErrorCode.EngineNotFound:
92                     {
93                         ErrorValue = Error.EngineNotFound;
94                         break;
95                     }
96
97                 case ErrorCode.OperationFailed:
98                     {
99                         ErrorValue = Error.OperationFailed;
100                         break;
101                     }
102
103                 case ErrorCode.OperationRejected:
104                     {
105                         ErrorValue = Error.OperationRejected;
106                         break;
107                     }
108
109                 case ErrorCode.IterationEnd:
110                     {
111                         ErrorValue = Error.IterationEnd;
112                         break;
113                     }
114
115                 case ErrorCode.Empty:
116                     {
117                         ErrorValue = Error.Empty;
118                         break;
119                     }
120
121                 case ErrorCode.InProgressToReady:
122                     {
123                         ErrorValue = Error.InProgressToReady;
124                         break;
125                     }
126
127                 case ErrorCode.InProgressToRecording:
128                     {
129                         ErrorValue = Error.InProgressToRecording;
130                         break;
131                     }
132
133                 case ErrorCode.InProgressToProcessing:
134                     {
135                         ErrorValue = Error.InProgressToProcessing;
136                         break;
137                     }
138
139                 case ErrorCode.ServiceReset:
140                     {
141                         ErrorValue = Error.ServiceReset;
142                         break;
143                     }
144             }
145         }
146
147         /// <summary>
148         /// The Error Value
149         /// </summary>
150         public Error ErrorValue
151         {
152             get;
153             internal set;
154         }
155     }
156 }