summaryrefslogtreecommitdiff
path: root/src/bindings/mono/eo_mono
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-28 19:06:38 -0300
committerLauro Moura <lauromoura@expertisesolutions.com.br>2019-10-28 19:08:48 -0300
commitd59197d2ee4a9789c9d053e7c8a927ff21935640 (patch)
tree3b3f2e2de08791ca15a64700f2691d3ee87cfd9e /src/bindings/mono/eo_mono
parent1db12b5fb4c0160c0d486a0e6d2a8bd748820881 (diff)
mono: encapsulate internal NativeModule
Summary: Depends on D10342 Depends on D10338 Test Plan: meson setup -Dbindings=mono,cxx -Dmono-beta=true Reviewers: lauromoura, segfaultxavi, Jaehyun_Cho Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers, woohyun Tags: #efl Differential Revision: https://phab.enlightenment.org/D10343
Diffstat (limited to 'src/bindings/mono/eo_mono')
-rw-r--r--src/bindings/mono/eo_mono/NativeModule.cs6
-rw-r--r--src/bindings/mono/eo_mono/NativeModule_Unix.cs6
-rw-r--r--src/bindings/mono/eo_mono/NativeModule_Windows.cs4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/bindings/mono/eo_mono/NativeModule.cs b/src/bindings/mono/eo_mono/NativeModule.cs
index ad9cc60..932b453 100644
--- a/src/bindings/mono/eo_mono/NativeModule.cs
+++ b/src/bindings/mono/eo_mono/NativeModule.cs
@@ -19,14 +19,14 @@ namespace Efl.Eo
19{ 19{
20 20
21///<summary>Wraps a native module that was opened with dlopen/LoadLibrary.</summary> 21///<summary>Wraps a native module that was opened with dlopen/LoadLibrary.</summary>
22public partial class NativeModule : IDisposable 22internal partial class NativeModule : IDisposable
23{ 23{
24 private Lazy<IntPtr> module; 24 private Lazy<IntPtr> module;
25 private bool disposed = false; 25 private bool disposed = false;
26 26
27 ///<summary>Lazily tries to load the module with the given name.</summary> 27 ///<summary>Lazily tries to load the module with the given name.</summary>
28 ///<param name="libName">The name of the module to load.</param> 28 ///<param name="libName">The name of the module to load.</param>
29 public NativeModule(string libName) 29 internal NativeModule(string libName)
30 { 30 {
31 module = new Lazy<IntPtr> 31 module = new Lazy<IntPtr>
32 (() => 32 (() =>
@@ -36,7 +36,7 @@ public partial class NativeModule : IDisposable
36 } 36 }
37 37
38 ///<summary>The module that was loaded.</summary> 38 ///<summary>The module that was loaded.</summary>
39 public IntPtr Module 39 internal IntPtr Module
40 { 40 {
41 get 41 get
42 { 42 {
diff --git a/src/bindings/mono/eo_mono/NativeModule_Unix.cs b/src/bindings/mono/eo_mono/NativeModule_Unix.cs
index 1e5a517..67409e0 100644
--- a/src/bindings/mono/eo_mono/NativeModule_Unix.cs
+++ b/src/bindings/mono/eo_mono/NativeModule_Unix.cs
@@ -19,7 +19,7 @@ using System.Runtime.InteropServices;
19namespace Efl.Eo 19namespace Efl.Eo
20{ 20{
21 21
22public partial class NativeModule 22internal partial class NativeModule
23{ 23{
24 private const int RTLD_NOW = 0x002; 24 private const int RTLD_NOW = 0x002;
25 // Currently we are using GLOBAL due to issues 25 // Currently we are using GLOBAL due to issues
@@ -33,7 +33,7 @@ public partial class NativeModule
33 33
34 ///<summary>Closes the library handle.</summary> 34 ///<summary>Closes the library handle.</summary>
35 ///<param name="handle">The handle to the library.</param> 35 ///<param name="handle">The handle to the library.</param>
36 public static void UnloadLibrary(IntPtr handle) 36 internal static void UnloadLibrary(IntPtr handle)
37 { 37 {
38 dlclose(handle); 38 dlclose(handle);
39 } 39 }
@@ -60,7 +60,7 @@ public partial class NativeModule
60 ///</summary> 60 ///</summary>
61 ///<param name="filename">The name to search for.</param> 61 ///<param name="filename">The name to search for.</param>
62 ///<returns>The loaded library handle or <see cref="System.IntPtr.Zero"/> on failure.</returns> 62 ///<returns>The loaded library handle or <see cref="System.IntPtr.Zero"/> on failure.</returns>
63 public static IntPtr LoadLibrary(string filename) 63 internal static IntPtr LoadLibrary(string filename)
64 { 64 {
65 Eina.Log.Debug($"Loading library {filename}"); 65 Eina.Log.Debug($"Loading library {filename}");
66 var r = dlopen(filename, RTLD_NOW | RTLD_GLOBAL); 66 var r = dlopen(filename, RTLD_NOW | RTLD_GLOBAL);
diff --git a/src/bindings/mono/eo_mono/NativeModule_Windows.cs b/src/bindings/mono/eo_mono/NativeModule_Windows.cs
index bbd3c7f..513eb72 100644
--- a/src/bindings/mono/eo_mono/NativeModule_Windows.cs
+++ b/src/bindings/mono/eo_mono/NativeModule_Windows.cs
@@ -19,10 +19,10 @@ using System.Runtime.InteropServices;
19namespace Efl.Eo 19namespace Efl.Eo
20{ 20{
21 21
22public class partial NativeModule 22internal class partial NativeModule
23{ 23{
24 [DllImport(efl.Libs.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)] 24 [DllImport(efl.Libs.Kernel32, CharSet = CharSet.Unicode, SetLastError = true)]
25 public static extern IntPtr LoadLibrary(string libFilename); 25 internal static extern IntPtr LoadLibrary(string libFilename);
26} 26}
27 27
28} 28}