1342 lines
45 KiB
C#
1342 lines
45 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 VolumeMonitor : GLib.Object {
|
||
|
|
|
||
|
|
public VolumeMonitor (IntPtr raw) : base(raw) {}
|
||
|
|
|
||
|
|
protected VolumeMonitor() : base(IntPtr.Zero)
|
||
|
|
{
|
||
|
|
CreateNativeObject (Array.Empty<string> (), Array.Empty<GLib.Value> ());
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("drive-changed")]
|
||
|
|
public event GLib.DriveChangedHandler DriveChanged {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("drive-changed", value, typeof (GLib.DriveChangedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("drive-changed", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("mount-pre-unmount")]
|
||
|
|
public event GLib.MountPreUnmountHandler MountPreUnmount {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("mount-pre-unmount", value, typeof (GLib.MountPreUnmountArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("mount-pre-unmount", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("drive-connected")]
|
||
|
|
public event GLib.DriveConnectedHandler DriveConnected {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("drive-connected", value, typeof (GLib.DriveConnectedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("drive-connected", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("drive-disconnected")]
|
||
|
|
public event GLib.DriveDisconnectedHandler DriveDisconnected {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("drive-disconnected", value, typeof (GLib.DriveDisconnectedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("drive-disconnected", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("mount-changed")]
|
||
|
|
public event GLib.MountChangedHandler MountChanged {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("mount-changed", value, typeof (GLib.MountChangedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("mount-changed", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("volume-changed")]
|
||
|
|
public event GLib.VolumeChangedHandler VolumeChanged {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("volume-changed", value, typeof (GLib.VolumeChangedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("volume-changed", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("mount-added")]
|
||
|
|
public event GLib.MountAddedHandler MountAdded {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("mount-added", value, typeof (GLib.MountAddedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("mount-added", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("volume-added")]
|
||
|
|
public event GLib.VolumeAddedHandler VolumeAdded {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("volume-added", value, typeof (GLib.VolumeAddedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("volume-added", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("volume-removed")]
|
||
|
|
public event GLib.VolumeRemovedHandler VolumeRemoved {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("volume-removed", value, typeof (GLib.VolumeRemovedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("volume-removed", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("mount-removed")]
|
||
|
|
public event GLib.MountRemovedHandler MountRemoved {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("mount-removed", value, typeof (GLib.MountRemovedArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("mount-removed", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("drive-stop-button")]
|
||
|
|
public event GLib.DriveStopButtonHandler DriveStopButton {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("drive-stop-button", value, typeof (GLib.DriveStopButtonArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("drive-stop-button", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.Signal("drive-eject-button")]
|
||
|
|
public event GLib.DriveEjectButtonHandler DriveEjectButton {
|
||
|
|
add {
|
||
|
|
this.AddSignalHandler ("drive-eject-button", value, typeof (GLib.DriveEjectButtonArgs));
|
||
|
|
}
|
||
|
|
remove {
|
||
|
|
this.RemoveSignalHandler ("drive-eject-button", value);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static VolumeAddedNativeDelegate VolumeAdded_cb_delegate;
|
||
|
|
static VolumeAddedNativeDelegate VolumeAddedVMCallback {
|
||
|
|
get {
|
||
|
|
if (VolumeAdded_cb_delegate == null)
|
||
|
|
VolumeAdded_cb_delegate = new VolumeAddedNativeDelegate (VolumeAdded_cb);
|
||
|
|
return VolumeAdded_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideVolumeAdded (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideVolumeAdded (gtype, VolumeAddedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideVolumeAdded (GLib.GType gtype, VolumeAddedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("volume_added"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void VolumeAddedNativeDelegate (IntPtr inst, IntPtr volume);
|
||
|
|
|
||
|
|
static void VolumeAdded_cb (IntPtr inst, IntPtr volume)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnVolumeAdded (GLib.VolumeAdapter.GetObject (volume, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideVolumeAdded")]
|
||
|
|
protected virtual void OnVolumeAdded (GLib.IVolume volume)
|
||
|
|
{
|
||
|
|
InternalVolumeAdded (volume);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalVolumeAdded (GLib.IVolume volume)
|
||
|
|
{
|
||
|
|
VolumeAddedNativeDelegate unmanaged = class_abi.BaseOverride<VolumeAddedNativeDelegate>(this.LookupGType(), "volume_added");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, volume == null ? IntPtr.Zero : ((volume is GLib.Object) ? (volume as GLib.Object).Handle : (volume as GLib.VolumeAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static VolumeRemovedNativeDelegate VolumeRemoved_cb_delegate;
|
||
|
|
static VolumeRemovedNativeDelegate VolumeRemovedVMCallback {
|
||
|
|
get {
|
||
|
|
if (VolumeRemoved_cb_delegate == null)
|
||
|
|
VolumeRemoved_cb_delegate = new VolumeRemovedNativeDelegate (VolumeRemoved_cb);
|
||
|
|
return VolumeRemoved_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideVolumeRemoved (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideVolumeRemoved (gtype, VolumeRemovedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideVolumeRemoved (GLib.GType gtype, VolumeRemovedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("volume_removed"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void VolumeRemovedNativeDelegate (IntPtr inst, IntPtr volume);
|
||
|
|
|
||
|
|
static void VolumeRemoved_cb (IntPtr inst, IntPtr volume)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnVolumeRemoved (GLib.VolumeAdapter.GetObject (volume, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideVolumeRemoved")]
|
||
|
|
protected virtual void OnVolumeRemoved (GLib.IVolume volume)
|
||
|
|
{
|
||
|
|
InternalVolumeRemoved (volume);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalVolumeRemoved (GLib.IVolume volume)
|
||
|
|
{
|
||
|
|
VolumeRemovedNativeDelegate unmanaged = class_abi.BaseOverride<VolumeRemovedNativeDelegate>(this.LookupGType(), "volume_removed");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, volume == null ? IntPtr.Zero : ((volume is GLib.Object) ? (volume as GLib.Object).Handle : (volume as GLib.VolumeAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static VolumeChangedNativeDelegate VolumeChanged_cb_delegate;
|
||
|
|
static VolumeChangedNativeDelegate VolumeChangedVMCallback {
|
||
|
|
get {
|
||
|
|
if (VolumeChanged_cb_delegate == null)
|
||
|
|
VolumeChanged_cb_delegate = new VolumeChangedNativeDelegate (VolumeChanged_cb);
|
||
|
|
return VolumeChanged_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideVolumeChanged (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideVolumeChanged (gtype, VolumeChangedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideVolumeChanged (GLib.GType gtype, VolumeChangedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("volume_changed"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void VolumeChangedNativeDelegate (IntPtr inst, IntPtr volume);
|
||
|
|
|
||
|
|
static void VolumeChanged_cb (IntPtr inst, IntPtr volume)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnVolumeChanged (GLib.VolumeAdapter.GetObject (volume, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideVolumeChanged")]
|
||
|
|
protected virtual void OnVolumeChanged (GLib.IVolume volume)
|
||
|
|
{
|
||
|
|
InternalVolumeChanged (volume);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalVolumeChanged (GLib.IVolume volume)
|
||
|
|
{
|
||
|
|
VolumeChangedNativeDelegate unmanaged = class_abi.BaseOverride<VolumeChangedNativeDelegate>(this.LookupGType(), "volume_changed");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, volume == null ? IntPtr.Zero : ((volume is GLib.Object) ? (volume as GLib.Object).Handle : (volume as GLib.VolumeAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static MountAddedNativeDelegate MountAdded_cb_delegate;
|
||
|
|
static MountAddedNativeDelegate MountAddedVMCallback {
|
||
|
|
get {
|
||
|
|
if (MountAdded_cb_delegate == null)
|
||
|
|
MountAdded_cb_delegate = new MountAddedNativeDelegate (MountAdded_cb);
|
||
|
|
return MountAdded_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountAdded (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideMountAdded (gtype, MountAddedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountAdded (GLib.GType gtype, MountAddedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("mount_added"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void MountAddedNativeDelegate (IntPtr inst, IntPtr mount);
|
||
|
|
|
||
|
|
static void MountAdded_cb (IntPtr inst, IntPtr mount)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnMountAdded (GLib.MountAdapter.GetObject (mount, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideMountAdded")]
|
||
|
|
protected virtual void OnMountAdded (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
InternalMountAdded (mount);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalMountAdded (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
MountAddedNativeDelegate unmanaged = class_abi.BaseOverride<MountAddedNativeDelegate>(this.LookupGType(), "mount_added");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, mount == null ? IntPtr.Zero : ((mount is GLib.Object) ? (mount as GLib.Object).Handle : (mount as GLib.MountAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static MountRemovedNativeDelegate MountRemoved_cb_delegate;
|
||
|
|
static MountRemovedNativeDelegate MountRemovedVMCallback {
|
||
|
|
get {
|
||
|
|
if (MountRemoved_cb_delegate == null)
|
||
|
|
MountRemoved_cb_delegate = new MountRemovedNativeDelegate (MountRemoved_cb);
|
||
|
|
return MountRemoved_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountRemoved (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideMountRemoved (gtype, MountRemovedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountRemoved (GLib.GType gtype, MountRemovedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("mount_removed"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void MountRemovedNativeDelegate (IntPtr inst, IntPtr mount);
|
||
|
|
|
||
|
|
static void MountRemoved_cb (IntPtr inst, IntPtr mount)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnMountRemoved (GLib.MountAdapter.GetObject (mount, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideMountRemoved")]
|
||
|
|
protected virtual void OnMountRemoved (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
InternalMountRemoved (mount);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalMountRemoved (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
MountRemovedNativeDelegate unmanaged = class_abi.BaseOverride<MountRemovedNativeDelegate>(this.LookupGType(), "mount_removed");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, mount == null ? IntPtr.Zero : ((mount is GLib.Object) ? (mount as GLib.Object).Handle : (mount as GLib.MountAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static MountPreUnmountNativeDelegate MountPreUnmount_cb_delegate;
|
||
|
|
static MountPreUnmountNativeDelegate MountPreUnmountVMCallback {
|
||
|
|
get {
|
||
|
|
if (MountPreUnmount_cb_delegate == null)
|
||
|
|
MountPreUnmount_cb_delegate = new MountPreUnmountNativeDelegate (MountPreUnmount_cb);
|
||
|
|
return MountPreUnmount_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountPreUnmount (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideMountPreUnmount (gtype, MountPreUnmountVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountPreUnmount (GLib.GType gtype, MountPreUnmountNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("mount_pre_unmount"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void MountPreUnmountNativeDelegate (IntPtr inst, IntPtr mount);
|
||
|
|
|
||
|
|
static void MountPreUnmount_cb (IntPtr inst, IntPtr mount)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnMountPreUnmount (GLib.MountAdapter.GetObject (mount, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideMountPreUnmount")]
|
||
|
|
protected virtual void OnMountPreUnmount (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
InternalMountPreUnmount (mount);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalMountPreUnmount (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
MountPreUnmountNativeDelegate unmanaged = class_abi.BaseOverride<MountPreUnmountNativeDelegate>(this.LookupGType(), "mount_pre_unmount");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, mount == null ? IntPtr.Zero : ((mount is GLib.Object) ? (mount as GLib.Object).Handle : (mount as GLib.MountAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static MountChangedNativeDelegate MountChanged_cb_delegate;
|
||
|
|
static MountChangedNativeDelegate MountChangedVMCallback {
|
||
|
|
get {
|
||
|
|
if (MountChanged_cb_delegate == null)
|
||
|
|
MountChanged_cb_delegate = new MountChangedNativeDelegate (MountChanged_cb);
|
||
|
|
return MountChanged_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountChanged (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideMountChanged (gtype, MountChangedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideMountChanged (GLib.GType gtype, MountChangedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("mount_changed"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void MountChangedNativeDelegate (IntPtr inst, IntPtr mount);
|
||
|
|
|
||
|
|
static void MountChanged_cb (IntPtr inst, IntPtr mount)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnMountChanged (GLib.MountAdapter.GetObject (mount, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideMountChanged")]
|
||
|
|
protected virtual void OnMountChanged (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
InternalMountChanged (mount);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalMountChanged (GLib.IMount mount)
|
||
|
|
{
|
||
|
|
MountChangedNativeDelegate unmanaged = class_abi.BaseOverride<MountChangedNativeDelegate>(this.LookupGType(), "mount_changed");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, mount == null ? IntPtr.Zero : ((mount is GLib.Object) ? (mount as GLib.Object).Handle : (mount as GLib.MountAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static DriveConnectedNativeDelegate DriveConnected_cb_delegate;
|
||
|
|
static DriveConnectedNativeDelegate DriveConnectedVMCallback {
|
||
|
|
get {
|
||
|
|
if (DriveConnected_cb_delegate == null)
|
||
|
|
DriveConnected_cb_delegate = new DriveConnectedNativeDelegate (DriveConnected_cb);
|
||
|
|
return DriveConnected_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveConnected (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideDriveConnected (gtype, DriveConnectedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveConnected (GLib.GType gtype, DriveConnectedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("drive_connected"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void DriveConnectedNativeDelegate (IntPtr inst, IntPtr drive);
|
||
|
|
|
||
|
|
static void DriveConnected_cb (IntPtr inst, IntPtr drive)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnDriveConnected (GLib.DriveAdapter.GetObject (drive, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideDriveConnected")]
|
||
|
|
protected virtual void OnDriveConnected (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
InternalDriveConnected (drive);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalDriveConnected (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
DriveConnectedNativeDelegate unmanaged = class_abi.BaseOverride<DriveConnectedNativeDelegate>(this.LookupGType(), "drive_connected");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, drive == null ? IntPtr.Zero : ((drive is GLib.Object) ? (drive as GLib.Object).Handle : (drive as GLib.DriveAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static DriveDisconnectedNativeDelegate DriveDisconnected_cb_delegate;
|
||
|
|
static DriveDisconnectedNativeDelegate DriveDisconnectedVMCallback {
|
||
|
|
get {
|
||
|
|
if (DriveDisconnected_cb_delegate == null)
|
||
|
|
DriveDisconnected_cb_delegate = new DriveDisconnectedNativeDelegate (DriveDisconnected_cb);
|
||
|
|
return DriveDisconnected_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveDisconnected (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideDriveDisconnected (gtype, DriveDisconnectedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveDisconnected (GLib.GType gtype, DriveDisconnectedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("drive_disconnected"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void DriveDisconnectedNativeDelegate (IntPtr inst, IntPtr drive);
|
||
|
|
|
||
|
|
static void DriveDisconnected_cb (IntPtr inst, IntPtr drive)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnDriveDisconnected (GLib.DriveAdapter.GetObject (drive, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideDriveDisconnected")]
|
||
|
|
protected virtual void OnDriveDisconnected (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
InternalDriveDisconnected (drive);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalDriveDisconnected (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
DriveDisconnectedNativeDelegate unmanaged = class_abi.BaseOverride<DriveDisconnectedNativeDelegate>(this.LookupGType(), "drive_disconnected");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, drive == null ? IntPtr.Zero : ((drive is GLib.Object) ? (drive as GLib.Object).Handle : (drive as GLib.DriveAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static DriveChangedNativeDelegate DriveChanged_cb_delegate;
|
||
|
|
static DriveChangedNativeDelegate DriveChangedVMCallback {
|
||
|
|
get {
|
||
|
|
if (DriveChanged_cb_delegate == null)
|
||
|
|
DriveChanged_cb_delegate = new DriveChangedNativeDelegate (DriveChanged_cb);
|
||
|
|
return DriveChanged_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveChanged (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideDriveChanged (gtype, DriveChangedVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveChanged (GLib.GType gtype, DriveChangedNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("drive_changed"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void DriveChangedNativeDelegate (IntPtr inst, IntPtr drive);
|
||
|
|
|
||
|
|
static void DriveChanged_cb (IntPtr inst, IntPtr drive)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnDriveChanged (GLib.DriveAdapter.GetObject (drive, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideDriveChanged")]
|
||
|
|
protected virtual void OnDriveChanged (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
InternalDriveChanged (drive);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalDriveChanged (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
DriveChangedNativeDelegate unmanaged = class_abi.BaseOverride<DriveChangedNativeDelegate>(this.LookupGType(), "drive_changed");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, drive == null ? IntPtr.Zero : ((drive is GLib.Object) ? (drive as GLib.Object).Handle : (drive as GLib.DriveAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static GetConnectedDrivesNativeDelegate GetConnectedDrives_cb_delegate;
|
||
|
|
static GetConnectedDrivesNativeDelegate GetConnectedDrivesVMCallback {
|
||
|
|
get {
|
||
|
|
if (GetConnectedDrives_cb_delegate == null)
|
||
|
|
GetConnectedDrives_cb_delegate = new GetConnectedDrivesNativeDelegate (GetConnectedDrives_cb);
|
||
|
|
return GetConnectedDrives_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetConnectedDrives (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideGetConnectedDrives (gtype, GetConnectedDrivesVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetConnectedDrives (GLib.GType gtype, GetConnectedDrivesNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_connected_drives"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr GetConnectedDrivesNativeDelegate (IntPtr inst);
|
||
|
|
|
||
|
|
static IntPtr GetConnectedDrives_cb (IntPtr inst)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
GLib.IDrive[] __result;
|
||
|
|
__result = __obj.OnGetConnectedDrives ();
|
||
|
|
return new GLib.List(__result, typeof (GLib.IDrive), true, true) == null ? IntPtr.Zero : new GLib.List(__result, typeof (GLib.IDrive), true, true).Handle;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideGetConnectedDrives")]
|
||
|
|
protected virtual GLib.IDrive[] OnGetConnectedDrives ()
|
||
|
|
{
|
||
|
|
return InternalGetConnectedDrives ();
|
||
|
|
}
|
||
|
|
|
||
|
|
private GLib.IDrive[] InternalGetConnectedDrives ()
|
||
|
|
{
|
||
|
|
GetConnectedDrivesNativeDelegate unmanaged = class_abi.BaseOverride<GetConnectedDrivesNativeDelegate>(this.LookupGType(), "get_connected_drives");
|
||
|
|
if (unmanaged == null) return null;
|
||
|
|
|
||
|
|
IntPtr __result = unmanaged (this.Handle);
|
||
|
|
return GLib.Marshaller.ListPtrToArray<GLib.IDrive, GLib.IDrive> (__result, true, true);
|
||
|
|
}
|
||
|
|
|
||
|
|
static GetVolumesNativeDelegate GetVolumes_cb_delegate;
|
||
|
|
static GetVolumesNativeDelegate GetVolumesVMCallback {
|
||
|
|
get {
|
||
|
|
if (GetVolumes_cb_delegate == null)
|
||
|
|
GetVolumes_cb_delegate = new GetVolumesNativeDelegate (GetVolumes_cb);
|
||
|
|
return GetVolumes_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetVolumes (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideGetVolumes (gtype, GetVolumesVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetVolumes (GLib.GType gtype, GetVolumesNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_volumes"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr GetVolumesNativeDelegate (IntPtr inst);
|
||
|
|
|
||
|
|
static IntPtr GetVolumes_cb (IntPtr inst)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
GLib.IVolume[] __result;
|
||
|
|
__result = __obj.OnGetVolumes ();
|
||
|
|
return new GLib.List(__result, typeof (GLib.IVolume), true, true) == null ? IntPtr.Zero : new GLib.List(__result, typeof (GLib.IVolume), true, true).Handle;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideGetVolumes")]
|
||
|
|
protected virtual GLib.IVolume[] OnGetVolumes ()
|
||
|
|
{
|
||
|
|
return InternalGetVolumes ();
|
||
|
|
}
|
||
|
|
|
||
|
|
private GLib.IVolume[] InternalGetVolumes ()
|
||
|
|
{
|
||
|
|
GetVolumesNativeDelegate unmanaged = class_abi.BaseOverride<GetVolumesNativeDelegate>(this.LookupGType(), "get_volumes");
|
||
|
|
if (unmanaged == null) return null;
|
||
|
|
|
||
|
|
IntPtr __result = unmanaged (this.Handle);
|
||
|
|
return GLib.Marshaller.ListPtrToArray<GLib.IVolume, GLib.IVolume> (__result, true, true);
|
||
|
|
}
|
||
|
|
|
||
|
|
static GetMountsNativeDelegate GetMounts_cb_delegate;
|
||
|
|
static GetMountsNativeDelegate GetMountsVMCallback {
|
||
|
|
get {
|
||
|
|
if (GetMounts_cb_delegate == null)
|
||
|
|
GetMounts_cb_delegate = new GetMountsNativeDelegate (GetMounts_cb);
|
||
|
|
return GetMounts_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetMounts (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideGetMounts (gtype, GetMountsVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetMounts (GLib.GType gtype, GetMountsNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_mounts"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr GetMountsNativeDelegate (IntPtr inst);
|
||
|
|
|
||
|
|
static IntPtr GetMounts_cb (IntPtr inst)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
GLib.IMount[] __result;
|
||
|
|
__result = __obj.OnGetMounts ();
|
||
|
|
return new GLib.List(__result, typeof (GLib.IMount), true, true) == null ? IntPtr.Zero : new GLib.List(__result, typeof (GLib.IMount), true, true).Handle;
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideGetMounts")]
|
||
|
|
protected virtual GLib.IMount[] OnGetMounts ()
|
||
|
|
{
|
||
|
|
return InternalGetMounts ();
|
||
|
|
}
|
||
|
|
|
||
|
|
private GLib.IMount[] InternalGetMounts ()
|
||
|
|
{
|
||
|
|
GetMountsNativeDelegate unmanaged = class_abi.BaseOverride<GetMountsNativeDelegate>(this.LookupGType(), "get_mounts");
|
||
|
|
if (unmanaged == null) return null;
|
||
|
|
|
||
|
|
IntPtr __result = unmanaged (this.Handle);
|
||
|
|
return GLib.Marshaller.ListPtrToArray<GLib.IMount, GLib.IMount> (__result, true, true);
|
||
|
|
}
|
||
|
|
|
||
|
|
static GetVolumeForUuidNativeDelegate GetVolumeForUuid_cb_delegate;
|
||
|
|
static GetVolumeForUuidNativeDelegate GetVolumeForUuidVMCallback {
|
||
|
|
get {
|
||
|
|
if (GetVolumeForUuid_cb_delegate == null)
|
||
|
|
GetVolumeForUuid_cb_delegate = new GetVolumeForUuidNativeDelegate (GetVolumeForUuid_cb);
|
||
|
|
return GetVolumeForUuid_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetVolumeForUuid (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideGetVolumeForUuid (gtype, GetVolumeForUuidVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetVolumeForUuid (GLib.GType gtype, GetVolumeForUuidNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_volume_for_uuid"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr GetVolumeForUuidNativeDelegate (IntPtr inst, IntPtr uuid);
|
||
|
|
|
||
|
|
static IntPtr GetVolumeForUuid_cb (IntPtr inst, IntPtr uuid)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
GLib.IVolume __result;
|
||
|
|
__result = __obj.OnGetVolumeForUuid (GLib.Marshaller.Utf8PtrToString (uuid));
|
||
|
|
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.VolumeAdapter).Handle);
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideGetVolumeForUuid")]
|
||
|
|
protected virtual GLib.IVolume OnGetVolumeForUuid (string uuid)
|
||
|
|
{
|
||
|
|
return InternalGetVolumeForUuid (uuid);
|
||
|
|
}
|
||
|
|
|
||
|
|
private GLib.IVolume InternalGetVolumeForUuid (string uuid)
|
||
|
|
{
|
||
|
|
GetVolumeForUuidNativeDelegate unmanaged = class_abi.BaseOverride<GetVolumeForUuidNativeDelegate>(this.LookupGType(), "get_volume_for_uuid");
|
||
|
|
if (unmanaged == null) return null;
|
||
|
|
|
||
|
|
IntPtr native_uuid = GLib.Marshaller.StringToPtrGStrdup (uuid);
|
||
|
|
IntPtr __result = unmanaged (this.Handle, native_uuid);
|
||
|
|
GLib.Marshaller.Free (native_uuid);
|
||
|
|
return GLib.VolumeAdapter.GetObject (__result, false);
|
||
|
|
}
|
||
|
|
|
||
|
|
static GetMountForUuidNativeDelegate GetMountForUuid_cb_delegate;
|
||
|
|
static GetMountForUuidNativeDelegate GetMountForUuidVMCallback {
|
||
|
|
get {
|
||
|
|
if (GetMountForUuid_cb_delegate == null)
|
||
|
|
GetMountForUuid_cb_delegate = new GetMountForUuidNativeDelegate (GetMountForUuid_cb);
|
||
|
|
return GetMountForUuid_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetMountForUuid (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideGetMountForUuid (gtype, GetMountForUuidVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideGetMountForUuid (GLib.GType gtype, GetMountForUuidNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_mount_for_uuid"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr GetMountForUuidNativeDelegate (IntPtr inst, IntPtr uuid);
|
||
|
|
|
||
|
|
static IntPtr GetMountForUuid_cb (IntPtr inst, IntPtr uuid)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
GLib.IMount __result;
|
||
|
|
__result = __obj.OnGetMountForUuid (GLib.Marshaller.Utf8PtrToString (uuid));
|
||
|
|
return __result == null ? IntPtr.Zero : ((__result is GLib.Object) ? (__result as GLib.Object).Handle : (__result as GLib.MountAdapter).Handle);
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, true);
|
||
|
|
// NOTREACHED: above call does not return.
|
||
|
|
throw;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideGetMountForUuid")]
|
||
|
|
protected virtual GLib.IMount OnGetMountForUuid (string uuid)
|
||
|
|
{
|
||
|
|
return InternalGetMountForUuid (uuid);
|
||
|
|
}
|
||
|
|
|
||
|
|
private GLib.IMount InternalGetMountForUuid (string uuid)
|
||
|
|
{
|
||
|
|
GetMountForUuidNativeDelegate unmanaged = class_abi.BaseOverride<GetMountForUuidNativeDelegate>(this.LookupGType(), "get_mount_for_uuid");
|
||
|
|
if (unmanaged == null) return null;
|
||
|
|
|
||
|
|
IntPtr native_uuid = GLib.Marshaller.StringToPtrGStrdup (uuid);
|
||
|
|
IntPtr __result = unmanaged (this.Handle, native_uuid);
|
||
|
|
GLib.Marshaller.Free (native_uuid);
|
||
|
|
return GLib.MountAdapter.GetObject (__result, false);
|
||
|
|
}
|
||
|
|
|
||
|
|
static DriveEjectButtonNativeDelegate DriveEjectButton_cb_delegate;
|
||
|
|
static DriveEjectButtonNativeDelegate DriveEjectButtonVMCallback {
|
||
|
|
get {
|
||
|
|
if (DriveEjectButton_cb_delegate == null)
|
||
|
|
DriveEjectButton_cb_delegate = new DriveEjectButtonNativeDelegate (DriveEjectButton_cb);
|
||
|
|
return DriveEjectButton_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveEjectButton (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideDriveEjectButton (gtype, DriveEjectButtonVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveEjectButton (GLib.GType gtype, DriveEjectButtonNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("drive_eject_button"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void DriveEjectButtonNativeDelegate (IntPtr inst, IntPtr drive);
|
||
|
|
|
||
|
|
static void DriveEjectButton_cb (IntPtr inst, IntPtr drive)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnDriveEjectButton (GLib.DriveAdapter.GetObject (drive, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideDriveEjectButton")]
|
||
|
|
protected virtual void OnDriveEjectButton (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
InternalDriveEjectButton (drive);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalDriveEjectButton (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
DriveEjectButtonNativeDelegate unmanaged = class_abi.BaseOverride<DriveEjectButtonNativeDelegate>(this.LookupGType(), "drive_eject_button");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, drive == null ? IntPtr.Zero : ((drive is GLib.Object) ? (drive as GLib.Object).Handle : (drive as GLib.DriveAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
static DriveStopButtonNativeDelegate DriveStopButton_cb_delegate;
|
||
|
|
static DriveStopButtonNativeDelegate DriveStopButtonVMCallback {
|
||
|
|
get {
|
||
|
|
if (DriveStopButton_cb_delegate == null)
|
||
|
|
DriveStopButton_cb_delegate = new DriveStopButtonNativeDelegate (DriveStopButton_cb);
|
||
|
|
return DriveStopButton_cb_delegate;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveStopButton (GLib.GType gtype)
|
||
|
|
{
|
||
|
|
OverrideDriveStopButton (gtype, DriveStopButtonVMCallback);
|
||
|
|
}
|
||
|
|
|
||
|
|
static void OverrideDriveStopButton (GLib.GType gtype, DriveStopButtonNativeDelegate callback)
|
||
|
|
{
|
||
|
|
unsafe {
|
||
|
|
IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("drive_stop_button"));
|
||
|
|
*raw_ptr = Marshal.GetFunctionPointerForDelegate(callback);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate void DriveStopButtonNativeDelegate (IntPtr inst, IntPtr drive);
|
||
|
|
|
||
|
|
static void DriveStopButton_cb (IntPtr inst, IntPtr drive)
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
VolumeMonitor __obj = GLib.Object.GetObject (inst, false) as VolumeMonitor;
|
||
|
|
__obj.OnDriveStopButton (GLib.DriveAdapter.GetObject (drive, false));
|
||
|
|
} catch (Exception e) {
|
||
|
|
GLib.ExceptionManager.RaiseUnhandledException (e, false);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[GLib.DefaultSignalHandler(Type=typeof(GLib.VolumeMonitor), ConnectionMethod="OverrideDriveStopButton")]
|
||
|
|
protected virtual void OnDriveStopButton (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
InternalDriveStopButton (drive);
|
||
|
|
}
|
||
|
|
|
||
|
|
private void InternalDriveStopButton (GLib.IDrive drive)
|
||
|
|
{
|
||
|
|
DriveStopButtonNativeDelegate unmanaged = class_abi.BaseOverride<DriveStopButtonNativeDelegate>(this.LookupGType(), "drive_stop_button");
|
||
|
|
if (unmanaged == null) return;
|
||
|
|
|
||
|
|
unmanaged (this.Handle, drive == null ? IntPtr.Zero : ((drive is GLib.Object) ? (drive as GLib.Object).Handle : (drive as GLib.DriveAdapter).Handle));
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 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("volume_added"
|
||
|
|
, GLib.Object.class_abi.Fields
|
||
|
|
, (uint) sizeof( IntPtr ) // volume_added
|
||
|
|
, null
|
||
|
|
, "volume_removed"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("volume_removed"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // volume_removed
|
||
|
|
, "volume_added"
|
||
|
|
, "volume_changed"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("volume_changed"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // volume_changed
|
||
|
|
, "volume_removed"
|
||
|
|
, "mount_added"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("mount_added"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // mount_added
|
||
|
|
, "volume_changed"
|
||
|
|
, "mount_removed"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("mount_removed"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // mount_removed
|
||
|
|
, "mount_added"
|
||
|
|
, "mount_pre_unmount"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("mount_pre_unmount"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // mount_pre_unmount
|
||
|
|
, "mount_removed"
|
||
|
|
, "mount_changed"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("mount_changed"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // mount_changed
|
||
|
|
, "mount_pre_unmount"
|
||
|
|
, "drive_connected"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("drive_connected"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // drive_connected
|
||
|
|
, "mount_changed"
|
||
|
|
, "drive_disconnected"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("drive_disconnected"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // drive_disconnected
|
||
|
|
, "drive_connected"
|
||
|
|
, "drive_changed"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("drive_changed"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // drive_changed
|
||
|
|
, "drive_disconnected"
|
||
|
|
, "is_supported"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("is_supported"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // is_supported
|
||
|
|
, "drive_changed"
|
||
|
|
, "get_connected_drives"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("get_connected_drives"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // get_connected_drives
|
||
|
|
, "is_supported"
|
||
|
|
, "get_volumes"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("get_volumes"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // get_volumes
|
||
|
|
, "get_connected_drives"
|
||
|
|
, "get_mounts"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("get_mounts"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // get_mounts
|
||
|
|
, "get_volumes"
|
||
|
|
, "get_volume_for_uuid"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("get_volume_for_uuid"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // get_volume_for_uuid
|
||
|
|
, "get_mounts"
|
||
|
|
, "get_mount_for_uuid"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("get_mount_for_uuid"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // get_mount_for_uuid
|
||
|
|
, "get_volume_for_uuid"
|
||
|
|
, "adopt_orphan_mount"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("adopt_orphan_mount"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // adopt_orphan_mount
|
||
|
|
, "get_mount_for_uuid"
|
||
|
|
, "drive_eject_button"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("drive_eject_button"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // drive_eject_button
|
||
|
|
, "adopt_orphan_mount"
|
||
|
|
, "drive_stop_button"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("drive_stop_button"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // drive_stop_button
|
||
|
|
, "drive_eject_button"
|
||
|
|
, "_g_reserved1"
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
new GLib.AbiField("_g_reserved1"
|
||
|
|
, -1
|
||
|
|
, (uint) sizeof( IntPtr ) // _g_reserved1
|
||
|
|
, "drive_stop_button"
|
||
|
|
, "_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"
|
||
|
|
, null
|
||
|
|
, (uint) sizeof(IntPtr)
|
||
|
|
, 0
|
||
|
|
),
|
||
|
|
});
|
||
|
|
|
||
|
|
return _class_abi;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// End of the ABI representation.
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_adopt_orphan_mount(IntPtr mount);
|
||
|
|
static d_g_volume_monitor_adopt_orphan_mount g_volume_monitor_adopt_orphan_mount = FuncLoader.LoadFunction<d_g_volume_monitor_adopt_orphan_mount>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_adopt_orphan_mount"));
|
||
|
|
|
||
|
|
[Obsolete]
|
||
|
|
public static GLib.IVolume AdoptOrphanMount(GLib.IMount mount) {
|
||
|
|
IntPtr raw_ret = g_volume_monitor_adopt_orphan_mount(mount == null ? IntPtr.Zero : ((mount is GLib.Object) ? (mount as GLib.Object).Handle : (mount as GLib.MountAdapter).Handle));
|
||
|
|
GLib.IVolume ret = GLib.VolumeAdapter.GetObject (raw_ret, false);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get();
|
||
|
|
static d_g_volume_monitor_get g_volume_monitor_get = FuncLoader.LoadFunction<d_g_volume_monitor_get>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get"));
|
||
|
|
|
||
|
|
public static GLib.VolumeMonitor Default {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get();
|
||
|
|
GLib.VolumeMonitor ret = GLib.Object.GetObject(raw_ret) as GLib.VolumeMonitor;
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get_connected_drives(IntPtr raw);
|
||
|
|
static d_g_volume_monitor_get_connected_drives g_volume_monitor_get_connected_drives = FuncLoader.LoadFunction<d_g_volume_monitor_get_connected_drives>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get_connected_drives"));
|
||
|
|
|
||
|
|
public GLib.IDrive[] ConnectedDrives {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get_connected_drives(Handle);
|
||
|
|
GLib.IDrive[] ret = GLib.Marshaller.ListPtrToArray<GLib.IDrive, GLib.IDrive> (raw_ret, true, true);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get_mount_for_uuid(IntPtr raw, IntPtr uuid);
|
||
|
|
static d_g_volume_monitor_get_mount_for_uuid g_volume_monitor_get_mount_for_uuid = FuncLoader.LoadFunction<d_g_volume_monitor_get_mount_for_uuid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get_mount_for_uuid"));
|
||
|
|
|
||
|
|
public GLib.IMount GetMountForUuid(string uuid) {
|
||
|
|
IntPtr native_uuid = GLib.Marshaller.StringToPtrGStrdup (uuid);
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get_mount_for_uuid(Handle, native_uuid);
|
||
|
|
GLib.IMount ret = GLib.MountAdapter.GetObject (raw_ret, false);
|
||
|
|
GLib.Marshaller.Free (native_uuid);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get_mounts(IntPtr raw);
|
||
|
|
static d_g_volume_monitor_get_mounts g_volume_monitor_get_mounts = FuncLoader.LoadFunction<d_g_volume_monitor_get_mounts>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get_mounts"));
|
||
|
|
|
||
|
|
public GLib.IMount[] Mounts {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get_mounts(Handle);
|
||
|
|
GLib.IMount[] ret = GLib.Marshaller.ListPtrToArray<GLib.IMount, GLib.IMount> (raw_ret, true, true);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get_type();
|
||
|
|
static d_g_volume_monitor_get_type g_volume_monitor_get_type = FuncLoader.LoadFunction<d_g_volume_monitor_get_type>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get_type"));
|
||
|
|
|
||
|
|
public static new GLib.GType GType {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get_type();
|
||
|
|
GLib.GType ret = new GLib.GType(raw_ret);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get_volume_for_uuid(IntPtr raw, IntPtr uuid);
|
||
|
|
static d_g_volume_monitor_get_volume_for_uuid g_volume_monitor_get_volume_for_uuid = FuncLoader.LoadFunction<d_g_volume_monitor_get_volume_for_uuid>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get_volume_for_uuid"));
|
||
|
|
|
||
|
|
public GLib.IVolume GetVolumeForUuid(string uuid) {
|
||
|
|
IntPtr native_uuid = GLib.Marshaller.StringToPtrGStrdup (uuid);
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get_volume_for_uuid(Handle, native_uuid);
|
||
|
|
GLib.IVolume ret = GLib.VolumeAdapter.GetObject (raw_ret, false);
|
||
|
|
GLib.Marshaller.Free (native_uuid);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
|
||
|
|
[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
|
||
|
|
delegate IntPtr d_g_volume_monitor_get_volumes(IntPtr raw);
|
||
|
|
static d_g_volume_monitor_get_volumes g_volume_monitor_get_volumes = FuncLoader.LoadFunction<d_g_volume_monitor_get_volumes>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_volume_monitor_get_volumes"));
|
||
|
|
|
||
|
|
public GLib.IVolume[] Volumes {
|
||
|
|
get {
|
||
|
|
IntPtr raw_ret = g_volume_monitor_get_volumes(Handle);
|
||
|
|
GLib.IVolume[] ret = GLib.Marshaller.ListPtrToArray<GLib.IVolume, GLib.IVolume> (raw_ret, true, true);
|
||
|
|
return ret;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
// 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
|
||
|
|
}
|
||
|
|
}
|