RBTrackTransferQueue

## RBTrackTransferQueue RBTrackTransferQueue — track transfer queue and surrounding junk |

## Synopsis

    struct              RBTrackTransferQueue;
    struct              RBTrackTransferQueueClass;
    RBTrackTransferQueue * rb_track_transfer_queue_new      (RBShell *shell);
    void                rb_track_transfer_queue_start_batch (RBTrackTransferQueue *queue,
                                                             RBTrackTransferBatch *batch);
    void                rb_track_transfer_queue_cancel_batch
                                                            (RBTrackTransferQueue *queue,
                                                             RBTrackTransferBatch *batch);
    gboolean            rb_track_transfer_queue_get_status  (RBTrackTransferQueue *queue,
                                                             char **text,
                                                             char **progress_text,
                                                             float *progress,
                                                             int *time_left);

## Object Hierarchy

      GObject
       +----RBTrackTransferQueue

## Properties

      "batch"                    RBTrackTransferBatch*  : Read
      "shell"                    RBShell*              : Read / Write / Construct Only

## Signals

      "missing-plugins"                                : Run Last
      "transfer-progress"                              : Run Last

## Description

## Details

### struct RBTrackTransferQueue

    struct RBTrackTransferQueue;

### struct RBTrackTransferQueueClass

    struct RBTrackTransferQueueClass {
    	GObjectClass parent_class;

    	/* signals */
    	void (*transfer_progress) (RBTrackTransferQueue *queue,
    					 int done,
    					 int total,
    					 double fraction,
    					 int time_left);
    };

### rb_track_transfer_queue_new ()

    RBTrackTransferQueue * rb_track_transfer_queue_new      (RBShell *shell);

Creates the RBTrackTransferQueue instance

`shell` : | the RBShell
Returns : | the RBTrackTransferQueue

### rb_track_transfer_queue_start_batch ()

    void                rb_track_transfer_queue_start_batch (RBTrackTransferQueue *queue,
                                                             RBTrackTransferBatch *batch);

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.

`queue` : | the RBTrackTransferQueue
`batch` : | the RBTrackTransferBatch to add to the queue

### rb_track_transfer_queue_cancel_batch ()

    void                rb_track_transfer_queue_cancel_batch
                                                            (RBTrackTransferQueue *queue,
                                                             RBTrackTransferBatch *batch);

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

`queue` : | the RBTrackTransferQueue
`batch` : | the RBTrackTransferBatch to cancel, or NULL for the current batch

### rb_track_transfer_queue_get_status ()

    gboolean            rb_track_transfer_queue_get_status  (RBTrackTransferQueue *queue,
                                                             char **text,
                                                             char **progress_text,
                                                             float *progress,
                                                             int *time_left);

Retrieves transfer status information. Works similarly to rb_source_get_status.

`queue` : | the RBTrackTransferQueue
`text` : | returns the status bar text
`progress_text` : | returns the progress bar text
`progress` : | returns the progress fraction
`time_left` : | returns the estimated number of seconds remaining
Returns : | TRUE if transfer status information is returned

## Property Details

### The `"batch"` property

      "batch"                    RBTrackTransferBatch*  : Read

The current RBTrackTransferBatch being processed

### The `"shell"` property

      "shell"                    RBShell*              : Read / Write / Construct Only

The RBShell

## Signal Details

### The `"missing-plugins"` signal

    gboolean            user_function                      (RBTrackTransferQueue *queue,
                                                            GStrv                 details,
                                                            GStrv                 descriptions,
                                                            GClosure             *closure,
                                                            gpointer              user_data)         : Run Last

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.

`queue` : | the RBTrackTransferQueue
`details` : | the list of plugin detail strings describing the missing plugins
`descriptions` : | the list of descriptions for the missing plugins
`closure` : | a GClosure to be called when the plugin installation is complete
`user_data` : | user data set when the signal handler was connected.

### The `"transfer-progress"` signal

    void                user_function                      (RBTrackTransferQueue *queue,
                                                            gint                  done,
                                                            gint                  total,
                                                            gdouble               fraction,
                                                            gint                  time_left,
                                                            gpointer              user_data)      : Run Last

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.

`queue` : | the RBTrackTransferQueue
`done` : | the number of entries transferred
`total` : | the total number of entries in the batch
`fraction` : | the fraction of the batch that has been transferred
`time_left` : | the estimated remaining time (in seconds)
`user_data` : | user data set when the signal handler was connected.