Interface

Gio-2.0GioMountInterface

Interface for implementing Mount. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_can_eject(): boolean;
    vfunc_can_unmount(): boolean;
    vfunc_changed(): void;
    vfunc_eject(
        flags: Gio.MountUnmountFlags,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Mount.Interface>,
    ): void;
    vfunc_eject_finish(result: Gio.AsyncResult): boolean;
    vfunc_eject_with_operation(
        flags: Gio.MountUnmountFlags,
        mount_operation?: Gio.MountOperation,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Mount.Interface>,
    ): void;
    vfunc_eject_with_operation_finish(result: Gio.AsyncResult): boolean;
    vfunc_get_default_location(): Gio.File;
    vfunc_get_drive(): Gio.Drive;
    vfunc_get_icon(): Gio.Icon;
    vfunc_get_name(): string;
    vfunc_get_root(): Gio.File;
    vfunc_get_sort_key(): string;
    vfunc_get_symbolic_icon(): Gio.Icon;
    vfunc_get_uuid(): string;
    vfunc_get_volume(): Gio.Volume;
    vfunc_guess_content_type(
        force_rescan: boolean,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Mount.Interface>,
    ): void;
    vfunc_guess_content_type_finish(result: Gio.AsyncResult): string[];
    vfunc_guess_content_type_sync(
        force_rescan: boolean,
        cancellable?: Gio.Cancellable,
    ): string[];
    vfunc_pre_unmount(): void;
    vfunc_remount(
        flags: NONE,
        mount_operation?: Gio.MountOperation,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Mount.Interface>,
    ): void;
    vfunc_remount_finish(result: Gio.AsyncResult): boolean;
    vfunc_unmount(
        flags: Gio.MountUnmountFlags,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Mount.Interface>,
    ): void;
    vfunc_unmount_finish(result: Gio.AsyncResult): boolean;
    vfunc_unmount_with_operation(
        flags: Gio.MountUnmountFlags,
        mount_operation?: Gio.MountOperation,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Mount.Interface>,
    ): void;
    vfunc_unmount_with_operation_finish(result: Gio.AsyncResult): boolean;
    vfunc_unmounted(): void;
}

Hierarchy (View Summary)

Index

Methods

  • Changed signal that is emitted when the mount's state has changed.

    Returns void

  • 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 Gio.File

  • 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 null if there is no UUID available.

    Returns string

  • Tries to guess the type of content stored on 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 (see g_mount_guess_content_type_sync() for the synchronous version), and is finished by calling g_mount_guess_content_type_finish() with the mount and Gio.AsyncResult data returned in the callback.

    Parameters

    Returns void

  • Tries to guess the type of content stored on 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 a synchronous operation and as such may block doing IO; see g_mount_guess_content_type() for the asynchronous version.

    Parameters

    • force_rescan: boolean

      Whether to force a rescan of the content. Otherwise a cached result will be used if available

    • Optionalcancellable: Gio.Cancellable

      optional Gio.Cancellable object, null to ignore

    Returns string[]

  • The ::pre-unmount signal that is emitted when the Gio.Mount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.

    Returns void

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

    Returns void