[NUI] Fix Svace issue (#949)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / WebViewPageLoadErrorEventArgs.cs
1 /*
2  * Copyright (c) 2019 Samsung Electronics Co., Ltd.
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
18 using System;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     /// <summary>
24     /// Event arguments that passed via the WebView.PageLoadError.
25     /// </summary>
26     [EditorBrowsable(EditorBrowsableState.Never)]
27     public class WebViewPageLoadErrorEventArgs : EventArgs
28     {
29         /// <summary>
30         /// Enumeration for the load error code
31         /// </summary>
32         [EditorBrowsable(EditorBrowsableState.Never)]
33         public enum LoadErrorCode
34         {
35             /// <summary>
36             /// Unknown.
37             /// </summary>
38             Unknown,
39             /// <summary>
40             /// User canceled.
41             /// </summary>
42             Canceled,
43             /// <summary>
44             /// Can't show the page for this MIME type.
45             /// </summary>
46             CantSupportMimetype,
47             /// <summary>
48             /// File IO error.
49             /// </summary>
50             FailedFileIo,
51             /// <summary>
52             /// Cannot connect to the network.
53             /// </summary>
54             CantConnect,
55             /// <summary>
56             /// Fail to look up host from the DNS.
57             /// </summary>
58             CantLookupHost,
59             /// <summary>
60             /// Fail to SSL/TLS handshake.
61             /// </summary>
62             FailedTlsHandshake,
63             /// <summary>
64             /// Received certificate is invalid.
65             /// </summary>
66             InvalidCertificate,
67             /// <summary>
68             /// Connection timeout.
69             /// </summary>
70             RequestTimeout,
71             /// <summary>
72             /// Too many redirects.
73             /// </summary>
74             TooManyRedirects,
75             /// <summary>
76             /// Too many requests during this load.
77             /// </summary>
78             TooManyRequests,
79             /// <summary>
80             /// Malformed URL.
81             /// </summary>
82             BadUrl,
83             /// <summary>
84             /// Unsupported scheme.
85             /// </summary>
86             UnsupportedScheme,
87             /// <summary>
88             /// User authentication failed on the server.
89             /// </summary>
90             Authentication,
91             /// <summary>
92             /// Web server has an internal server error.
93             /// </summary>
94             InternalServer,
95         }
96
97         private WebView _webView;
98         /// <summary>
99         /// The view for displaying webpages.
100         /// </summary>
101         [EditorBrowsable(EditorBrowsableState.Never)]
102         public WebView WebView
103         {
104             get
105             {
106                 return _webView;
107             }
108             set
109             {
110                 _webView = value;
111             }
112         }
113
114         private string _pageUrl;
115         /// <summary>
116         /// The url string of current webpage.
117         /// </summary>
118         [EditorBrowsable(EditorBrowsableState.Never)]
119         public string PageUrl
120         {
121             get
122             {
123                 return _pageUrl;
124             }
125             set
126             {
127                 _pageUrl = value;
128             }
129         }
130
131         private LoadErrorCode _errorCode;
132         /// <summary>
133         /// The code for the current error.
134         /// </summary>
135         [EditorBrowsable(EditorBrowsableState.Never)]
136         public LoadErrorCode ErrorCode
137         {
138             get
139             {
140                 return _errorCode;
141             }
142             set
143             {
144                 _errorCode = value;
145             }
146         }
147     }
148 }