示例#1
0
        public void EjectWithOperation(MountUnmountFlags flags, MountOperation mount_operation, Cancellable cancellable, AsyncReadyCallback cb)
        {
            var cb_wrapper = new GLibSharp.AsyncReadyCallbackWrapper(cb);

            cb_wrapper.PersistUntilCalled();
            g_drive_eject_with_operation(Handle, (int)flags, mount_operation == null ? IntPtr.Zero : mount_operation.Handle, cancellable == null ? IntPtr.Zero : cancellable.Handle, cb_wrapper.NativeDelegate, IntPtr.Zero);
        }
示例#2
0
 static void showprocesses_cb(IntPtr op, IntPtr message, IntPtr processes, IntPtr[] choices)
 {
     try {
         MountOperation op_managed = GLib.Object.GetObject(op, false) as MountOperation;
         op_managed.OnShowProcesses(GLib.Marshaller.Utf8PtrToString(message), processes, GLib.Marshaller.Utf8PtrToString(choices));
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
示例#3
0
 static void askquestion_cb(IntPtr op, IntPtr message, IntPtr[] choices)
 {
     try {
         MountOperation op_managed = GLib.Object.GetObject(op, false) as MountOperation;
         op_managed.OnAskQuestion(GLib.Marshaller.Utf8PtrToString(message), GLib.Marshaller.Utf8PtrToString(choices));
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
示例#4
0
 static void askpassword_cb(IntPtr op, IntPtr message, IntPtr default_user, IntPtr default_domain, int flags)
 {
     try {
         MountOperation op_managed = GLib.Object.GetObject(op, false) as MountOperation;
         op_managed.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);
     }
 }
示例#5
0
 static void reply_cb(IntPtr op, int result)
 {
     try {
         MountOperation op_managed = GLib.Object.GetObject(op, false) as MountOperation;
         op_managed.OnReply((GLib.MountOperationResult)result);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
示例#6
0
 static void aborted_cb(IntPtr op)
 {
     try {
         MountOperation op_managed = GLib.Object.GetObject(op, false) as MountOperation;
         op_managed.OnAborted();
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
示例#7
0
 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);
     }
 }
示例#8
0
 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);
     }
 }
示例#9
0
 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);
     }
 }
示例#10
0
 public static void EjectWithOperation(this GLib.Mount m, MountUnmountFlags flags, GLib.MountOperation operation,
                                       Cancellable cancellable, AsyncReadyCallback callback)
 {
     m.MaybeEmptyTrashWithAction(() => {
         NativeInterop.EjectWithOperation(m, flags, operation, cancellable, callback);
     });
 }