Release 4.0.0-preview1-00301
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / ConnectionTrackerInterface.cs
1 /*
2  * Copyright(c) 2017 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 using System;
18 using System.Runtime.InteropServices;
19 using System.ComponentModel;
20
21 namespace Tizen.NUI
22 {
23     /// <summary>
24     /// Please do not use! this will be deprecated
25     /// </summary>
26     /// <since_tizen> 3 </since_tizen>
27     [EditorBrowsable(EditorBrowsableState.Never)]
28     public class ConnectionTrackerInterface : SignalObserver
29     {
30         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
31
32         internal ConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ConnectionTrackerInterface_SWIGUpcast(cPtr), cMemoryOwn)
33         {
34             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
35         }
36
37         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionTrackerInterface obj)
38         {
39             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
40         }
41
42         /// <summary>
43         /// Dispose
44         /// </summary>
45         /// <since_tizen> 3 </since_tizen>
46         protected override void Dispose(DisposeTypes type)
47         {
48             if (disposed)
49             {
50                 return;
51             }
52
53             if (type == DisposeTypes.Explicit)
54             {
55                 //Called by User
56                 //Release your own managed resources here.
57                 //You should release all of your own disposable objects here.
58
59             }
60
61             //Release your own unmanaged resources here.
62             //You should not access any managed member here except static instance.
63             //because the execution order of Finalizes is non-deterministic.
64
65             if (swigCPtr.Handle != global::System.IntPtr.Zero)
66             {
67                 if (swigCMemOwn)
68                 {
69                     swigCMemOwn = false;
70                     NDalicPINVOKE.delete_ConnectionTrackerInterface(swigCPtr);
71                 }
72                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
73             }
74
75             base.Dispose(type);
76         }
77
78
79         /// <summary>
80         /// Called when a signal is connected.
81         /// </summary>
82         /// <param name="slotObserver">The slot observer i.e. a signal. Ownership is not passed</param>
83         /// <param name="callback">The call back. Ownership is not passed</param>
84         /// <since_tizen> 3 </since_tizen>
85         public virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_CallbackBase callback)
86         {
87             NDalicPINVOKE.ConnectionTrackerInterface_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_CallbackBase.getCPtr(callback));
88             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
89         }
90
91     }
92
93 }