Interface

Gio-2.0GioDriveInterface

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

interface Interface {
    vfunc_can_eject(): boolean;
    vfunc_can_poll_for_media(): boolean;
    vfunc_can_start(): boolean;
    vfunc_can_start_degraded(): boolean;
    vfunc_can_stop(): boolean;
    vfunc_changed(): void;
    vfunc_disconnected(): void;
    vfunc_eject(
        flags: Gio.MountUnmountFlags,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Drive.Interface>,
    ): void;
    vfunc_eject_button(): 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.Drive.Interface>,
    ): void;
    vfunc_eject_with_operation_finish(result: Gio.AsyncResult): boolean;
    vfunc_enumerate_identifiers(): string[];
    vfunc_get_icon(): Gio.Icon;
    vfunc_get_identifier(kind: string): string;
    vfunc_get_name(): string;
    vfunc_get_sort_key(): string;
    vfunc_get_start_stop_type(): Gio.DriveStartStopType;
    vfunc_get_symbolic_icon(): Gio.Icon;
    vfunc_get_volumes(): Gio.Volume[];
    vfunc_has_media(): boolean;
    vfunc_has_volumes(): boolean;
    vfunc_is_media_check_automatic(): boolean;
    vfunc_is_media_removable(): boolean;
    vfunc_is_removable(): boolean;
    vfunc_poll_for_media(
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Drive.Interface>,
    ): void;
    vfunc_poll_for_media_finish(result: Gio.AsyncResult): boolean;
    vfunc_start(
        flags: NONE,
        mount_operation?: Gio.MountOperation,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Drive.Interface>,
    ): void;
    vfunc_start_finish(result: Gio.AsyncResult): boolean;
    vfunc_stop(
        flags: Gio.MountUnmountFlags,
        mount_operation?: Gio.MountOperation,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<Gio.Drive.Interface>,
    ): void;
    vfunc_stop_button(): void;
    vfunc_stop_finish(result: Gio.AsyncResult): boolean;
}

Hierarchy (View Summary)

Index

Methods

  • Checks if a drive can be polled for media changes.

    Returns boolean

  • Checks if a drive can be started degraded.

    Returns boolean

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

    Returns void

  • Signal emitted when the physical eject button (if any) of a drive have been pressed.

    Returns void

  • Gets the kinds of identifiers that drive has. Use g_drive_get_identifier() to obtain the identifiers themselves.

    Returns string[]

  • Gets the identifier of the given kind for drive. The only identifier currently available is G_DRIVE_IDENTIFIER_KIND_UNIX_DEVICE.

    Parameters

    • kind: string

      the kind of identifier to return

    Returns string

  • Get a list of mountable volumes for drive.

    The returned list should be freed with g_list_free(), after its elements have been unreffed with g_object_unref().

    Returns Gio.Volume[]

  • Checks if the drive has media. Note that the OS may not be polling the drive for media changes; see g_drive_is_media_check_automatic() for more details.

    Returns boolean

  • Checks if drive is capable of automatically detecting media changes.

    Returns boolean

  • Checks if the drive supports removable media.

    Returns boolean

  • Checks if the Gio.Drive and/or its media is considered removable by the user. See g_drive_is_media_removable().

    Returns boolean

  • Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.

    Returns void