10#include <glibmm/main.h>
12#include <glibmm/dispatcher.h>
13#include <gtkmm/application.h>
14#include <gtkmm/builder.h>
15#include <gtkmm/window.h>
16#include <gtkmm/stack.h>
18#include <glibmm/refptr.h>
19#include <glibmm/variant.h>
20#include <giomm/dbusproxy.h>
26#include <discdb/discdb.h>
59 Glib::RefPtr<Gtk::Application>
_app;
149 void play(
unsigned int track);
176 void rip(
unsigned int track);
Handles the interactions with the album art selection screen.
AudioOutput< int16_t > * _audio_output
The audio output.
void on_album_art_button()
AlbumArtComponent done button handler.
void on_shutdown_button()
Shutdown button handler.
void on_prev()
Previous button handler.
void on_album_art_done()
Called when the AlbumArtComponent done button is clicked.
void on_bluetooth_button()
Bluetooth button handler.
Glib::RefPtr< Gio::DBus::Proxy > _systemd_proxy
The systemd D-Bus proxy, used for host shutdown.
Gtk::Stack * _stack
Stack that switches between application screens.
sigc::connection _timer_connection
A connection of a timer to the callback that periodically checks the current track state.
void on_track_progress(unsigned int track, unsigned int progress)
Called when the CDRipper reports progress on a certain track.
void on_stop()
Stop button handler.
NowPlayingComponent * _now_playing_component
Handles the left-hand side of the main application screen showing album art and current track.
void on_next()
Next button handler.
Gtk::Box * _player_box
Box holding the main application screen.
void on_rip_done()
Called when the CDRipper reports it is done.
void eject(const DriveManager::Drive drive)
Instructs the DriveManager to eject a drive.
void on_button(const NowPlayingComponent::Button button)
Called when a playback control button (prev/next, play/pause, stop) is clicked.
void on_eject(DriveManager::Drive drive)
Called when a drive (disc or iPod/thumb drive) is removed.
DiscComponent * _disc_component
Handles the album labels, track listing and eject/rip buttons on the main application screen.
void rip(unsigned int track)
Instructs the CDRipper to begin ripping one specific track.
void query_discdb()
Queries DiscDB for the full information of the disc inserted.
Gtk::Button * _shutdown_button
Shutdown button.
Gtk::Window * _window
Reference to the application window.
std::string _album_art_url
The URL of the currently displayed album art.
bool on_timeout()
Called when the track monitoring timer reaches zero.
DriveManager _drive_manager
Drive manager.
~Application()
Application destructor.
Application(int argc, char **argv)
Application constructor.
void on_playpause()
Play/pause button handler.
DiscDB::Disc _disc
The Disc returned by DiscDB for the inserted CD.
void on_track_selected(unsigned int track)
Called when a track is selected in the DiscComponent.
BluetoothComponent * _bluetooth_component
Handles the Bluetooth device selection screen.
void on_insert(DriveManager::Drive drive)
Called when a drive (disc or iPod/thumb drive) is inserted.
Gtk::Box * _bluetooth_box
Box holding the Bluetooth device selection screen.
void on_activate()
Called when _app is activated.
unsigned int _track
The current 1-based track being played.
Glib::RefPtr< Gtk::Application > _app
The underlying Gtk::Application.
Glib::RefPtr< Gtk::Builder > _builder
The builder initialized with the Discman UI.
void pause()
Pause handler.
char ** _argv
The application arguments.
int _argc
The application argument count.
void on_album_art_art(const std::string url)
Called when album art is selected in the AlbumArtComponent.
AlbumArtComponent * _album_art_component
Handles the album art selection screen.
void on_bluetooth_connected()
Called when the user connects to a Bluetooth device.
Gtk::Box * _album_art_box
Box holding the album art selection screen.
CDRipper * _ripper
CD ripper.
void on_bluetooth_done()
Called when the BluetoothComponent done button is clicked.
Abstracts PortAudio using a given audio sample data type.
Handles the interactions with the Bluetooth device selection screen.
Rips CDs and individual tracks to M4A files.
Handles the interactions with the album labels, track listing and ipod/eject buttons.
Manages the state of the disc drive and any removable (iPod) drive.
Drive
The two drives supported.
Handles the interactions with the "now playing" side of the main screen.
Button
Playback control button identifiers.