2 * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.Runtime.InteropServices;
20 namespace Tizen.WebView
23 /// Enumeration that provides an option to error codes.
25 public enum LoadErrorCode
36 /// Can't show page for this MIME Type
44 /// Cannot connect to network
48 /// Fail to look up host from DNS
52 /// Fail to SSL/TLS handshake
56 /// Received certificate is invalid
60 /// Connection timeout
64 /// Too many redirects
68 /// Too many requests during this load
76 /// Unsupported scheme
80 /// User authentication failed on server
84 /// Web server has internal server error
90 /// Argument from the LoadError SmartCallback.
92 public class SmartCallbackLoadErrorArgs : EventArgs
96 internal SmartCallbackLoadErrorArgs(IntPtr handle)
102 /// Failing URL for the error.
108 return Interop.ChromiumEwk.ewk_error_url_get(_handle);
115 public LoadErrorCode Code
119 return (LoadErrorCode)Interop.ChromiumEwk.ewk_error_code_get(_handle);
124 /// The description for the error.
126 public string Description
130 return Interop.ChromiumEwk.ewk_error_description_get(_handle);
135 /// Whether the error should be treated as a cancellation.
137 public bool Cancellation
141 return Interop.ChromiumEwk.ewk_error_cancellation_get(_handle);
145 internal static SmartCallbackLoadErrorArgs CreateFromSmartEvent(IntPtr data, IntPtr obj, IntPtr info)
147 return new SmartCallbackLoadErrorArgs(info);