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)
33 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ContentReceivedSignalType obj)
35 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
43 Interop.ContentReceivedSignalType.delete_ContentReceivedSignalType(swigCPtr);
47 /// Queries whether there are any connected slots.
49 /// <returns>True if there are any slots connected to the signal</returns>
52 bool ret = Interop.ContentReceivedSignalType.ContentReceivedSignalType_Empty(swigCPtr);
53 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
58 /// Queries the number of slots.
60 /// <returns>The number of slots connected to this signal</returns>
61 public uint GetConnectionCount()
63 uint ret = Interop.ContentReceivedSignalType.ContentReceivedSignalType_GetConnectionCount(swigCPtr);
64 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
69 /// Connects a function.
71 /// <param name="func">The function to connect</param>
72 public void Connect(System.Delegate func)
74 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
76 Interop.ContentReceivedSignalType.ContentReceivedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
77 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
82 /// Disconnects a function.
84 /// <param name="func">The function to disconnect</param>
85 public void Disconnect(System.Delegate func)
87 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
89 Interop.ContentReceivedSignalType.ContentReceivedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
90 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
95 /// Connects a member function.
97 /// <param name="arg1">The member function to connect</param>
98 /// <param name="arg2">The member function to connect</param>
99 /// <param name="arg3">The member function to connect</param>
100 public void Emit(string arg1, string arg2, string arg3)
102 Interop.ContentReceivedSignalType.ContentReceivedSignalType_Emit(swigCPtr, arg1, arg2, arg3);
103 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
109 public ContentReceivedSignalType() : this(Interop.ContentReceivedSignalType.new_ContentReceivedSignalType(), true)
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();