--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+ internal static partial class Glib
+ {
+ [DllImport(Libraries.Glib, EntryPoint = "g_free", CallingConvention = CallingConvention.Cdecl)]
+ internal static extern uint Free(IntPtr data);
+ }
+}
{
public const string Connection = "libcapi-network-connection.so.1";
public const string Libc = "libc.so.6";
+ public const string Glib = "libglib-2.0.so.0";
}
}
Log.Error(Globals.LogTag, "It failed to get apn, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(Value);
- Interop.Libc.Free(Value);
+ Interop.Glib.Free(Value);
return result;
}
Log.Error(Globals.LogTag, "It failed to get home url, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(Value);
- Interop.Libc.Free(Value);
+ Interop.Glib.Free(Value);
return result;
}
}
string result = Marshal.PtrToStringAnsi(ip);
- Interop.Libc.Free(ip);
+ Interop.Glib.Free(ip);
Log.Info(Globals.LogTag, "IPAddress " + result + " (" + result.Length + ")");
if (result.Length == 0)
{
}
string result = Marshal.PtrToStringAnsi(ip);
- Interop.Libc.Free(ip);
+ Interop.Glib.Free(ip);
return result;
}
}
string result = Marshal.PtrToStringAnsi(mac);
- Interop.Libc.Free(mac);
+ Interop.Glib.Free(mac);
return result;
}
Log.Error(Globals.LogTag, "It failed to get id of connection profile, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(Value);
- Interop.Libc.Free(Value);
+ Interop.Glib.Free(Value);
return result;
}
}
Log.Error(Globals.LogTag, "It failed to get name of connection profile, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(Value);
- Interop.Libc.Free(Value);
+ Interop.Glib.Free(Value);
return result;
}
}
Log.Error(Globals.LogTag, "It failed to get network interface name, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(Value);
- Interop.Libc.Free(Value);
+ Interop.Glib.Free(Value);
return result;
}
}
Log.Error(Globals.LogTag, "It failed to get proxy address, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(Value);
- Interop.Libc.Free(Value);
+ Interop.Glib.Free(Value);
return result;
}
string addr = Marshal.PtrToStringAnsi(addrPtr);
if (addr == null || addr.Length == 0)
return DefaultIPAddress();
- Interop.Libc.Free(addrPtr);
+ Interop.Glib.Free(addrPtr);
return System.Net.IPAddress.Parse(addr);
}
Log.Error(Globals.LogTag, "It failed to create profile handle, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(value);
- Interop.Libc.Free(value);
+ Interop.Glib.Free(value);
return result;
}
}
Log.Error(Globals.LogTag, "It failed to get bssid, " + (ConnectionError)ret);
}
string result = Marshal.PtrToStringAnsi(value);
- Interop.Libc.Free(value);
+ Interop.Glib.Free(value);
return result;
}
}