[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_SetDefaultProxyAuth")]
public static extern void SetDefaultProxyAuth(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, string jarg3);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteAllWebDatabase")]
+ public static extern void DeleteAllWebDatabase(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetWebDatabaseOrigins")]
+ public static extern bool GetWebDatabaseOrigins(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteWebDatabase")]
- public static extern void DeleteWebDatabase(global::System.Runtime.InteropServices.HandleRef jarg1);
+ public static extern bool DeleteWebDatabase(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetWebStorageOrigins")]
+ public static extern bool GetWebStorageOrigins(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetWebStorageUsageForOrigin")]
+ public static extern bool GetWebStorageUsageForOrigin(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteWebStorage")]
- public static extern void DeleteWebStorage(global::System.Runtime.InteropServices.HandleRef jarg1);
+ public static extern void DeleteAllWebStorage(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteWebStorageOrigin")]
+ public static extern bool DeleteWebStorageOrigin(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteLocalFileSystem")]
public static extern void DeleteLocalFileSystem(global::System.Runtime.InteropServices.HandleRef jarg1);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_ClearCache")]
public static extern void ClearCache(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_DeleteApplicationCache")]
+ public static extern bool DeleteApplicationCache(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_GetFormPasswordList")]
+ public static extern void GetFormPasswordList(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_RegisterDownloadStartedCallback")]
+ public static extern void RegisterDownloadStartedCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebContext_RegisterMimeOverriddenCallback")]
+ public static extern void RegisterMimeOverriddenCallback(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
}
}
}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebPasswordData
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordData_GetUrl")]
+ public static extern string GetUrl(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordData_GetUseFingerprint")]
+ public static extern bool GetUseFingerprint(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+
+ internal static partial class WebPasswordDataList
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebPasswordDataList")]
+ public static extern void DeleteWebPasswordDataList(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordDataList_GetItemCount")]
+ public static extern uint GetItemCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebPasswordDataList_ValueOfIndex")]
+ public static extern System.IntPtr ValueOfIndex(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+ }
+ }
+}
+
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ internal static partial class Interop
+ {
+ internal static partial class WebSecurityOrigin
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOrigin_GetHost")]
+ public static extern string GetHost(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOrigin_GetProtocol")]
+ public static extern string GetProtocol(global::System.Runtime.InteropServices.HandleRef jarg1);
+ }
+
+ internal static partial class WebSecurityOriginList
+ {
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_WebSecurityOriginList")]
+ public static extern void DeleteWebSecurityOriginList(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOriginList_GetItemCount")]
+ public static extern uint GetItemCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_WebSecurityOriginList_ValueOfIndex")]
+ public static extern System.IntPtr ValueOfIndex(global::System.Runtime.InteropServices.HandleRef jarg1, uint jarg2);
+ }
+ }
+}
+
using System;
using System.ComponentModel;
+using System.Runtime.InteropServices;
namespace Tizen.NUI
{
private string proxyUri;
private string certificateFilePath;
private bool disableCache;
+ private SecurityOriginListAcquiredCallback securityOriginListAcquiredCallback;
+ private readonly WebContextSecurityOriginListAcquiredProxyCallback securityOriginListAcquiredProxyCallback;
+ private PasswordDataListAcquiredCallback passwordDataListAcquiredCallback;
+ private readonly WebContextPasswordDataListAcquiredProxyCallback passwordDataListAcquiredProxyCallback;
internal WebContext(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
+ securityOriginListAcquiredProxyCallback = OnSecurityOriginListAcquired;
+ passwordDataListAcquiredProxyCallback = OnPasswordDataListAcquired;
}
/// <summary>
+ /// The callback function that is invoked when security origin list is acquired.
+ /// </summary>
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public delegate void SecurityOriginListAcquiredCallback(WebSecurityOriginList list);
+
+ /// <summary>
+ /// The callback function that is invoked when storage usage is acquired.
+ /// </summary>
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public delegate void StorageUsageAcquiredCallback(ulong usage);
+
+ /// <summary>
+ /// The callback function that is invoked when security origin list is acquired.
+ /// </summary>
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public delegate void PasswordDataListAcquiredCallback(WebPasswordDataList list);
+
+ /// <summary>
+ /// The callback function that is invoked when download is started.
+ /// </summary>
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public delegate void DownloadStartedCallback(string url);
+
+ /// <summary>
+ /// The callback function that is invoked when current mime type need be overridden.
+ /// </summary>
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public delegate bool MimeOverriddenCallback(string url, string currentMime, string newMime);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void WebContextSecurityOriginListAcquiredProxyCallback(IntPtr list);
+
+ [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+ private delegate void WebContextPasswordDataListAcquiredProxyCallback(IntPtr list);
+
+ /// <summary>
/// Cache model
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
}
/// <summary>
- /// Delete Web Database.
+ /// Delete all web database.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void DeleteAllWebDatabase()
+ {
+ Interop.WebContext.DeleteAllWebDatabase(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets security origins of web database asynchronously.
+ /// <param name="callback">callback for acquiring security origins</param>
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public void DeleteWebDatabase()
+ public bool GetWebDatabaseOrigins(SecurityOriginListAcquiredCallback callback)
{
- Interop.WebContext.DeleteWebDatabase(SwigCPtr);
+ securityOriginListAcquiredCallback = callback;
+ IntPtr ip = Marshal.GetFunctionPointerForDelegate(securityOriginListAcquiredProxyCallback);
+ bool result = Interop.WebContext.GetWebDatabaseOrigins(SwigCPtr, new HandleRef(this, ip));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
}
/// <summary>
- /// Delete Web Storage.
+ /// Deletes web databases by origin.
+ /// <param name="origin">security origin of web database</param>
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public void DeleteWebStorage()
+ public bool DeleteWebDatabase(WebSecurityOrigin origin)
{
- Interop.WebContext.DeleteWebStorage(SwigCPtr);
+ bool result = Interop.WebContext.DeleteWebDatabase(SwigCPtr, WebSecurityOrigin.getCPtr(origin));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
}
/// <summary>
- /// Delete Local FileSystem.
+ /// Gets a list of security origins of web storage asynchronously.
+ /// <param name="callback">callback for acquiring security origins</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool GetWebStorageOrigins(SecurityOriginListAcquiredCallback callback)
+ {
+ securityOriginListAcquiredCallback = callback;
+ IntPtr ip = Marshal.GetFunctionPointerForDelegate(securityOriginListAcquiredProxyCallback);
+ bool result = Interop.WebContext.GetWebStorageOrigins(SwigCPtr, new HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Gets a list of security origins of web storage asynchronously.
+ /// <param name="origin">security origin of web storage</param>
+ /// <param name="callback">callback for acquiring storage usage</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool GetWebStorageUsageForOrigin(WebSecurityOrigin origin, StorageUsageAcquiredCallback callback)
+ {
+ IntPtr ip = Marshal.GetFunctionPointerForDelegate(callback);
+ bool result = Interop.WebContext.GetWebStorageUsageForOrigin(SwigCPtr, WebSecurityOrigin.getCPtr(origin), new HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Delete all web storage.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void DeleteAllWebStorage()
+ {
+ Interop.WebContext.DeleteAllWebStorage(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Deletes web storage by origin.
+ /// <param name="origin">security origin of web storage</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool DeleteWebStorage(WebSecurityOrigin origin)
+ {
+ bool result = Interop.WebContext.DeleteWebStorageOrigin(SwigCPtr, WebSecurityOrigin.getCPtr(origin));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Delete local fileSystem.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public void DeleteLocalFileSystem()
Interop.WebContext.ClearCache(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+
+ /// <summary>
+ /// Deletes web application cache by origin.
+ /// <param name="origin">security origin of web application</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool DeleteApplicationCache(WebSecurityOrigin origin)
+ {
+ bool result = Interop.WebContext.DeleteApplicationCache(SwigCPtr, WebSecurityOrigin.getCPtr(origin));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return result;
+ }
+
+ /// <summary>
+ /// Gets a list of all password data asynchronously.
+ /// <param name="callback">callback for acquiring password data list</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void GetFormPasswordList(PasswordDataListAcquiredCallback callback)
+ {
+ passwordDataListAcquiredCallback = callback;
+ IntPtr ip = Marshal.GetFunctionPointerForDelegate(passwordDataListAcquiredProxyCallback);
+ Interop.WebContext.GetFormPasswordList(SwigCPtr, new HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Registers callback for download started.
+ /// <param name="callback">callback for download started</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RegisterDownloadStartedCallback(DownloadStartedCallback callback)
+ {
+ IntPtr ip = Marshal.GetFunctionPointerForDelegate(callback);
+ Interop.WebContext.RegisterDownloadStartedCallback(SwigCPtr, new HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Registers callback for overriding mime type.
+ /// <param name="callback">callback for overriding mime type</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RegisterMimeOverriddenCallback(MimeOverriddenCallback callback)
+ {
+ IntPtr ip = Marshal.GetFunctionPointerForDelegate(callback);
+ Interop.WebContext.RegisterMimeOverriddenCallback(SwigCPtr, new HandleRef(this, ip));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ private void OnSecurityOriginListAcquired(IntPtr list)
+ {
+ WebSecurityOriginList originList = new WebSecurityOriginList(list, true);
+ securityOriginListAcquiredCallback?.Invoke(originList);
+ originList.Dispose();
+ }
+
+ private void OnPasswordDataListAcquired(IntPtr list)
+ {
+ WebPasswordDataList passwordList = new WebPasswordDataList(list, true);
+ passwordDataListAcquiredCallback?.Invoke(passwordList);
+ passwordList.Dispose();
+ }
}
}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * 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 System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for password data of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebPasswordData : Disposable
+ {
+ internal WebPasswordData(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// Url which password is related to.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Url
+ {
+ get
+ {
+ string result = Interop.WebPasswordData.GetUrl(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
+ return result;
+ }
+ }
+
+ /// <summary>
+ /// Whether fingerprint is used or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool UseFingerprint
+ {
+ get
+ {
+ bool result = Interop.WebPasswordData.GetUseFingerprint(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return false;
+ return result;
+ }
+ }
+ }
+
+ /// <summary>
+ /// It is a class for password data list of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebPasswordDataList : Disposable
+ {
+ internal WebPasswordDataList(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// This will not be public opened.
+ /// <param name="swigCPtr"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebPasswordDataList.DeleteWebPasswordDataList(swigCPtr);
+ }
+
+ /// <summary>
+ /// Count of password data list.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint ItemCount
+ {
+ get
+ {
+ uint result = Interop.WebPasswordDataList.GetItemCount(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return 0;
+ return result;
+ }
+ }
+
+ /// <summary>
+ /// Gets password data by index.
+ /// <param name="index">index of list</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebPasswordData GetItemAtIndex(uint index)
+ {
+ System.IntPtr dataIntPtr = Interop.WebPasswordDataList.ValueOfIndex(SwigCPtr, index);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
+ return new WebPasswordData(dataIntPtr, false);
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * 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 System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// It is a class for security origin of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebSecurityOrigin : Disposable
+ {
+ internal WebSecurityOrigin(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// Host of security origin.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Host
+ {
+ get
+ {
+ string result = Interop.WebSecurityOrigin.GetHost(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
+ return result;
+ }
+ }
+
+ /// <summary>
+ /// Protocol of security origin.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string Protocol
+ {
+ get
+ {
+ string result = Interop.WebSecurityOrigin.GetProtocol(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
+ return result;
+ }
+ }
+
+ internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebSecurityOrigin obj)
+ {
+ return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
+ }
+ }
+
+ /// <summary>
+ /// It is a class for security origin list of web view.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class WebSecurityOriginList : Disposable
+ {
+ internal WebSecurityOriginList(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// This will not be public opened.
+ /// <param name="swigCPtr"></param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.WebSecurityOriginList.DeleteWebSecurityOriginList(swigCPtr);
+ }
+
+ /// <summary>
+ /// Count of security origin list.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint ItemCount
+ {
+ get
+ {
+ uint result = Interop.WebSecurityOriginList.GetItemCount(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return 0;
+ return result;
+ }
+ }
+
+ /// <summary>
+ /// Gets security origin by index.
+ /// <param name="index">index of list</param>
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public WebSecurityOrigin GetItemAtIndex(uint index)
+ {
+ System.IntPtr dataIntPtr = Interop.WebSecurityOriginList.ValueOfIndex(SwigCPtr, index);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) return null;
+ return new WebSecurityOrigin(dataIntPtr, false);
+ }
+ }
+}