2 * Copyright(c) 2019 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.Runtime.InteropServices;
19 using System.ComponentModel;
23 internal class AuthenticationSignalType : global::System.IDisposable
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
30 [EditorBrowsable(EditorBrowsableState.Never)]
31 protected bool swigCMemOwn;
33 internal AuthenticationSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
35 swigCMemOwn = cMemoryOwn;
36 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
39 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AuthenticationSignalType obj)
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
44 //A Flag to check who called Dispose(). (By User or DisposeQueue)
45 private bool isDisposeQueued = false;
47 /// A Flat to check if it is already disposed.
49 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
50 [EditorBrowsable(EditorBrowsableState.Never)]
51 protected bool disposed = false;
56 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
57 [EditorBrowsable(EditorBrowsableState.Never)]
58 ~AuthenticationSignalType()
62 isDisposeQueued = true;
63 DisposeQueue.Instance.Add(this);
70 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
71 [EditorBrowsable(EditorBrowsableState.Never)]
74 //Throw excpetion if Dispose() is called in separate thread.
75 if (!Window.IsInstalled())
77 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
82 Dispose(DisposeTypes.Implicit);
86 Dispose(DisposeTypes.Explicit);
87 System.GC.SuppressFinalize(this);
94 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
95 [EditorBrowsable(EditorBrowsableState.Never)]
96 protected virtual void Dispose(DisposeTypes type)
103 if (type == DisposeTypes.Explicit)
106 //Release your own managed resources here.
107 //You should release all of your own disposable objects here.
111 //Release your own unmanaged resources here.
112 //You should not access any managed member here except static instance.
113 //because the execution order of Finalizes is non-deterministic.
115 if (swigCPtr.Handle != global::System.IntPtr.Zero)
120 Interop.AuthenticationSignalType.delete_AuthenticationSignalType(swigCPtr);
122 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
129 /// Queries whether there are any connected slots.
131 /// <returns>True if there are any slots connected to the signal</returns>
132 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
133 [EditorBrowsable(EditorBrowsableState.Never)]
136 bool ret = Interop.AuthenticationSignalType.AuthenticationSignalType_Empty(swigCPtr);
137 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
142 /// Queries the number of slots.
144 /// <returns>The number of slots connected to this signal</returns>
145 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
146 [EditorBrowsable(EditorBrowsableState.Never)]
147 public uint GetConnectionCount()
149 uint ret = Interop.AuthenticationSignalType.AuthenticationSignalType_GetConnectionCount(swigCPtr);
150 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 /// Connects a member function.
157 /// <param name="func">The member function to connect</param>
158 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
159 [EditorBrowsable(EditorBrowsableState.Never)]
160 public void Connect(System.Delegate func)
162 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
164 Interop.AuthenticationSignalType.AuthenticationSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
165 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
170 /// Disconnects a function.
172 /// <param name="func">The function to disconnect</param>
173 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
174 [EditorBrowsable(EditorBrowsableState.Never)]
175 public void Disconnect(System.Delegate func)
177 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
179 Interop.AuthenticationSignalType.AuthenticationSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
180 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
185 /// Emits the signal.
187 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
188 [EditorBrowsable(EditorBrowsableState.Never)]
189 public void Emit(AutofillContainer arg)
191 Interop.AuthenticationSignalType.AuthenticationSignalType_Emit(swigCPtr, AutofillContainer.getCPtr(arg));
192 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
198 /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
199 [EditorBrowsable(EditorBrowsableState.Never)]
200 public AuthenticationSignalType() : this(Interop.AuthenticationSignalType.new_AuthenticationSignalType(), true)
202 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();