Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / 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     /// <since_tizen> 3 </since_tizen>
26     public class ErrorOccuredEventArgs
27     {
28         internal ErrorOccuredEventArgs(ErrorCode error)
29         {
30             switch (error)
31             {
32                 case ErrorCode.None:
33                     {
34                         ErrorValue = Error.None;
35                         break;
36                     }
37
38                 case ErrorCode.OutOfMemory:
39                     {
40                         ErrorValue = Error.OutOfMemory;
41                         break;
42                     }
43
44                 case ErrorCode.IoError:
45                     {
46                         ErrorValue = Error.IoError;
47                         break;
48                     }
49
50                 case ErrorCode.InvalidParameter:
51                     {
52                         ErrorValue = Error.InvalidParameter;
53                         break;
54                     }
55
56                 case ErrorCode.TimedOut:
57                     {
58                         ErrorValue = Error.TimedOut;
59                         break;
60                     }
61
62                 case ErrorCode.RecorderBusy:
63                     {
64                         ErrorValue = Error.RecorderBusy;
65                         break;
66                     }
67
68                 case ErrorCode.PermissionDenied:
69                     {
70                         ErrorValue = Error.PermissionDenied;
71                         break;
72                     }
73
74                 case ErrorCode.NotSupported:
75                     {
76                         ErrorValue = Error.NotSupported;
77                         break;
78                     }
79
80                 case ErrorCode.InvalidState:
81                     {
82                         ErrorValue = Error.InvalidState;
83                         break;
84                     }
85
86                 case ErrorCode.InvalidLanguage:
87                     {
88                         ErrorValue = Error.InvalidLanguage;
89                         break;
90                     }
91
92                 case ErrorCode.EngineNotFound:
93                     {
94                         ErrorValue = Error.EngineNotFound;
95                         break;
96                     }
97
98                 case ErrorCode.OperationFailed:
99                     {
100                         ErrorValue = Error.OperationFailed;
101                         break;
102                     }
103
104                 case ErrorCode.OperationRejected:
105                     {
106                         ErrorValue = Error.OperationRejected;
107                         break;
108                     }
109
110                 case ErrorCode.IterationEnd:
111                     {
112                         ErrorValue = Error.IterationEnd;
113                         break;
114                     }
115
116                 case ErrorCode.Empty:
117                     {
118                         ErrorValue = Error.Empty;
119                         break;
120                     }
121
122                 case ErrorCode.InProgressToReady:
123                     {
124                         ErrorValue = Error.InProgressToReady;
125                         break;
126                     }
127
128                 case ErrorCode.InProgressToRecording:
129                     {
130                         ErrorValue = Error.InProgressToRecording;
131                         break;
132                     }
133
134                 case ErrorCode.InProgressToProcessing:
135                     {
136                         ErrorValue = Error.InProgressToProcessing;
137                         break;
138                     }
139
140                 case ErrorCode.ServiceReset:
141                     {
142                         ErrorValue = Error.ServiceReset;
143                         break;
144                     }
145             }
146         }
147
148         /// <summary>
149         /// The Error Value
150         /// </summary>
151         /// <since_tizen> 3 </since_tizen>
152         public Error ErrorValue
153         {
154             get;
155             internal set;
156         }
157     }
158 }