1a8b9c3d4eb98f51e6ab6f9f79003da5b3a89dc7
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / AuthenticationSignalType.cs
1 /*
2  * Copyright(c) 2019 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;
18 using System.Runtime.InteropServices;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     internal class AuthenticationSignalType : Disposable
24     {
25         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26         /// <summary>
27         /// swigCMemOwn
28         /// </summary>
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;
32
33         internal AuthenticationSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
34         {
35             swigCMemOwn = cMemoryOwn;
36             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37         }
38
39         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AuthenticationSignalType obj)
40         {
41             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42         }
43
44         /// <summary>
45         /// Dispose
46         /// </summary>
47         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
48         [EditorBrowsable(EditorBrowsableState.Never)]
49         protected override void Dispose(DisposeTypes type)
50         {
51             if (disposed)
52             {
53                 return;
54             }
55
56             //Release your own unmanaged resources here.
57             //You should not access any managed member here except static instance.
58             //because the execution order of Finalizes is non-deterministic.
59
60             if (swigCPtr.Handle != global::System.IntPtr.Zero)
61             {
62                 if (swigCMemOwn)
63                 {
64                     swigCMemOwn = false;
65                     Interop.AuthenticationSignalType.delete_AuthenticationSignalType(swigCPtr);
66                 }
67                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
68             }
69
70             base.Dispose(type);
71         }
72
73         /// <summary>
74         /// Queries whether there are any connected slots.
75         /// </summary>
76         /// <returns>True if there are any slots connected to the signal</returns>
77         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
78         [EditorBrowsable(EditorBrowsableState.Never)]
79         public bool Empty()
80         {
81             bool ret = Interop.AuthenticationSignalType.AuthenticationSignalType_Empty(swigCPtr);
82             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
83             return ret;
84         }
85
86         /// <summary>
87         /// Queries the number of slots.
88         /// </summary>
89         /// <returns>The number of slots connected to this signal</returns>
90         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
91         [EditorBrowsable(EditorBrowsableState.Never)]
92         public uint GetConnectionCount()
93         {
94             uint ret = Interop.AuthenticationSignalType.AuthenticationSignalType_GetConnectionCount(swigCPtr);
95             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96             return ret;
97         }
98
99         /// <summary>
100         /// Connects a member function.
101         /// </summary>
102         /// <param name="func">The member function to connect</param>
103         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
104         [EditorBrowsable(EditorBrowsableState.Never)]
105         public void Connect(System.Delegate func)
106         {
107             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
108             {
109                 Interop.AuthenticationSignalType.AuthenticationSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
110                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111             }
112         }
113
114         /// <summary>
115         /// Disconnects a function.
116         /// </summary>
117         /// <param name="func">The function to disconnect</param>
118         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
119         [EditorBrowsable(EditorBrowsableState.Never)]
120         public void Disconnect(System.Delegate func)
121         {
122             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
123             {
124                 Interop.AuthenticationSignalType.AuthenticationSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
125                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126             }
127         }
128
129         /// <summary>
130         /// Emits the signal.
131         /// </summary>
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)]
134         public void Emit(AutofillContainer arg)
135         {
136             Interop.AuthenticationSignalType.AuthenticationSignalType_Emit(swigCPtr, AutofillContainer.getCPtr(arg));
137             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138         }
139
140         /// <summary>
141         /// The contructor.
142         /// </summary>
143         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
144         [EditorBrowsable(EditorBrowsableState.Never)]
145         public AuthenticationSignalType() : this(Interop.AuthenticationSignalType.new_AuthenticationSignalType(), true)
146         {
147             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
148         }
149     }
150 }