dfc43519f7d946d64edbd21870ea7aa4862f30d6
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / Common / AuthenticationSignalType.cs
1 /*
2  * Copyright(c) 2021 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 using System.ComponentModel;
18
19 namespace Tizen.NUI
20 {
21     internal class AuthenticationSignalType : Disposable
22     {
23         internal AuthenticationSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
24         {
25         }
26
27         /// <summary>
28         /// Dispose
29         /// </summary>
30         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
31         [EditorBrowsable(EditorBrowsableState.Never)]
32         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
33         {
34             Interop.AuthenticationSignalType.DeleteAuthenticationSignalType(swigCPtr);
35         }
36
37         /// <summary>
38         /// Queries whether there are any connected slots.
39         /// </summary>
40         /// <returns>True if there are any slots connected to the signal</returns>
41         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
42         [EditorBrowsable(EditorBrowsableState.Never)]
43         public bool Empty()
44         {
45             bool ret = Interop.AuthenticationSignalType.Empty(SwigCPtr);
46             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
47             return ret;
48         }
49
50         /// <summary>
51         /// Queries the number of slots.
52         /// </summary>
53         /// <returns>The number of slots connected to this signal</returns>
54         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
55         [EditorBrowsable(EditorBrowsableState.Never)]
56         public uint GetConnectionCount()
57         {
58             uint ret = Interop.AuthenticationSignalType.GetConnectionCount(SwigCPtr);
59             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
60             return ret;
61         }
62
63         /// <summary>
64         /// Connects a member function.
65         /// </summary>
66         /// <param name="func">The member function to connect</param>
67         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
68         [EditorBrowsable(EditorBrowsableState.Never)]
69         public void Connect(System.Delegate func)
70         {
71             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
72             {
73                 Interop.AuthenticationSignalType.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
74                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75             }
76         }
77
78         /// <summary>
79         /// Disconnects a function.
80         /// </summary>
81         /// <param name="func">The function to disconnect</param>
82         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
83         [EditorBrowsable(EditorBrowsableState.Never)]
84         public void Disconnect(System.Delegate func)
85         {
86             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
87             {
88                 Interop.AuthenticationSignalType.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
89                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
90             }
91         }
92
93         /// <summary>
94         /// Emits the signal.
95         /// </summary>
96         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
97         [EditorBrowsable(EditorBrowsableState.Never)]
98         public void Emit(AutofillContainer arg)
99         {
100             Interop.AuthenticationSignalType.Emit(SwigCPtr, AutofillContainer.getCPtr(arg));
101             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
102         }
103
104         /// <summary>
105         /// The contructor.
106         /// </summary>
107         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
108         [EditorBrowsable(EditorBrowsableState.Never)]
109         public AuthenticationSignalType() : this(Interop.AuthenticationSignalType.NewAuthenticationSignalType(), true)
110         {
111             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
112         }
113     }
114 }