![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct RBTrackTransferBatch; struct RBTrackTransferBatchClass; RBTrackTransferBatch * rb_track_transfer_batch_new (GstEncodingTarget *target
,GObject *source
,GObject *destination
); void rb_track_transfer_batch_add (RBTrackTransferBatch *batch
,RhythmDBEntry *entry
); void rb_track_transfer_batch_cancel (RBTrackTransferBatch *batch
);
"destination" RBSource* : Read / Write / Construct Only "done-entries" gint : Read "encoding-target" GstEncodingTarget* : Read / Write / Construct Only "entry-list" gpointer : Read "progress" gdouble : Read "source" RBSource* : Read / Write / Construct Only "total-entries" gint : Read
"cancelled" :Run Last
"complete" :Run Last
"configure-profile" :Run Last
"get-dest-uri" :Run Last
"overwrite-prompt" :Run Last
"started" :Run Last
"track-done" :Run Last
"track-progress" :Run Last
"track-started" :Run Last
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.
struct RBTrackTransferBatchClass { GObjectClass parent_class; /* signals */ void (*started) (RBTrackTransferBatch *batch); void (*cancelled) (RBTrackTransferBatch *batch); void (*complete) (RBTrackTransferBatch *batch); char * (*configure_profile) (RBTrackTransferBatch *batch, const char *mediatype, GstEncodingProfile *profile); 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); };
RBTrackTransferBatch * rb_track_transfer_batch_new (GstEncodingTarget *target
,GObject *source
,GObject *destination
);
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.
One or more entries must be added to the batch (using rb_track_transfer_batch_add) before the batch can be started (rb_track_transfer_manager_start_batch).
|
a GstEncodingTarget describing allowable encodings (or NULL for defaults) |
|
the RBSource from which the entries are to be transferred |
|
the RBSource to which the entries are to be transferred |
Returns : |
new RBTrackTransferBatch object |
void rb_track_transfer_batch_add (RBTrackTransferBatch *batch
,RhythmDBEntry *entry
);
Adds an entry to be transferred.
|
a RBTrackTransferBatch |
|
the source RhythmDBEntry to transfer |
void rb_track_transfer_batch_cancel (RBTrackTransferBatch *batch
);
Cancels the batch.
|
a RBTrackTransferBatch |
"destination"
property"destination" RBSource* : Read / Write / Construct Only
The RBSource to which the tracks are being transferred.
"done-entries"
property"done-entries" gint : Read
Number of entries in the batch that have been transferred.
Allowed values: >= 0
Default value: 0
"encoding-target"
property"encoding-target" GstEncodingTarget* : Read / Write / Construct Only
A GstEncodingTarget describing allowable target formats. If NULL, the default set of profiles will be used.
"progress"
property"progress" gdouble : Read
Fraction of the transfer batch that has been processed.
Allowed values: [0,1]
Default value: 0
"source"
property"source" RBSource* : Read / Write / Construct Only
The RBSource from which the tracks are being transferred.
"total-entries"
property"total-entries" gint : Read
Total number of entries in the transfer batch.
Allowed values: >= 0
Default value: 0
"cancelled"
signalvoid user_function (RBTrackTransferBatch *batch,
gpointer user_data) : Run Last
Emitted when the batch is cancelled.
hmm. will 'complete' still be emitted in this case?
|
the RBTrackTransferBatch |
|
user data set when the signal handler was connected. |
"complete"
signalvoid user_function (RBTrackTransferBatch *batch,
gpointer user_data) : Run Last
Emitted when the batch is complete. This will be immediately after the final entry transfer is complete.
|
the RBTrackTransferBatch |
|
user data set when the signal handler was connected. |
"configure-profile"
signalvoid user_function (RBTrackTransferBatch *batch,
gchar *mediatype,
GstEncodingProfile *profile,
gpointer user_data) : Run Last
Emitted to allow configuration of encoding profile settings (mostly by setting presets on sub-profiles).
|
the RBTrackTransferBatch |
|
the target media type |
|
the GstEncodingProfile |
|
user data set when the signal handler was connected. |
"get-dest-uri"
signalgchar* user_function (RBTrackTransferBatch *batch,
RhythmDBEntry *entry,
gchar *mediatype,
gchar *extension,
gpointer user_data) : Run Last
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.
|
the RBTrackTransferBatch |
|
the RhythmDBEntry to be transferred |
|
the destination media type for the transfer |
|
usual extension for the destionation media type |
|
user data set when the signal handler was connected. |
"overwrite-prompt"
signalvoid user_function (RBTrackTransferBatch *batch,
gchar *uri,
gpointer user_data) : Run Last
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.
|
the RBTrackTransferBatch |
|
the destination URI that already exists |
|
user data set when the signal handler was connected. |
"started"
signalvoid user_function (RBTrackTransferBatch *batch,
gpointer user_data) : Run Last
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.
|
the RBTrackTransferBatch |
|
user data set when the signal handler was connected. |
"track-done"
signalvoid user_function (RBTrackTransferBatch *batch,
RhythmDBEntry *entry,
gchar *dest,
guint64 dest_size,
gchar *dest_mediatype,
gpointer error,
gpointer user_data) : Run Last
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..).
|
the RBTrackTransferBatch |
|
the RhythmDBEntry that was transferred |
|
the destination URI for the transfer |
|
size of the destination file |
|
the media type of the destination file |
|
any error that occurred during transfer |
|
user data set when the signal handler was connected. |
"track-progress"
signalvoid user_function (RBTrackTransferBatch *batch,
RhythmDBEntry *entry,
gchar *dest,
gint done,
gint total,
gdouble fraction,
gpointer user_data) : Run Last
Emitted regularly throughout the transfer to allow progress bars and other UI elements to be updated.
|
the RBTrackTransferBatch |
|
the RhythmDBEntry being transferred |
|
the destination URI for the transfer |
|
some measure of how much of the transfer is done |
|
the total amount of that same measure |
|
the fraction of the transfer that is done |
|
user data set when the signal handler was connected. |
"track-started"
signalvoid user_function (RBTrackTransferBatch *batch,
RhythmDBEntry *entry,
gchar *dest,
gpointer user_data) : Run Last
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.
|
the RBTrackTransferBatch |
|
the RhythmDBEntry being transferred |
|
the destination URI for the transfer |
|
user data set when the signal handler was connected. |