RB.TrackTransferQueue

g GObject.Object GObject.Object RB.TrackTransferQueue RB.TrackTransferQueue GObject.Object->RB.TrackTransferQueue

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (shell)

cancel_batch (batch)

cancel_for_source (source)

find_batch_by_source (source)

start_batch (batch)

Virtual Methods

Inherited:

GObject.Object (7)

do_transfer_progress (done, total, fraction, time_left)

Properties

Name

Type

Flags

Short Description

batch

RB.TrackTransferBatch

r

current RB.TrackTransferBatch

shell

RB.Shell

r/w/co

the RB.Shell

Signals

Inherited:

GObject.Object (1)

Name

Short Description

missing-plugins

Emitted to request installation of one or more encoder plugins for a destination media format.

transfer-progress

Emitted regularly to convey progress information.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class RB.TrackTransferQueue(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

RB.TrackTransferQueueClass

classmethod new(shell)
Parameters:

shell (RB.Shell) – the RB.Shell

Returns:

the RB.TrackTransferQueue

Return type:

RB.TrackTransferQueue

Creates the RB.TrackTransferQueue instance

cancel_batch(batch)
Parameters:

batch (RB.TrackTransferBatch) – the RB.TrackTransferBatch to cancel, or None for the current batch

Removes a transfer batch from the queue. If an entry from the batch is currently being transferred, the transfer will be aborted.

cancel_for_source(source)
Parameters:

source (RB.Source) – the RB.Source to cancel transfers to/from

Cancels all transfers to or from a specified source.

find_batch_by_source(source)
Parameters:

source (RB.Source) – the RB.Source to search for

Returns:

GLib.List of RB.TrackTransferBatch objects, not referenced

Return type:

[RB.TrackTransferBatch]

Finds all transfer batches where source is the source or destination. This should be used to wait for transfers to finish (or cancel them) before ejecting a device. The transfer batches are returned in the order they’re found in the queue, so waiting for the RBTrackTransferBatch::complete signal on the last one is sufficient to wait for them all to finish.

start_batch(batch)
Parameters:

batch (RB.TrackTransferBatch) – the RB.TrackTransferBatch to add to the queue

Adds a new transfer batch to the transfer queue; if the queue is currently empty, the transfer will start immediately, but not before the call returns.

do_transfer_progress(done, total, fraction, time_left) virtual
Parameters:
  • done (int) –

  • total (int) –

  • fraction (float) –

  • time_left (int) –

Signal Details

RB.TrackTransferQueue.signals.missing_plugins(track_transfer_queue, details, descriptions, closure)
Signal Name:

missing-plugins

Flags:

RUN_LAST

Parameters:
  • track_transfer_queue (RB.TrackTransferQueue) – The object which received the signal

  • details ([str]) – the list of plugin detail strings describing the missing plugins

  • descriptions ([str]) – the list of descriptions for the missing plugins

  • closure (GObject.Closure) – a GObject.Closure to be called when the plugin installation is complete

Return type:

bool

Emitted to request installation of one or more encoder plugins for a destination media format. When the closure included in the signal args is called, the transfer batch will be started.

RB.TrackTransferQueue.signals.transfer_progress(track_transfer_queue, done, total, fraction, time_left)
Signal Name:

transfer-progress

Flags:

RUN_LAST

Parameters:
  • track_transfer_queue (RB.TrackTransferQueue) – The object which received the signal

  • done (int) – the number of entries transferred

  • total (int) – the total number of entries in the batch

  • fraction (float) – the fraction of the batch that has been transferred

  • time_left (int) – the estimated remaining time (in seconds)

Emitted regularly to convey progress information. At the end of any given transfer batch, there will be one signal emission with done == total and fraction == 1.0.

Property Details

RB.TrackTransferQueue.props.batch
Name:

batch

Type:

RB.TrackTransferBatch

Default Value:

None

Flags:

READABLE

The current RB.TrackTransferBatch being processed

RB.TrackTransferQueue.props.shell
Name:

shell

Type:

RB.Shell

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The RB.Shell