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 ContentReceivedSignalType : Disposable
26 /// ContentReceivedSignalType
29 internal ContentReceivedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
37 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
39 Interop.ContentReceivedSignalType.DeleteContentReceivedSignalType(swigCPtr);
43 /// Queries whether there are any connected slots.
45 /// <returns>True if there are any slots connected to the signal</returns>
48 bool ret = Interop.ContentReceivedSignalType.Empty(SwigCPtr);
49 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54 /// Queries the number of slots.
56 /// <returns>The number of slots connected to this signal</returns>
57 public uint GetConnectionCount()
59 uint ret = Interop.ContentReceivedSignalType.GetConnectionCount(SwigCPtr);
60 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
65 /// Connects a function.
67 /// <param name="func">The function to connect</param>
68 public void Connect(System.Delegate func)
70 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
72 Interop.ContentReceivedSignalType.Connect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
73 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
78 /// Disconnects a function.
80 /// <param name="func">The function to disconnect</param>
81 public void Disconnect(System.Delegate func)
83 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
85 Interop.ContentReceivedSignalType.Disconnect(SwigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 /// Connects a member function.
93 /// <param name="arg1">The member function to connect</param>
94 /// <param name="arg2">The member function to connect</param>
95 /// <param name="arg3">The member function to connect</param>
96 public void Emit(string arg1, string arg2, string arg3)
98 Interop.ContentReceivedSignalType.Emit(SwigCPtr, arg1, arg2, arg3);
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
105 public ContentReceivedSignalType() : this(Interop.ContentReceivedSignalType.NewContentReceivedSignalType(), true)
107 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();