## rb-shell-player rb-shell-player |

## Synopsis

    enum                RBShellPlayerError;
    #define             RB_SHELL_PLAYER_ERROR
    GQuark              rb_shell_player_error_quark         (void);
    typedef             RBShellPlayerPrivate;
    RBShellPlayer*      rb_shell_player_new                 (RhythmDB *db,
                                                             GtkUIManager *mgr,
                                                             GtkActionGroup *actiongroup);
    void                rb_shell_player_set_selected_source (RBShellPlayer *shell_player,
                                                             RBSource *player);
    void                rb_shell_player_set_playing_source  (RBShellPlayer *player,
                                                             RBSource *source);
    RBSource*           rb_shell_player_get_playing_source  (RBShellPlayer *shell_player);
    void                rb_shell_player_jump_to_current     (RBShellPlayer *player);
    void                rb_shell_player_play_entry          (RBShellPlayer *player,
                                                             RhythmDBEntry *entry,
                                                             RBSource *source);
    gboolean            rb_shell_player_playpause           (RBShellPlayer *player,
                                                             gboolean unused,
                                                             GError **error);
    void                rb_shell_player_stop                (RBShellPlayer *player);
    gboolean            rb_shell_player_do_previous         (RBShellPlayer *player,
                                                             GError **error);
    gboolean            rb_shell_player_do_next             (RBShellPlayer *player,
                                                             GError **error);
    gboolean            rb_shell_player_get_playing_time    (RBShellPlayer *player,
                                                             guint *time,
                                                             GError **error);
    gboolean            rb_shell_player_set_playing_time    (RBShellPlayer *player,
                                                             guint time,
                                                             GError **error);
    void                rb_shell_player_seek                (RBShellPlayer *player,
                                                             long offset );
    long                rb_shell_player_get_playing_song_duration
                                                            (RBShellPlayer *player);
    gboolean            rb_shell_player_get_playing         (RBShellPlayer *shell_player,
                                                             gboolean *playing,
                                                             GError **error);
    gboolean            rb_shell_player_get_playing_path    (RBShellPlayer *shell_player,
                                                             const gchar **path,
                                                             GError **error);
    void                rb_shell_player_set_playback_state  (RBShellPlayer *player,
                                                             gboolean shuffle,
                                                             gboolean repeat);
    gboolean            rb_shell_player_get_playback_state  (RBShellPlayer *player,
                                                             gboolean *shuffle,
                                                             gboolean *repeat);
    RhythmDBEntry*      rb_shell_player_get_playing_entry   (RBShellPlayer *player);
    void                rb_shell_player_toggle_mute         (RBShellPlayer *player);

## Description

## Details

### enum RBShellPlayerError

    typedef enum
    {
    	RB_SHELL_PLAYER_ERROR_PLAYLIST_PARSE_ERROR,
    	RB_SHELL_PLAYER_ERROR_END_OF_PLAYLIST,
    	RB_SHELL_PLAYER_ERROR_NOT_PLAYING,
            RB_SHELL_PLAYER_ERROR_NOT_SEEKABLE,
    } RBShellPlayerError;

### RB_SHELL_PLAYER_ERROR

    #define             RB_SHELL_PLAYER_ERROR

### rb_shell_player_error_quark ()

    GQuark              rb_shell_player_error_quark         (void);

Returns : |

### RBShellPlayerPrivate

### rb_shell_player_new ()

    RBShellPlayer*      rb_shell_player_new                 (RhythmDB *db,
                                                             GtkUIManager *mgr,
                                                             GtkActionGroup *actiongroup);

`db` : |
`mgr` : |
`actiongroup` : |
Returns : |

### rb_shell_player_set_selected_source ()

    void                rb_shell_player_set_selected_source (RBShellPlayer *shell_player,
                                                             RBSource *player);

`shell_player` : |
`player` : |

### rb_shell_player_set_playing_source ()

    void                rb_shell_player_set_playing_source  (RBShellPlayer *player,
                                                             RBSource *source);

`player` : |
`source` : |

### rb_shell_player_get_playing_source ()

    RBSource*           rb_shell_player_get_playing_source  (RBShellPlayer *shell_player);

`shell_player` : |
Returns : |

### rb_shell_player_jump_to_current ()

    void                rb_shell_player_jump_to_current     (RBShellPlayer *player);

`player` : |

### rb_shell_player_play_entry ()

    void                rb_shell_player_play_entry          (RBShellPlayer *player,
                                                             RhythmDBEntry *entry,
                                                             RBSource *source);

`player` : |
`entry` : |
`source` : |

### rb_shell_player_playpause ()

    gboolean            rb_shell_player_playpause           (RBShellPlayer *player,
                                                             gboolean unused,
                                                             GError **error);

`player` : |
`unused` : |
`error` : |
Returns : |

### rb_shell_player_stop ()

    void                rb_shell_player_stop                (RBShellPlayer *player);

Completely stops playback, freeing resources and unloading the file.

In general `rb_shell_player_pause()` should be used instead, as it stops the audio, but does not completely free resources.

`player` : | a RBShellPlayer.

### rb_shell_player_do_previous ()

    gboolean            rb_shell_player_do_previous         (RBShellPlayer *player,
                                                             GError **error);

`player` : |
`error` : |
Returns : |

### rb_shell_player_do_next ()

    gboolean            rb_shell_player_do_next             (RBShellPlayer *player,
                                                             GError **error);

`player` : |
`error` : |
Returns : |

### rb_shell_player_get_playing_time ()

    gboolean            rb_shell_player_get_playing_time    (RBShellPlayer *player,
                                                             guint *time,
                                                             GError **error);

`player` : |
`time` : |
`error` : |
Returns : |

### rb_shell_player_set_playing_time ()

    gboolean            rb_shell_player_set_playing_time    (RBShellPlayer *player,
                                                             guint time,
                                                             GError **error);

`player` : |
`time` : |
`error` : |
Returns : |

### rb_shell_player_seek ()

    void                rb_shell_player_seek                (RBShellPlayer *player,
                                                             long offset );

`player` : |
`Param2` : |

### rb_shell_player_get_playing_song_duration ()

    long                rb_shell_player_get_playing_song_duration
                                                            (RBShellPlayer *player);

`player` : |
Returns : |

### rb_shell_player_get_playing ()

    gboolean            rb_shell_player_get_playing         (RBShellPlayer *shell_player,
                                                             gboolean *playing,
                                                             GError **error);

Reports whether playback is occuring by setting playing.

`return`: whether the playback state could be reported successfully.

`shell_player` : |
`playing` : | playback state return
`error` : | error return
Returns : |

### rb_shell_player_get_playing_path ()

    gboolean            rb_shell_player_get_playing_path    (RBShellPlayer *shell_player,
                                                             const gchar **path,
                                                             GError **error);

`shell_player` : |
`path` : |
`error` : |
Returns : |

### rb_shell_player_set_playback_state ()

    void                rb_shell_player_set_playback_state  (RBShellPlayer *player,
                                                             gboolean shuffle,
                                                             gboolean repeat);

`player` : |
`shuffle` : |
`repeat` : |

### rb_shell_player_get_playback_state ()

    gboolean            rb_shell_player_get_playback_state  (RBShellPlayer *player,
                                                             gboolean *shuffle,
                                                             gboolean *repeat);

`player` : |
`shuffle` : |
`repeat` : |
Returns : |

### rb_shell_player_get_playing_entry ()

    RhythmDBEntry*      rb_shell_player_get_playing_entry   (RBShellPlayer *player);

`player` : |
Returns : |

### rb_shell_player_toggle_mute ()

    void                rb_shell_player_toggle_mute         (RBShellPlayer *player);

`player` : |