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
25 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
27 /// ContentReceivedSignalType
29 protected bool swigCMemOwn;
31 internal ContentReceivedSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
33 swigCMemOwn = cMemoryOwn;
34 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
37 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ContentReceivedSignalType obj)
39 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
45 protected override void Dispose(DisposeTypes type)
52 //Release your own unmanaged resources here.
53 //You should not access any managed member here except static instance.
54 //because the execution order of Finalizes is non-deterministic.
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 Interop.ContentReceivedSignalType.delete_ContentReceivedSignalType(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69 /// Queries whether there are any connected slots.
71 /// <returns>True if there are any slots connected to the signal</returns>
74 bool ret = Interop.ContentReceivedSignalType.ContentReceivedSignalType_Empty(swigCPtr);
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 /// Queries the number of slots.
82 /// <returns>The number of slots connected to this signal</returns>
83 public uint GetConnectionCount()
85 uint ret = Interop.ContentReceivedSignalType.ContentReceivedSignalType_GetConnectionCount(swigCPtr);
86 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
91 /// Connects a function.
93 /// <param name="func">The function to connect</param>
94 public void Connect(System.Delegate func)
96 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
98 Interop.ContentReceivedSignalType.ContentReceivedSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
99 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 /// Disconnects a function.
106 /// <param name="func">The function to disconnect</param>
107 public void Disconnect(System.Delegate func)
109 System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
111 Interop.ContentReceivedSignalType.ContentReceivedSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
112 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
117 /// Connects a member function.
119 /// <param name="arg1">The member function to connect</param>
120 /// <param name="arg2">The member function to connect</param>
121 /// <param name="arg3">The member function to connect</param>
122 public void Emit(string arg1, string arg2, string arg3)
124 Interop.ContentReceivedSignalType.ContentReceivedSignalType_Emit(swigCPtr, arg1, arg2, arg3);
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
131 public ContentReceivedSignalType() : this(Interop.ContentReceivedSignalType.new_ContentReceivedSignalType(), true)
133 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();