2 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
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.ComponentModel;
23 /// WebCookieManager is a class for cookie manager of web view.
25 [EditorBrowsable(EditorBrowsableState.Never)]
26 public class WebCookieManager : Disposable
29 /// Cookie Accept Policy
31 [EditorBrowsable(EditorBrowsableState.Never)]
32 public enum CookieAcceptPolicyType
37 [EditorBrowsable(EditorBrowsableState.Never)]
43 [EditorBrowsable(EditorBrowsableState.Never)]
49 [EditorBrowsable(EditorBrowsableState.Never)]
54 /// Cookie accept policy
56 [EditorBrowsable(EditorBrowsableState.Never)]
57 public CookieAcceptPolicyType CookieAcceptPolicy
61 return (CookieAcceptPolicyType)Interop.WebCookieManager.GetCookieAcceptPolicy(SwigCPtr);
65 Interop.WebCookieManager.SetCookieAcceptPolicy(SwigCPtr, (int)value);
70 /// Cookie persistent storage type.
72 [EditorBrowsable(EditorBrowsableState.Never)]
73 public enum CookiePersistentStorageType
76 /// @deprecated Cookies are stored in a text file.
78 [EditorBrowsable(EditorBrowsableState.Never)]
82 /// stored in a SQLite file
84 [EditorBrowsable(EditorBrowsableState.Never)]
89 /// Set the proxy uri.
91 [EditorBrowsable(EditorBrowsableState.Never)]
92 public void SetPersistentStorage(string path, CookiePersistentStorageType storageType)
94 Interop.WebCookieManager.SetPersistentStorage(SwigCPtr, path, (int)storageType);
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
99 /// Set Default Proxy Auth.
101 [EditorBrowsable(EditorBrowsableState.Never)]
102 public void ClearCookies()
104 Interop.WebCookieManager.ClearCookies(SwigCPtr);
105 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
108 internal WebCookieManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
112 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebCookieManager obj)
114 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
118 /// Dispose for IDisposable pattern
120 [EditorBrowsable(EditorBrowsableState.Never)]
121 protected override void Dispose(DisposeTypes type)
128 if (type == DisposeTypes.Explicit)
131 //Release your own managed resources here.
132 //You should release all of your own disposable objects here.