721 lines
25 KiB
C#
721 lines
25 KiB
C#
// This file was generated by the Gtk# code generator.
|
|
// Any changes made will be lost if regenerated.
|
|
|
|
namespace GLib {
|
|
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Runtime.InteropServices;
|
|
using static GLib.AbiStructExtension;
|
|
|
|
#region Autogenerated code
|
|
public partial class MountOperation : GLib.Object {
|
|
|
|
public MountOperation (IntPtr raw) : base(raw) {}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_mount_operation_new();
|
|
static d_g_mount_operation_new g_mount_operation_new = FuncLoader.LoadFunction<d_g_mount_operation_new>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_new"));
|
|
|
|
public MountOperation () : base (IntPtr.Zero)
|
|
{
|
|
if (GetType () != typeof (MountOperation)) {
|
|
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
|
|
return;
|
|
}
|
|
Raw = g_mount_operation_new();
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_mount_operation_get_username(IntPtr raw);
|
|
static d_g_mount_operation_get_username g_mount_operation_get_username = FuncLoader.LoadFunction<d_g_mount_operation_get_username>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_username"));
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_set_username(IntPtr raw, IntPtr username);
|
|
static d_g_mount_operation_set_username g_mount_operation_set_username = FuncLoader.LoadFunction<d_g_mount_operation_set_username>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_set_username"));
|
|
|
|
[GLib.Property ("username")]
|
|
public string Username {
|
|
get {
|
|
IntPtr raw_ret = g_mount_operation_get_username(Handle);
|
|
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
|
|
return ret;
|
|
}
|
|
set {
|
|
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
|
|
g_mount_operation_set_username(Handle, native_value);
|
|
GLib.Marshaller.Free (native_value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_mount_operation_get_password(IntPtr raw);
|
|
static d_g_mount_operation_get_password g_mount_operation_get_password = FuncLoader.LoadFunction<d_g_mount_operation_get_password>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_password"));
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_set_password(IntPtr raw, IntPtr password);
|
|
static d_g_mount_operation_set_password g_mount_operation_set_password = FuncLoader.LoadFunction<d_g_mount_operation_set_password>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_set_password"));
|
|
|
|
[GLib.Property ("password")]
|
|
public string Password {
|
|
get {
|
|
IntPtr raw_ret = g_mount_operation_get_password(Handle);
|
|
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
|
|
return ret;
|
|
}
|
|
set {
|
|
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
|
|
g_mount_operation_set_password(Handle, native_value);
|
|
GLib.Marshaller.Free (native_value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate bool d_g_mount_operation_get_anonymous(IntPtr raw);
|
|
static d_g_mount_operation_get_anonymous g_mount_operation_get_anonymous = FuncLoader.LoadFunction<d_g_mount_operation_get_anonymous>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_anonymous"));
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_set_anonymous(IntPtr raw, bool anonymous);
|
|
static d_g_mount_operation_set_anonymous g_mount_operation_set_anonymous = FuncLoader.LoadFunction<d_g_mount_operation_set_anonymous>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_set_anonymous"));
|
|
|
|
[GLib.Property ("anonymous")]
|
|
public bool Anonymous {
|
|
get {
|
|
bool raw_ret = g_mount_operation_get_anonymous(Handle);
|
|
bool ret = raw_ret;
|
|
return ret;
|
|
}
|
|
set {
|
|
g_mount_operation_set_anonymous(Handle, value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_mount_operation_get_domain(IntPtr raw);
|
|
static d_g_mount_operation_get_domain g_mount_operation_get_domain = FuncLoader.LoadFunction<d_g_mount_operation_get_domain>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_domain"));
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_set_domain(IntPtr raw, IntPtr domain);
|
|
static d_g_mount_operation_set_domain g_mount_operation_set_domain = FuncLoader.LoadFunction<d_g_mount_operation_set_domain>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_set_domain"));
|
|
|
|
[GLib.Property ("domain")]
|
|
public string Domain {
|
|
get {
|
|
IntPtr raw_ret = g_mount_operation_get_domain(Handle);
|
|
string ret = GLib.Marshaller.Utf8PtrToString (raw_ret);
|
|
return ret;
|
|
}
|
|
set {
|
|
IntPtr native_value = GLib.Marshaller.StringToPtrGStrdup (value);
|
|
g_mount_operation_set_domain(Handle, native_value);
|
|
GLib.Marshaller.Free (native_value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate int d_g_mount_operation_get_password_save(IntPtr raw);
|
|
static d_g_mount_operation_get_password_save g_mount_operation_get_password_save = FuncLoader.LoadFunction<d_g_mount_operation_get_password_save>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_password_save"));
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_set_password_save(IntPtr raw, int save);
|
|
static d_g_mount_operation_set_password_save g_mount_operation_set_password_save = FuncLoader.LoadFunction<d_g_mount_operation_set_password_save>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_set_password_save"));
|
|
|
|
[GLib.Property ("password-save")]
|
|
public GLib.PasswordSave PasswordSave {
|
|
get {
|
|
int raw_ret = g_mount_operation_get_password_save(Handle);
|
|
GLib.PasswordSave ret = (GLib.PasswordSave) raw_ret;
|
|
return ret;
|
|
}
|
|
set {
|
|
g_mount_operation_set_password_save(Handle, (int) value);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate int d_g_mount_operation_get_choice(IntPtr raw);
|
|
static d_g_mount_operation_get_choice g_mount_operation_get_choice = FuncLoader.LoadFunction<d_g_mount_operation_get_choice>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_choice"));
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_set_choice(IntPtr raw, int choice);
|
|
static d_g_mount_operation_set_choice g_mount_operation_set_choice = FuncLoader.LoadFunction<d_g_mount_operation_set_choice>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_set_choice"));
|
|
|
|
[GLib.Property ("choice")]
|
|
public int Choice {
|
|
get {
|
|
int raw_ret = g_mount_operation_get_choice(Handle);
|
|
int ret = raw_ret;
|
|
return ret;
|
|
}
|
|
set {
|
|
g_mount_operation_set_choice(Handle, value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("aborted")]
|
|
public event System.EventHandler Aborted {
|
|
add {
|
|
this.AddSignalHandler ("aborted", value);
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("aborted", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("ask-question")]
|
|
public event GLib.AskQuestionHandler AskQuestion {
|
|
add {
|
|
this.AddSignalHandler ("ask-question", value, typeof (GLib.AskQuestionArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("ask-question", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("show-processes")]
|
|
public event GLib.ShowProcessesHandler ShowProcesses {
|
|
add {
|
|
this.AddSignalHandler ("show-processes", value, typeof (GLib.ShowProcessesArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("show-processes", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("ask-password")]
|
|
public event GLib.AskPasswordHandler AskPassword {
|
|
add {
|
|
this.AddSignalHandler ("ask-password", value, typeof (GLib.AskPasswordArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("ask-password", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("reply")]
|
|
public event GLib.ReplyHandler Reply {
|
|
add {
|
|
this.AddSignalHandler ("reply", value, typeof (GLib.ReplyArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("reply", value);
|
|
}
|
|
}
|
|
|
|
[GLib.Signal("show-unmount-progress")]
|
|
public event GLib.ShowUnmountProgressHandler ShowUnmountProgress {
|
|
add {
|
|
this.AddSignalHandler ("show-unmount-progress", value, typeof (GLib.ShowUnmountProgressArgs));
|
|
}
|
|
remove {
|
|
this.RemoveSignalHandler ("show-unmount-progress", value);
|
|
}
|
|
}
|
|
|
|
static AskPasswordNativeDelegate AskPassword_cb_delegate;
|
|
static AskPasswordNativeDelegate AskPasswordVMCallback {
|
|
get {
|
|
if (AskPassword_cb_delegate == null)
|
|
AskPassword_cb_delegate = new AskPasswordNativeDelegate (AskPassword_cb);
|
|
return AskPassword_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAskPassword (GLib.GType gtype)
|
|
{
|
|
OverrideAskPassword (gtype, AskPasswordVMCallback);
|
|
}
|
|
|
|
static void OverrideAskPassword (GLib.GType gtype, AskPasswordNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("ask_password"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AskPasswordNativeDelegate (IntPtr inst, IntPtr message, IntPtr default_user, IntPtr default_domain, int flags);
|
|
|
|
static void AskPassword_cb (IntPtr inst, IntPtr message, IntPtr default_user, IntPtr default_domain, int flags)
|
|
{
|
|
try {
|
|
MountOperation __obj = GLib.Object.GetObject (inst, false) as MountOperation;
|
|
__obj.OnAskPassword (GLib.Marshaller.Utf8PtrToString (message), GLib.Marshaller.Utf8PtrToString (default_user), GLib.Marshaller.Utf8PtrToString (default_domain), (GLib.AskPasswordFlags) flags);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.MountOperation), ConnectionMethod="OverrideAskPassword")]
|
|
protected virtual void OnAskPassword (string message, string default_user, string default_domain, GLib.AskPasswordFlags flags)
|
|
{
|
|
InternalAskPassword (message, default_user, default_domain, flags);
|
|
}
|
|
|
|
private void InternalAskPassword (string message, string default_user, string default_domain, GLib.AskPasswordFlags flags)
|
|
{
|
|
AskPasswordNativeDelegate unmanaged = class_abi.BaseOverride<AskPasswordNativeDelegate>(this.LookupGType(), "ask_password");
|
|
if (unmanaged == null) return;
|
|
|
|
IntPtr native_message = GLib.Marshaller.StringToPtrGStrdup (message);
|
|
IntPtr native_default_user = GLib.Marshaller.StringToPtrGStrdup (default_user);
|
|
IntPtr native_default_domain = GLib.Marshaller.StringToPtrGStrdup (default_domain);
|
|
unmanaged (this.Handle, native_message, native_default_user, native_default_domain, (int) flags);
|
|
GLib.Marshaller.Free (native_message);
|
|
GLib.Marshaller.Free (native_default_user);
|
|
GLib.Marshaller.Free (native_default_domain);
|
|
}
|
|
|
|
static AskQuestionNativeDelegate AskQuestion_cb_delegate;
|
|
static AskQuestionNativeDelegate AskQuestionVMCallback {
|
|
get {
|
|
if (AskQuestion_cb_delegate == null)
|
|
AskQuestion_cb_delegate = new AskQuestionNativeDelegate (AskQuestion_cb);
|
|
return AskQuestion_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAskQuestion (GLib.GType gtype)
|
|
{
|
|
OverrideAskQuestion (gtype, AskQuestionVMCallback);
|
|
}
|
|
|
|
static void OverrideAskQuestion (GLib.GType gtype, AskQuestionNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("ask_question"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AskQuestionNativeDelegate (IntPtr inst, IntPtr message, IntPtr[] choices);
|
|
|
|
static void AskQuestion_cb (IntPtr inst, IntPtr message, IntPtr[] choices)
|
|
{
|
|
try {
|
|
MountOperation __obj = GLib.Object.GetObject (inst, false) as MountOperation;
|
|
__obj.OnAskQuestion (GLib.Marshaller.Utf8PtrToString (message), GLib.Marshaller.Utf8PtrToString (choices));
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.MountOperation), ConnectionMethod="OverrideAskQuestion")]
|
|
protected virtual void OnAskQuestion (string message, string[] choices)
|
|
{
|
|
InternalAskQuestion (message, choices);
|
|
}
|
|
|
|
private void InternalAskQuestion (string message, string[] choices)
|
|
{
|
|
AskQuestionNativeDelegate unmanaged = class_abi.BaseOverride<AskQuestionNativeDelegate>(this.LookupGType(), "ask_question");
|
|
if (unmanaged == null) return;
|
|
|
|
IntPtr native_message = GLib.Marshaller.StringToPtrGStrdup (message);
|
|
int cnt_choices = choices == null ? 0 : choices.Length;
|
|
IntPtr[] native_choices = new IntPtr [cnt_choices];
|
|
for (int i = 0; i < cnt_choices; i++)
|
|
native_choices [i] = GLib.Marshaller.StringToPtrGStrdup (choices[i]);
|
|
unmanaged (this.Handle, native_message, native_choices);
|
|
GLib.Marshaller.Free (native_message);
|
|
for (int i = 0; i < native_choices.Length; i++) {
|
|
choices [i] = GLib.Marshaller.Utf8PtrToString (native_choices[i]);
|
|
GLib.Marshaller.Free (native_choices[i]);
|
|
}
|
|
}
|
|
|
|
static ReplyNativeDelegate Reply_cb_delegate;
|
|
static ReplyNativeDelegate ReplyVMCallback {
|
|
get {
|
|
if (Reply_cb_delegate == null)
|
|
Reply_cb_delegate = new ReplyNativeDelegate (Reply_cb);
|
|
return Reply_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideReply (GLib.GType gtype)
|
|
{
|
|
OverrideReply (gtype, ReplyVMCallback);
|
|
}
|
|
|
|
static void OverrideReply (GLib.GType gtype, ReplyNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reply"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void ReplyNativeDelegate (IntPtr inst, int result);
|
|
|
|
static void Reply_cb (IntPtr inst, int result)
|
|
{
|
|
try {
|
|
MountOperation __obj = GLib.Object.GetObject (inst, false) as MountOperation;
|
|
__obj.OnReply ((GLib.MountOperationResult) result);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.MountOperation), ConnectionMethod="OverrideReply")]
|
|
protected virtual void OnReply (GLib.MountOperationResult result)
|
|
{
|
|
InternalReply (result);
|
|
}
|
|
|
|
private void InternalReply (GLib.MountOperationResult result)
|
|
{
|
|
ReplyNativeDelegate unmanaged = class_abi.BaseOverride<ReplyNativeDelegate>(this.LookupGType(), "reply");
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle, (int) result);
|
|
}
|
|
|
|
static AbortedNativeDelegate Aborted_cb_delegate;
|
|
static AbortedNativeDelegate AbortedVMCallback {
|
|
get {
|
|
if (Aborted_cb_delegate == null)
|
|
Aborted_cb_delegate = new AbortedNativeDelegate (Aborted_cb);
|
|
return Aborted_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideAborted (GLib.GType gtype)
|
|
{
|
|
OverrideAborted (gtype, AbortedVMCallback);
|
|
}
|
|
|
|
static void OverrideAborted (GLib.GType gtype, AbortedNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("aborted"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void AbortedNativeDelegate (IntPtr inst);
|
|
|
|
static void Aborted_cb (IntPtr inst)
|
|
{
|
|
try {
|
|
MountOperation __obj = GLib.Object.GetObject (inst, false) as MountOperation;
|
|
__obj.OnAborted ();
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.MountOperation), ConnectionMethod="OverrideAborted")]
|
|
protected virtual void OnAborted ()
|
|
{
|
|
InternalAborted ();
|
|
}
|
|
|
|
private void InternalAborted ()
|
|
{
|
|
AbortedNativeDelegate unmanaged = class_abi.BaseOverride<AbortedNativeDelegate>(this.LookupGType(), "aborted");
|
|
if (unmanaged == null) return;
|
|
|
|
unmanaged (this.Handle);
|
|
}
|
|
|
|
static ShowProcessesNativeDelegate ShowProcesses_cb_delegate;
|
|
static ShowProcessesNativeDelegate ShowProcessesVMCallback {
|
|
get {
|
|
if (ShowProcesses_cb_delegate == null)
|
|
ShowProcesses_cb_delegate = new ShowProcessesNativeDelegate (ShowProcesses_cb);
|
|
return ShowProcesses_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideShowProcesses (GLib.GType gtype)
|
|
{
|
|
OverrideShowProcesses (gtype, ShowProcessesVMCallback);
|
|
}
|
|
|
|
static void OverrideShowProcesses (GLib.GType gtype, ShowProcessesNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("show_processes"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void ShowProcessesNativeDelegate (IntPtr inst, IntPtr message, IntPtr processes, IntPtr[] choices);
|
|
|
|
static void ShowProcesses_cb (IntPtr inst, IntPtr message, IntPtr processes, IntPtr[] choices)
|
|
{
|
|
try {
|
|
MountOperation __obj = GLib.Object.GetObject (inst, false) as MountOperation;
|
|
__obj.OnShowProcesses (GLib.Marshaller.Utf8PtrToString (message), processes, GLib.Marshaller.Utf8PtrToString (choices));
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.MountOperation), ConnectionMethod="OverrideShowProcesses")]
|
|
protected virtual void OnShowProcesses (string message, IntPtr processes, string[] choices)
|
|
{
|
|
InternalShowProcesses (message, processes, choices);
|
|
}
|
|
|
|
private void InternalShowProcesses (string message, IntPtr processes, string[] choices)
|
|
{
|
|
ShowProcessesNativeDelegate unmanaged = class_abi.BaseOverride<ShowProcessesNativeDelegate>(this.LookupGType(), "show_processes");
|
|
if (unmanaged == null) return;
|
|
|
|
IntPtr native_message = GLib.Marshaller.StringToPtrGStrdup (message);
|
|
int cnt_choices = choices == null ? 0 : choices.Length;
|
|
IntPtr[] native_choices = new IntPtr [cnt_choices];
|
|
for (int i = 0; i < cnt_choices; i++)
|
|
native_choices [i] = GLib.Marshaller.StringToPtrGStrdup (choices[i]);
|
|
unmanaged (this.Handle, native_message, processes, native_choices);
|
|
GLib.Marshaller.Free (native_message);
|
|
for (int i = 0; i < native_choices.Length; i++) {
|
|
choices [i] = GLib.Marshaller.Utf8PtrToString (native_choices[i]);
|
|
GLib.Marshaller.Free (native_choices[i]);
|
|
}
|
|
}
|
|
|
|
static ShowUnmountProgressNativeDelegate ShowUnmountProgress_cb_delegate;
|
|
static ShowUnmountProgressNativeDelegate ShowUnmountProgressVMCallback {
|
|
get {
|
|
if (ShowUnmountProgress_cb_delegate == null)
|
|
ShowUnmountProgress_cb_delegate = new ShowUnmountProgressNativeDelegate (ShowUnmountProgress_cb);
|
|
return ShowUnmountProgress_cb_delegate;
|
|
}
|
|
}
|
|
|
|
static void OverrideShowUnmountProgress (GLib.GType gtype)
|
|
{
|
|
OverrideShowUnmountProgress (gtype, ShowUnmountProgressVMCallback);
|
|
}
|
|
|
|
static void OverrideShowUnmountProgress (GLib.GType gtype, ShowUnmountProgressNativeDelegate callback)
|
|
{
|
|
unsafe {
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("show_unmount_progress"));
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void ShowUnmountProgressNativeDelegate (IntPtr inst, IntPtr message, long time_left, long bytes_left);
|
|
|
|
static void ShowUnmountProgress_cb (IntPtr inst, IntPtr message, long time_left, long bytes_left)
|
|
{
|
|
try {
|
|
MountOperation __obj = GLib.Object.GetObject (inst, false) as MountOperation;
|
|
__obj.OnShowUnmountProgress (GLib.Marshaller.Utf8PtrToString (message), time_left, bytes_left);
|
|
} catch (Exception e) {
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
|
}
|
|
}
|
|
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.MountOperation), ConnectionMethod="OverrideShowUnmountProgress")]
|
|
protected virtual void OnShowUnmountProgress (string message, long time_left, long bytes_left)
|
|
{
|
|
InternalShowUnmountProgress (message, time_left, bytes_left);
|
|
}
|
|
|
|
private void InternalShowUnmountProgress (string message, long time_left, long bytes_left)
|
|
{
|
|
ShowUnmountProgressNativeDelegate unmanaged = class_abi.BaseOverride<ShowUnmountProgressNativeDelegate>(this.LookupGType(), "show_unmount_progress");
|
|
if (unmanaged == null) return;
|
|
|
|
IntPtr native_message = GLib.Marshaller.StringToPtrGStrdup (message);
|
|
unmanaged (this.Handle, native_message, time_left, bytes_left);
|
|
GLib.Marshaller.Free (native_message);
|
|
}
|
|
|
|
|
|
// Internal representation of the wrapped structure ABI.
|
|
static GLib.AbiStruct _class_abi = null;
|
|
static public unsafe new GLib.AbiStruct class_abi {
|
|
get {
|
|
if (_class_abi == null)
|
|
_class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
|
|
new GLib.AbiField("ask_password"
|
|
, GLib.Object.class_abi.Fields
|
|
, (uint) sizeof( IntPtr ) // ask_password
|
|
, null
|
|
, "ask_question"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("ask_question"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // ask_question
|
|
, "ask_password"
|
|
, "reply"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("reply"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // reply
|
|
, "ask_question"
|
|
, "aborted"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("aborted"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // aborted
|
|
, "reply"
|
|
, "show_processes"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("show_processes"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // show_processes
|
|
, "aborted"
|
|
, "show_unmount_progress"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("show_unmount_progress"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // show_unmount_progress
|
|
, "show_processes"
|
|
, "_g_reserved1"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved1"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved1
|
|
, "show_unmount_progress"
|
|
, "_g_reserved2"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved2"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved2
|
|
, "_g_reserved1"
|
|
, "_g_reserved3"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved3"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved3
|
|
, "_g_reserved2"
|
|
, "_g_reserved4"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved4"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved4
|
|
, "_g_reserved3"
|
|
, "_g_reserved5"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved5"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved5
|
|
, "_g_reserved4"
|
|
, "_g_reserved6"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved6"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved6
|
|
, "_g_reserved5"
|
|
, "_g_reserved7"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved7"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved7
|
|
, "_g_reserved6"
|
|
, "_g_reserved8"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved8"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved8
|
|
, "_g_reserved7"
|
|
, "_g_reserved9"
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
new GLib.AbiField("_g_reserved9"
|
|
, -1
|
|
, (uint) sizeof( IntPtr ) // _g_reserved9
|
|
, "_g_reserved8"
|
|
, null
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
});
|
|
|
|
return _class_abi;
|
|
}
|
|
}
|
|
|
|
|
|
// End of the ABI representation.
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate IntPtr d_g_mount_operation_get_type();
|
|
static d_g_mount_operation_get_type g_mount_operation_get_type = FuncLoader.LoadFunction<d_g_mount_operation_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_get_type"));
|
|
|
|
public static new GLib.GType GType {
|
|
get {
|
|
IntPtr raw_ret = g_mount_operation_get_type();
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
|
delegate void d_g_mount_operation_reply(IntPtr raw, int result);
|
|
static d_g_mount_operation_reply g_mount_operation_reply = FuncLoader.LoadFunction<d_g_mount_operation_reply>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_mount_operation_reply"));
|
|
|
|
public void EmitReply(GLib.MountOperationResult result) {
|
|
g_mount_operation_reply(Handle, (int) result);
|
|
}
|
|
|
|
|
|
// Internal representation of the wrapped structure ABI.
|
|
static GLib.AbiStruct _abi_info = null;
|
|
static public unsafe new GLib.AbiStruct abi_info {
|
|
get {
|
|
if (_abi_info == null)
|
|
_abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
|
|
new GLib.AbiField("priv"
|
|
, GLib.Object.abi_info.Fields
|
|
, (uint) sizeof( IntPtr ) // priv
|
|
, null
|
|
, null
|
|
, (uint) sizeof(IntPtr)
|
|
, 0
|
|
),
|
|
});
|
|
|
|
return _abi_info;
|
|
}
|
|
}
|
|
|
|
|
|
// End of the ABI representation.
|
|
|
|
#endregion
|
|
}
|
|
}
|