Sharp.Augeas/CodeLiturgy.Augeas/AugeasExtern.cs

28 lines
1.4 KiB
C#

using System.Numerics;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using CodeLiturgy.Augeas.Test;
namespace CodeLiturgy.Augeas
{
[SuppressUnmanagedCodeSecurity]
public static unsafe partial class AugeasExtern
{
[DllImport(_libName)] public static extern IntPtr init_aug( AugSettings settings, int flags);
[DllImport(_libName)] public static extern void close_aug (IntPtr aug);
[DllImport(_libName)] public static extern void free_str (char* str);
/// <summary>
/// Used by DllImport to load the native library
/// </summary>
private const string _libName = "clAugeas";
/// <summary>Test calling</summary>
[DllImport(_libName)] public static extern void print_preview(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string matchPath);
[DllImport(_libName)] public static extern void print_tree(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string matchPath);
[DllImport(_libName)] public static extern char* get_tree(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string matchPath);
[DllImport(_libName)] public static extern void defNode( AugSettings settings, [MarshalAs(UnmanagedType.LPStr)] string matchPath);
[DllImport(_libName)] public static extern void load_file(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string filePath);
}
}