[NUI] remove "_" and refactoring naming to pascal case.
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / LowBatterySignalType.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
18 namespace Tizen.NUI
19 {
20     /// <summary>
21     /// LowBatterySignalType.
22     /// </summary>
23     internal class LowBatterySignalType : Disposable
24     {
25
26         internal LowBatterySignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
27         {
28         }
29
30
31         protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
32         {
33             Interop.LowBatterySignal.DeleteLowBatterySignalType(swigCPtr);
34         }
35
36         /// <summary>
37         /// Empty 
38         /// </summary>
39         /// <returns>true if there is no signal attached</returns>
40         public bool Empty()
41         {
42             bool ret = Interop.LowBatterySignal.LowBatterySignalTypeEmpty(swigCPtr);
43             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
44             return ret;
45         }
46
47         /// <summary>
48         /// GetConnectionCount
49         /// </summary>
50         /// <returns>number of attached signals</returns>
51         public uint GetConnectionCount()
52         {
53             uint ret = Interop.LowBatterySignal.LowBatterySignalTypeGetConnectionCount(swigCPtr);
54             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
55             return ret;
56         }
57
58         /// <summary>
59         /// signal connect
60         /// </summary>
61         /// <param name="func"></param>
62         public void Connect(System.Delegate func)
63         {
64             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
65             {
66                 Interop.LowBatterySignal.LowBatterySignalTypeConnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
67                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
68             }
69         }
70
71         /// <summary>
72         /// signal disconnect
73         /// </summary>
74         /// <param name="func"></param>
75         public void Disconnect(System.Delegate func)
76         {
77             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
78             {
79                 Interop.LowBatterySignal.LowBatterySignalTypeDisconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
80                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
81             }
82         }
83
84         internal void Emit(Application.BatteryStatus arg)
85         {
86             Interop.LowBatterySignal.LowBatterySignalTypeEmit(swigCPtr, (int)arg);
87             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
88         }
89
90         /// <summary>
91         /// LowBatterySignalType
92         /// </summary>
93         public LowBatterySignalType() : this(Interop.LowBatterySignal.NewLowBatterySignalType(), true)
94         {
95             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
96         }
97     }
98 }
99