Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / ConnectionTrackerInterface.cs
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16 using System;
17 using System.Runtime.InteropServices;
18
19 namespace Tizen.NUI
20 {
21     [Obsolete("Please do not use! this will be internal")]
22     public class ConnectionTrackerInterface : SignalObserver
23     {
24         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
25
26         internal ConnectionTrackerInterface(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ConnectionTrackerInterface_SWIGUpcast(cPtr), cMemoryOwn)
27         {
28             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
29         }
30
31         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ConnectionTrackerInterface obj)
32         {
33             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
34         }
35
36         protected override void Dispose(DisposeTypes type)
37         {
38             if (disposed)
39             {
40                 return;
41             }
42
43             if (type == DisposeTypes.Explicit)
44             {
45                 //Called by User
46                 //Release your own managed resources here.
47                 //You should release all of your own disposable objects here.
48
49             }
50
51             //Release your own unmanaged resources here.
52             //You should not access any managed member here except static instance.
53             //because the execution order of Finalizes is non-deterministic.
54
55             if (swigCPtr.Handle != global::System.IntPtr.Zero)
56             {
57                 if (swigCMemOwn)
58                 {
59                     swigCMemOwn = false;
60                     NDalicPINVOKE.delete_ConnectionTrackerInterface(swigCPtr);
61                 }
62                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
63             }
64
65             base.Dispose(type);
66         }
67
68
69         public virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_CallbackBase callback)
70         {
71             NDalicPINVOKE.ConnectionTrackerInterface_SignalConnected(swigCPtr, SlotObserver.getCPtr(slotObserver), SWIGTYPE_p_CallbackBase.getCPtr(callback));
72             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
73         }
74
75     }
76
77 }