## rb-play-order

rb-play-order

## Synopsis

    typedef             RBPlayOrderPrivate;
    void                rb_play_order_playing_source_changed
                                                            (RBPlayOrder *porder,
                                                             RBSource *source);
    gboolean            rb_play_order_has_next              (RBPlayOrder *porder);
    RhythmDBEntry*      rb_play_order_get_next              (RBPlayOrder *porder);
    void                rb_play_order_go_next               (RBPlayOrder *porder);
    gboolean            rb_play_order_has_previous          (RBPlayOrder *porder);
    RhythmDBEntry*      rb_play_order_get_previous          (RBPlayOrder *porder);
    void                rb_play_order_go_previous           (RBPlayOrder *porder);
    RBShellPlayer*      rb_play_order_get_player            (RBPlayOrder *porder);
    RBSource*           rb_play_order_get_source            (RBPlayOrder *porder);
    RhythmDB*           rb_play_order_get_db                (RBPlayOrder *porder);
    RhythmDBEntry*      rb_play_order_get_playing_entry     (RBPlayOrder *porder);
    gboolean            rb_play_order_player_is_playing     (RBPlayOrder *porder);

## Description

## Details

### RBPlayOrderPrivate

    typedef struct RBPlayOrderPrivate RBPlayOrderPrivate;

### rb_play_order_playing_source_changed ()

    void                rb_play_order_playing_source_changed
                                                            (RBPlayOrder *porder,
                                                             RBSource *source);

Sets the playing RBSource for the play order. Should be called by RBShellPlayer when the active source changes. Subclasses should implement `playing_source_changed()` to make any necessary changes.

`porder` : | RBPlayOrder instance
`source` : | New playing RBSource

### rb_play_order_has_next ()

    gboolean            rb_play_order_has_next              (RBPlayOrder *porder);

If there is no current playing entry, returns true if the play order is non-empty.

`porder` : | RBPlayOrder instance.
Returns : | true if there is an entry after the current playing entry in the play order.

### rb_play_order_get_next ()

    RhythmDBEntry*      rb_play_order_get_next              (RBPlayOrder *porder);

`porder` : | RBPlayOrder instance
Returns : | the next entry in the play order, or the first if not currently playing.

### rb_play_order_go_next ()

    void                rb_play_order_go_next               (RBPlayOrder *porder);

Moves to the next entry in the play order. If not currently playing, sets the first entry in the play order as the playing entry.

`porder` : | RBPlayOrder instance

### rb_play_order_has_previous ()

    gboolean            rb_play_order_has_previous          (RBPlayOrder *porder);

`porder` : | RBPlayOrder instance
Returns : | true if there is an entry before the current entry in the play order. If not currently playing, returns false.

### rb_play_order_get_previous ()

    RhythmDBEntry*      rb_play_order_get_previous          (RBPlayOrder *porder);

`porder` : | RBPlayOrder instance
Returns : | the previous entry in the play order, or NULL if not currently playing.

### rb_play_order_go_previous ()

    void                rb_play_order_go_previous           (RBPlayOrder *porder);

Moves to the previous entry in the play order. If not currently playing, does nothing.

`porder` : | RBPlayOrder instance

### rb_play_order_get_player ()

    RBShellPlayer*      rb_play_order_get_player            (RBPlayOrder *porder);

Only for use by RBPlayOrder subclasses.

`porder` : | RBPlayOrder instance
Returns : | RBShellPlayer instance

### rb_play_order_get_source ()

    RBSource*           rb_play_order_get_source            (RBPlayOrder *porder);

Only for use by RBPlayOrder subclasses.

`porder` : | RBPlayOrder instance
Returns : | the playing RBSource instance.

### rb_play_order_get_db ()

    RhythmDB*           rb_play_order_get_db                (RBPlayOrder *porder);

Only for use by RBPlayOrder subclasses.

`porder` : | RBPlayOrder instance
Returns : | the RhythmDB instance.

### rb_play_order_get_playing_entry ()

    RhythmDBEntry*      rb_play_order_get_playing_entry     (RBPlayOrder *porder);

`porder` : | RBPlayOrder instance
Returns : | the current playing entry in the play order.

### rb_play_order_player_is_playing ()

    gboolean            rb_play_order_player_is_playing     (RBPlayOrder *porder);

`porder` : | RBPlayOrder instance
Returns : | true if there is a current playing entry in the play order.