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.
21 /// LowBatterySignalType.
23 internal class LowBatterySignalType : Disposable
26 internal LowBatterySignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
31 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
33 Interop.LowBatterySignal.delete_LowBatterySignalType(swigCPtr);
39 /// <returns>true if there is no signal attached</returns>
42 bool ret = Interop.LowBatterySignal.LowBatterySignalType_Empty(swigCPtr);
43 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
48 /// GetConnectionCount
50 /// <returns>number of attached signals</returns>
51 public uint GetConnectionCount()
53 uint ret = Interop.LowBatterySignal.LowBatterySignalType_GetConnectionCount(swigCPtr);
54 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
61 /// <param name="func"></param>
62 public void Connect(System.Delegate func)
64 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
66 Interop.LowBatterySignal.LowBatterySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
67 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
74 /// <param name="func"></param>
75 public void Disconnect(System.Delegate func)
77 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
79 Interop.LowBatterySignal.LowBatterySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
80 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
84 internal void Emit(Application.BatteryStatus arg)
86 Interop.LowBatterySignal.LowBatterySignalType_Emit(swigCPtr, (int)arg);
87 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 /// LowBatterySignalType
93 public LowBatterySignalType() : this(Interop.LowBatterySignal.new_LowBatterySignalType(), true)
95 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();