glibmm 2.80.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gio::Mount Class Reference

The Mount interface represents user-visible mounts. More...

#include <giomm/mount.h>

Inheritance diagram for Gio::Mount:
Inheritance graph
[legend]

Public Types

enum class  UnmountFlags {
  NONE = 0x0 ,
  FORCE = (1 << 0)
}
 
enum class  MountFlags { NONE = 0x0 }
 

Public Member Functions

 Mount (Mount &&src) noexcept
 
Mountoperator= (Mount &&src) noexcept
 
 ~Mount () noexcept override
 
GMountgobj ()
 Provides access to the underlying C GObject.
 
const GMountgobj () const
 Provides access to the underlying C GObject.
 
Glib::RefPtr< Fileget_root ()
 Gets the root directory on mount.
 
Glib::RefPtr< const Fileget_root () const
 Gets the root directory on mount.
 
std::string get_name () const
 Gets the name of mount.
 
Glib::RefPtr< Iconget_icon ()
 Gets the icon for mount.
 
Glib::RefPtr< const Iconget_icon () const
 Gets the icon for mount.
 
Glib::RefPtr< Iconget_symbolic_icon ()
 Gets the symbolic icon for mount.
 
Glib::RefPtr< const Iconget_symbolic_icon () const
 Gets the symbolic icon for mount.
 
std::string get_uuid () const
 Gets the UUID for the mount.
 
Glib::RefPtr< Volumeget_volume ()
 Gets the volume for the mount.
 
Glib::RefPtr< const Volumeget_volume () const
 Gets the volume for the mount.
 
Glib::RefPtr< Driveget_drive ()
 Gets the drive for the mount.
 
Glib::RefPtr< const Driveget_drive () const
 Gets the drive for the mount.
 
bool can_unmount () const
 Checks if mount can be unmounted.
 
bool can_eject () const
 Checks if mount can be ejected.
 
void unmount (const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, UnmountFlags flags=UnmountFlags::NONE)
 
void unmount (const SlotAsyncReady &slot, UnmountFlags flags=UnmountFlags::NONE)
 
void unmount (UnmountFlags flags=UnmountFlags::NONE)
 
void unmount (const Glib::RefPtr< MountOperation > &mount_operation, UnmountFlags flags=UnmountFlags::NONE)
 
void unmount (const Glib::RefPtr< MountOperation > &mount_operation, const SlotAsyncReady &slot, UnmountFlags flags=UnmountFlags::NONE)
 
void unmount (const Glib::RefPtr< MountOperation > &mount_operation, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, UnmountFlags flags=UnmountFlags::NONE)
 
bool unmount_finish (const Glib::RefPtr< AsyncResult > &result)
 Finishes unmounting a mount.
 
void remount (const Glib::RefPtr< MountOperation > &operation, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, MountFlags flags=MountFlags::NONE)
 Remounts a mount.
 
void remount (const Glib::RefPtr< MountOperation > &operation, const SlotAsyncReady &slot, MountFlags flags=MountFlags::NONE)
 Remounts a mount.
 
void remount (const Glib::RefPtr< MountOperation > &operation, MountFlags flags=MountFlags::NONE)
 Remounts a mount.
 
void remount (MountFlags flags=MountFlags::NONE)
 Remounts a mount, without user interaction.
 
bool remount_finish (const Glib::RefPtr< AsyncResult > &result)
 Finishes remounting a mount.
 
void eject (const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, UnmountFlags flags=UnmountFlags::NONE)
 
void eject (const SlotAsyncReady &slot, UnmountFlags flags=UnmountFlags::NONE)
 
void eject (UnmountFlags flags=UnmountFlags::NONE)
 
void eject (const Glib::RefPtr< MountOperation > &mount_operation, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, UnmountFlags flags=UnmountFlags::NONE)
 
void eject (const Glib::RefPtr< MountOperation > &mount_operation, const SlotAsyncReady &slot, UnmountFlags flags=UnmountFlags::NONE)
 
void eject (const Glib::RefPtr< MountOperation > &mount_operation, UnmountFlags flags=UnmountFlags::NONE)
 
bool eject_finish (const Glib::RefPtr< AsyncResult > &result)
 Finishes ejecting a mount.
 
void guess_content_type (const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, bool force_rescan=true)
 Tries to guess the type of content stored on the mount.
 
void guess_content_type (const SlotAsyncReady &slot, bool force_rescan=true)
 Tries to guess the type of content stored on the mount.
 
void guess_content_type (bool force_rescan=true)
 Tries to guess the type of content stored on the mount.
 
void guess_content_type_sync (const Glib::RefPtr< Cancellable > &cancellable, bool force_rescan=true)
 
void guess_content_type_sync (bool force_rescan=true)
 
std::vector< Glib::ustringguess_content_type_finish (const Glib::RefPtr< AsyncResult > &result)
 Finishes guessing content types of the Mount.
 
bool is_shadowed () const
 Determines if mount is shadowed.
 
void shadow ()
 Increments the shadow count on mount.
 
void unshadow ()
 Decrements the shadow count on mount.
 
Glib::RefPtr< Fileget_default_location () const
 Gets the default location of mount.
 
Glib::ustring get_sort_key () const
 Gets the sort key for mount, if any.
 
Glib::SignalProxy< void()> signal_changed ()
 
Glib::SignalProxy< void()> signal_unmounted ()
 
Glib::SignalProxy< void()> signal_pre_unmount ()
 
- Public Member Functions inherited from Glib::Interface
 Interface ()
 A Default constructor.
 
 Interface (Interface &&src) noexcept
 
Interfaceoperator= (Interface &&src) noexcept
 
 Interface (const Glib::Interface_Class &interface_class)
 Called by constructors of derived classes.
 
 Interface (GObject *castitem)
 Called by constructors of derived classes.
 
 ~Interface () noexcept override
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
GObject * gobj ()
 
const GObject * gobj () const
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring & property_name, const Glib::ValueBase & value)
 You probably want to use a specific property_*() accessor method instead.
 
void get_property_value (const Glib::ustring & property_name, Glib::ValueBase & value) const
 You probably want to use a specific property_*() accessor method instead.
 
template<class PropertyType >
void set_property (const Glib::ustring & property_name, const PropertyType & value)
 You probably want to use a specific property_*() accessor method instead.
 
template<class PropertyType >
void get_property (const Glib::ustring & property_name, PropertyType & value) const
 You probably want to use a specific property_*() accessor method instead.
 
template<class PropertyType >
PropertyType get_property (const Glib::ustring & property_name) const
 You probably want to use a specific property_*() accessor method instead.
 
sigc::connection connect_property_changed (const Glib::ustring & property_name, const sigc::slot< void()> &slot)
 You can use the signal_changed() signal of the property proxy instead.
 
sigc::connection connect_property_changed (const Glib::ustring & property_name, sigc::slot< void()> &&slot)
 You can use the signal_changed() signal of the property proxy instead.
 
void freeze_notify ()
 Increases the freeze count on object.
 
void thaw_notify ()
 Reverts the effect of a previous call to freeze_notify().
 
virtual void reference () const
 Increment the reference count for this object.
 
virtual void unreference () const
 Decrement the reference count for this object.
 
GObject * gobj ()
 Provides access to the underlying C GObject.
 
const GObject * gobj () const
 Provides access to the underlying C GObject.
 
GObject * gobj_copy () const
 Give a ref-ed copy to someone. Use for direct struct access.
 

Static Public Member Functions

static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system.
 

Protected Member Functions

 Mount ()
 You should derive from this class to use it.
 
virtual void on_changed ()
 This is a default handler for the signal signal_changed().
 
virtual void on_unmounted ()
 This is a default handler for the signal signal_unmounted().
 
virtual void on_pre_unmount ()
 This is a default handler for the signal signal_pre_unmount().
 
- Protected Member Functions inherited from Glib::ObjectBase
 ObjectBase ()
 This default constructor is called implicitly from the constructor of user-derived classes, even if, for instance, Gtk::Button calls a different ObjectBase constructor.
 
 ObjectBase (const char *custom_type_name)
 A derived constructor always overrides this choice.
 
 ObjectBase (const std::type_info &custom_type_info)
 This constructor is a special feature to allow creation of derived types on the fly, without having to use g_object_new() manually.
 
 ObjectBase (ObjectBase &&src) noexcept
 
ObjectBaseoperator= (ObjectBase &&src) noexcept
 
virtual ~ObjectBase () noexcept=0
 
void initialize (GObject *castitem)
 
void initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Gio::Mountwrap (GMount *object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Detailed Description

The Mount interface represents user-visible mounts.

Mount is a "mounted" filesystem that you can access. Mounted is in quotes because it's not the same as a unix mount: it might be a gvfs mount, but you can still access the files on it if you use GIO. It might or might not be related to a volume object.

Unmounting a Mount instance is an asynchronous operation. For more information about asynchronous operations, see AsyncReady. To unmount a Mount instance, first call unmount(). The callback slot will be called when the operation has resolved (either with success or failure), and a AsyncReady structure will be passed to the callback. That callback should then call unmount_finish() with the AsyncReady data to see if the operation was completed successfully.

Since glibmm 2.16:

Member Enumeration Documentation

◆ MountFlags

Enumerator
NONE 

◆ UnmountFlags

Enumerator
NONE 

No flags set.

FORCE 

Unmount even if there are outstanding file operations on the mount.

Constructor & Destructor Documentation

◆ Mount() [1/2]

Gio::Mount::Mount ( )
protected

You should derive from this class to use it.

◆ Mount() [2/2]

Gio::Mount::Mount ( Mount &&  src)
noexcept

◆ ~Mount()

Gio::Mount::~Mount ( )
overridenoexcept

Member Function Documentation

◆ add_interface()

static void Gio::Mount::add_interface ( GType  gtype_implementer)
static

◆ can_eject()

bool Gio::Mount::can_eject ( ) const

Checks if mount can be ejected.

Returns
true if the mount can be ejected.

◆ can_unmount()

bool Gio::Mount::can_unmount ( ) const

Checks if mount can be unmounted.

Returns
true if the mount can be unmounted.

◆ eject() [1/6]

void Gio::Mount::eject ( const Glib::RefPtr< MountOperation > &  mount_operation,
const SlotAsyncReady &  slot,
const Glib::RefPtr< Cancellable > &  cancellable,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ eject() [2/6]

void Gio::Mount::eject ( const Glib::RefPtr< MountOperation > &  mount_operation,
const SlotAsyncReady &  slot,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ eject() [3/6]

void Gio::Mount::eject ( const Glib::RefPtr< MountOperation > &  mount_operation,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ eject() [4/6]

void Gio::Mount::eject ( const SlotAsyncReady &  slot,
const Glib::RefPtr< Cancellable > &  cancellable,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ eject() [5/6]

void Gio::Mount::eject ( const SlotAsyncReady &  slot,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ eject() [6/6]

void Gio::Mount::eject ( UnmountFlags  flags = UnmountFlags::NONE)

◆ eject_finish()

bool Gio::Mount::eject_finish ( const Glib::RefPtr< AsyncResult > &  result)

Finishes ejecting a mount.

If any errors occurred during the operation, error will be set to contain the errors and false will be returned.

Since glibmm 2.22:
Parameters
resultA AsyncResult.
Returns
true if the mount was successfully ejected. false otherwise.
Exceptions
Glib::Error

◆ get_default_location()

Glib::RefPtr< File > Gio::Mount::get_default_location ( ) const

Gets the default location of mount.

The default location of the given mount is a path that reflects the main entry point for the user (e.g. the home directory, or the root of the volume).

Returns
A File. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_drive() [1/2]

Glib::RefPtr< Drive > Gio::Mount::get_drive ( )

Gets the drive for the mount.

This is a convenience method for getting the Volume and then using that object to get the Drive.

Returns
A Drive or nullptr if mount is not associated with a volume or a drive. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_drive() [2/2]

Glib::RefPtr< const Drive > Gio::Mount::get_drive ( ) const

Gets the drive for the mount.

This is a convenience method for getting the Volume and then using that object to get the Drive.

Returns
A Drive or nullptr if mount is not associated with a volume or a drive. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_icon() [1/2]

Glib::RefPtr< Icon > Gio::Mount::get_icon ( )

Gets the icon for mount.

Returns
A Icon. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_icon() [2/2]

Glib::RefPtr< const Icon > Gio::Mount::get_icon ( ) const

Gets the icon for mount.

Returns
A Icon. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_name()

std::string Gio::Mount::get_name ( ) const

Gets the name of mount.

Returns
The name for the given mount.

◆ get_root() [1/2]

Glib::RefPtr< File > Gio::Mount::get_root ( )

Gets the root directory on mount.

Returns
A File. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_root() [2/2]

Glib::RefPtr< const File > Gio::Mount::get_root ( ) const

Gets the root directory on mount.

Returns
A File. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_sort_key()

Glib::ustring Gio::Mount::get_sort_key ( ) const

Gets the sort key for mount, if any.

Since glibmm 2.32:
Returns
Sorting key for mount or nullptr if no such key is available.

◆ get_symbolic_icon() [1/2]

Glib::RefPtr< Icon > Gio::Mount::get_symbolic_icon ( )

Gets the symbolic icon for mount.

Since glibmm 2.34:
Returns
A Icon. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_symbolic_icon() [2/2]

Glib::RefPtr< const Icon > Gio::Mount::get_symbolic_icon ( ) const

Gets the symbolic icon for mount.

Since glibmm 2.34:
Returns
A Icon. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_type()

static GType Gio::Mount::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ get_uuid()

std::string Gio::Mount::get_uuid ( ) const

Gets the UUID for the mount.

The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns nullptr if there is no UUID available.

Returns
The UUID for mount or nullptr if no UUID can be computed.

◆ get_volume() [1/2]

Glib::RefPtr< Volume > Gio::Mount::get_volume ( )

Gets the volume for the mount.

Returns
A Volume or nullptr if mount is not associated with a volume. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ get_volume() [2/2]

Glib::RefPtr< const Volume > Gio::Mount::get_volume ( ) const

Gets the volume for the mount.

Returns
A Volume or nullptr if mount is not associated with a volume. The returned object should be unreffed with Glib::object_unref() when no longer needed.

◆ gobj() [1/2]

GMount * Gio::Mount::gobj ( )
inline

Provides access to the underlying C GObject.

◆ gobj() [2/2]

const GMount * Gio::Mount::gobj ( ) const
inline

Provides access to the underlying C GObject.

◆ guess_content_type() [1/3]

void Gio::Mount::guess_content_type ( bool  force_rescan = true)

Tries to guess the type of content stored on the mount.

Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.

Parameters
force_rescanWhether to force a rescan of the content. Otherwise a cached result will be used if available.
Since glibmm 2.18:

◆ guess_content_type() [2/3]

void Gio::Mount::guess_content_type ( const SlotAsyncReady &  slot,
bool  force_rescan = true 
)

Tries to guess the type of content stored on the mount.

Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.

This is an asynchronous operation, and is finished by calling guess_content_type_finish().

Parameters
slotA callback which will be called when the operation is completed or canceled.
force_rescanWhether to force a rescan of the content. Otherwise a cached result will be used if available.
Since glibmm 2.18:

◆ guess_content_type() [3/3]

void Gio::Mount::guess_content_type ( const SlotAsyncReady &  slot,
const Glib::RefPtr< Cancellable > &  cancellable,
bool  force_rescan = true 
)

Tries to guess the type of content stored on the mount.

Returns one or more textual identifiers of well-known content types (typically prefixed with "x-content/"), e.g. x-content/image-dcf for camera memory cards. See the shared-mime-info specification for more on x-content types.

This is an asynchronous operation, and is finished by calling guess_content_type_finish().

Parameters
slotA callback which will be called when the operation is completed or canceled.
cancellableA cancellable object which can be used to cancel the operation.
force_rescanWhether to force a rescan of the content. Otherwise a cached result will be used if available.
Since glibmm 2.18:

◆ guess_content_type_finish()

std::vector< Glib::ustring > Gio::Mount::guess_content_type_finish ( const Glib::RefPtr< AsyncResult > &  result)

Finishes guessing content types of the Mount.

If any errors occurred during the operation, an exception will be thrown. In particular, you may get a Gio::Error::NOT_SUPPORTED if the mount does not support content guessing.

Since glibmm 2.18:
Parameters
resultAn AsyncResult.
Returns
An array of content types.
Exceptions
Glib::Error

◆ guess_content_type_sync() [1/2]

void Gio::Mount::guess_content_type_sync ( bool  force_rescan = true)

◆ guess_content_type_sync() [2/2]

void Gio::Mount::guess_content_type_sync ( const Glib::RefPtr< Cancellable > &  cancellable,
bool  force_rescan = true 
)

◆ is_shadowed()

bool Gio::Mount::is_shadowed ( ) const

Determines if mount is shadowed.

Applications or libraries should avoid displaying mount in the user interface if it is shadowed.

A mount is said to be shadowed if there exists one or more user visible objects (currently Mount objects) with a root that is inside the root of mount.

One application of shadow mounts is when exposing a single file system that is used to address several logical volumes. In this situation, a VolumeMonitor implementation would create two Volume objects (for example, one for the camera functionality of the device and one for a SD card reader on the device) with activation URIs gphoto2://[usb:001,002]/store1/ and gphoto2://[usb:001,002]/store2/. When the underlying mount (with root gphoto2://[usb:001,002]/) is mounted, said VolumeMonitor implementation would create two Mount objects (each with their root matching the corresponding volume activation root) that would shadow the original mount.

The proxy monitor in GVfs 2.26 and later, automatically creates and manage shadow mounts (and shadows the underlying mount) if the activation root on a Volume is set.

Since glibmm 2.20:
Returns
true if mount is shadowed.

◆ on_changed()

virtual void Gio::Mount::on_changed ( )
protectedvirtual

This is a default handler for the signal signal_changed().

◆ on_pre_unmount()

virtual void Gio::Mount::on_pre_unmount ( )
protectedvirtual

This is a default handler for the signal signal_pre_unmount().

◆ on_unmounted()

virtual void Gio::Mount::on_unmounted ( )
protectedvirtual

This is a default handler for the signal signal_unmounted().

◆ operator=()

Mount & Gio::Mount::operator= ( Mount &&  src)
noexcept

◆ remount() [1/4]

void Gio::Mount::remount ( const Glib::RefPtr< MountOperation > &  operation,
const SlotAsyncReady &  slot,
const Glib::RefPtr< Cancellable > &  cancellable,
MountFlags  flags = MountFlags::NONE 
)

Remounts a mount.

This is an asynchronous operation, and is finished by calling mount_finish() with the AsyncResult data returned in the callback slot.

Remounting is useful when some setting affecting the operation of the volume has been changed, as this may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting, not all backends might need to actually be unmounted.

Parameters
operationA mount operation.
slotA callback which will be called when the operation is completed or canceled.
cancellableA cancellable object which can be used to cancel the operation.
flagsFlags affecting the operation.

◆ remount() [2/4]

void Gio::Mount::remount ( const Glib::RefPtr< MountOperation > &  operation,
const SlotAsyncReady &  slot,
MountFlags  flags = MountFlags::NONE 
)

Remounts a mount.

This is an asynchronous operation, and is finished by calling mount_finish() with the AsyncResult data returned in the callback slot.

Remounting is useful when some setting affecting the operation of the volume has been changed, as this may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting, not all backends might need to actually be unmounted.

Parameters
operationA mount operation.
slotA callback which will be called when the operation is completed or canceled.
flagsFlags affecting the operation.

◆ remount() [3/4]

void Gio::Mount::remount ( const Glib::RefPtr< MountOperation > &  operation,
MountFlags  flags = MountFlags::NONE 
)

Remounts a mount.

Remounting is useful when some setting affecting the operation of the volume has been changed, as this may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting, not all backends might need to actually be unmounted.

Parameters
operationA mount operation.
flagsFlags affecting the operation.

◆ remount() [4/4]

void Gio::Mount::remount ( MountFlags  flags = MountFlags::NONE)

Remounts a mount, without user interaction.

Remounting is useful when some setting affecting the operation of the volume has been changed, as this may need a remount to take affect. While this is semantically equivalent with unmounting and then remounting, not all backends might need to actually be unmounted.

Parameters
flagsFlags affecting the operation.

◆ remount_finish()

bool Gio::Mount::remount_finish ( const Glib::RefPtr< AsyncResult > &  result)

Finishes remounting a mount.

If any errors occurred during the operation, error will be set to contain the errors and false will be returned.

Parameters
resultA AsyncResult.
Returns
true if the mount was successfully remounted. false otherwise.
Exceptions
Glib::Error

◆ shadow()

void Gio::Mount::shadow ( )

Increments the shadow count on mount.

Usually used by VolumeMonitor implementations when creating a shadow mount for mount, see g_mount_is_shadowed() for more information. The caller will need to emit the Mount::signal_changed() signal on mount manually.

Since glibmm 2.20:

◆ signal_changed()

Glib::SignalProxy< void()> Gio::Mount::signal_changed ( )
Slot Prototype:
void on_my_changed()

Flags: Run Last

Emitted when the mount has been changed.

◆ signal_pre_unmount()

Glib::SignalProxy< void()> Gio::Mount::signal_pre_unmount ( )
Slot Prototype:
void on_my_pre_unmount()

Flags: Run Last

This signal may be emitted when the Mount is about to be unmounted.

This signal depends on the backend and is only emitted if GIO was used to unmount.

Since glibmm 2.22:

◆ signal_unmounted()

Glib::SignalProxy< void()> Gio::Mount::signal_unmounted ( )
Slot Prototype:
void on_my_unmounted()

Flags: Run Last

This signal is emitted when the Mount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.

◆ unmount() [1/6]

void Gio::Mount::unmount ( const Glib::RefPtr< MountOperation > &  mount_operation,
const SlotAsyncReady &  slot,
const Glib::RefPtr< Cancellable > &  cancellable,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ unmount() [2/6]

void Gio::Mount::unmount ( const Glib::RefPtr< MountOperation > &  mount_operation,
const SlotAsyncReady &  slot,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ unmount() [3/6]

void Gio::Mount::unmount ( const Glib::RefPtr< MountOperation > &  mount_operation,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ unmount() [4/6]

void Gio::Mount::unmount ( const SlotAsyncReady &  slot,
const Glib::RefPtr< Cancellable > &  cancellable,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ unmount() [5/6]

void Gio::Mount::unmount ( const SlotAsyncReady &  slot,
UnmountFlags  flags = UnmountFlags::NONE 
)

◆ unmount() [6/6]

void Gio::Mount::unmount ( UnmountFlags  flags = UnmountFlags::NONE)

◆ unmount_finish()

bool Gio::Mount::unmount_finish ( const Glib::RefPtr< AsyncResult > &  result)

Finishes unmounting a mount.

If any errors occurred during the operation, error will be set to contain the errors and false will be returned.

Since glibmm 2.22:
Parameters
resultA AsyncResult.
Returns
true if the mount was successfully unmounted. false otherwise.
Exceptions
Glib::Error

◆ unshadow()

void Gio::Mount::unshadow ( )

Decrements the shadow count on mount.

Usually used by VolumeMonitor implementations when destroying a shadow mount for mount, see g_mount_is_shadowed() for more information. The caller will need to emit the Mount::signal_changed() signal on mount manually.

Since glibmm 2.20:

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gio::Mount > wrap ( GMount object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.