Class

RBTrackTransferBatch

Description [src]

class RB.TrackTransferBatch : GObject.Object
  implements RB.TaskProgress {
  priv: RBTrackTransferBatchPrivate*
}

Manages the transfer of a set of tracks (using RBEncoder), providing overall status information and allowing the transfer to be cancelled as a single unit.

Ancestors

Implements

Constructors

rb_track_transfer_batch_new

Creates a new transfer batch with the specified encoding target. If no target is specified, the default target will be used with the user’s preferred encoding type.

Instance methods

rb_track_transfer_batch_add

Adds an entry to be transferred.

rb_track_transfer_batch_cancel

Cancels the batch.

rb_track_transfer_batch_check_profiles

Checks that all entries in the batch can be transferred in a format supported by the destination. If no encoding profile is available for some entries, but installing additional plugins could make a profile available, a list of profiles that require additional plugins is returned.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from RBTaskProgress (1)
rb_task_progress_cancel
No description available.

Properties

RB.TrackTransferBatch:destination

The RBSource to which the tracks are being transferred.

RB.TrackTransferBatch:done-entries

Number of entries in the batch that have been transferred.

RB.TrackTransferBatch:encoding-target

A GstEncodingTarget describing allowable target formats. If NULL, the default set of profiles will be used.

RB.TrackTransferBatch:entry-list

A list of all entries in the batch.

RB.TrackTransferBatch:progress

Fraction of the transfer batch that has been processed.

RB.TrackTransferBatch:queue

The RBTrackTransferQueue instance.

RB.TrackTransferBatch:settings

GSettings instance holding profile preferences.

RB.TrackTransferBatch:source

The RBSource from which the tracks are being transferred.

RB.TrackTransferBatch:total-entries

Total number of entries in the transfer batch.

Properties inherited from RBTaskProgress (6)
RBTaskProgress:task-cancellable
No description available.

RBTaskProgress:task-detail
No description available.

RBTaskProgress:task-label
No description available.

RBTaskProgress:task-notify
No description available.

RBTaskProgress:task-outcome
No description available.

RBTaskProgress:task-progress
No description available.

Signals

RB.TrackTransferBatch::cancelled

Emitted when the batch is cancelled.

RB.TrackTransferBatch::complete

Emitted when the batch is complete. This will be immediately after the final entry transfer is complete.

RB.TrackTransferBatch::get-dest-uri

The batch emits this to allow the creator to provide a destination URI for an entry being transferred. This is emitted after the output media type is decided, so the usual extension for the media type can be taken into consideration.

RB.TrackTransferBatch::overwrite-prompt

Emitted when the destination URI for a transfer already exists. The handler must call _rb_track_transfer_batch_continue or _rb_track_transfer_batch_cancel when it has figured out what to do.

RB.TrackTransferBatch::started

Emitted when the batch is started. This will be after all previous batches have finished, which is not necessarily when #rb_track_transfer_manager_start_batch is called.

RB.TrackTransferBatch::track-done

Emitted when a track transfer is complete, whether because the track was fully transferred, because an error occurred, or because the batch was cancelled (maybe..).

RB.TrackTransferBatch::track-postprocess

Emitted when a track transfer is finishing, allowing signal handlers to perform any post-processing required. The signal is emitted on the task thread, so no UI interaction is possible.

RB.TrackTransferBatch::track-prepare

Emitted when a track transfer is about to start, allowing signal handlers to perform any preparation required. The signal is emitted on the task thread, so no UI interaction is possible.

RB.TrackTransferBatch::track-progress

Emitted regularly throughout the transfer to allow progress bars and other UI elements to be updated.

RB.TrackTransferBatch::track-started

Emitted when a new entry is about to be transferred. This will be emitted for each entry in the batch, unless the batch is cancelled.

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct RBTrackTransferBatchClass {
  GObjectClass parent_class;
  void (* started) (
    RBTrackTransferBatch* batch
  );
  void (* cancelled) (
    RBTrackTransferBatch* batch
  );
  void (* complete) (
    RBTrackTransferBatch* batch
  );
  char* (* get_dest_uri) (
    RBTrackTransferBatch* batch,
    RhythmDBEntry* entry,
    const char* mediatype,
    const char* extension
  );
  gboolean (* overwrite_prompt) (
    RBTrackTransferBatch* batch,
    GFile* dest_file
  );
  void (* track_started) (
    RBTrackTransferBatch* batch,
    RhythmDBEntry* entry,
    const char* dest
  );
  void (* track_progress) (
    RBTrackTransferBatch* batch,
    RhythmDBEntry* entry,
    const char* dest,
    int done,
    int total,
    double fraction
  );
  void (* track_done) (
    RBTrackTransferBatch* batch,
    RhythmDBEntry* entry,
    const char* dest,
    guint64 dest_size,
    const char* mediatype,
    GError* error
  );
  void (* track_prepare) (
    RBTrackTransferBatch* batch,
    GTask* task,
    RhythmDBEntry* entry,
    const char* dest
  );
  void (* track_postprocess) (
    RBTrackTransferBatch* batch,
    GTask* task,
    RhythmDBEntry* entry,
    const char* dest,
    guint64 dest_size,
    const char* mediatype
  );
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.

started: void (* started) ( RBTrackTransferBatch* batch )

No description available.

cancelled: void (* cancelled) ( RBTrackTransferBatch* batch )

No description available.

complete: void (* complete) ( RBTrackTransferBatch* batch )

No description available.

get_dest_uri: char* (* get_dest_uri) ( RBTrackTransferBatch* batch, RhythmDBEntry* entry, const char* mediatype, const char* extension )

No description available.

overwrite_prompt: gboolean (* overwrite_prompt) ( RBTrackTransferBatch* batch, GFile* dest_file )

No description available.

track_started: void (* track_started) ( RBTrackTransferBatch* batch, RhythmDBEntry* entry, const char* dest )

No description available.

track_progress: void (* track_progress) ( RBTrackTransferBatch* batch, RhythmDBEntry* entry, const char* dest, int done, int total, double fraction )

No description available.

track_done: void (* track_done) ( RBTrackTransferBatch* batch, RhythmDBEntry* entry, const char* dest, guint64 dest_size, const char* mediatype, GError* error )

No description available.

track_prepare: void (* track_prepare) ( RBTrackTransferBatch* batch, GTask* task, RhythmDBEntry* entry, const char* dest )

No description available.

track_postprocess: void (* track_postprocess) ( RBTrackTransferBatch* batch, GTask* task, RhythmDBEntry* entry, const char* dest, guint64 dest_size, const char* mediatype )

No description available.

Virtual methods

RB.TrackTransferBatchClass.cancelled
No description available.

RB.TrackTransferBatchClass.complete
No description available.

RB.TrackTransferBatchClass.get_dest_uri
No description available.

RB.TrackTransferBatchClass.started
No description available.

RB.TrackTransferBatchClass.track_done
No description available.

RB.TrackTransferBatchClass.track_prepare
No description available.

RB.TrackTransferBatchClass.track_progress
No description available.

RB.TrackTransferBatchClass.track_started
No description available.