|
Discman
|
Captures the Discman application global scope. More...
#include <application.h>

Public Member Functions | |
| Application (int argc, char **argv) | |
| Application constructor. | |
| ~Application () | |
| Application destructor. | |
| void | run () |
| Runs Discman. | |
Private Member Functions | |
| void | on_activate () |
| Called when _app is activated. | |
| void | on_insert (DriveManager::Drive drive) |
| Called when a drive (disc or iPod/thumb drive) is inserted. | |
| void | on_eject (DriveManager::Drive drive) |
| Called when a drive (disc or iPod/thumb drive) is removed. | |
| void | on_bluetooth_connected () |
| Called when the user connects to a Bluetooth device. | |
| void | on_bluetooth_done () |
| Called when the BluetoothComponent done button is clicked. | |
| void | on_track_progress (unsigned int track, unsigned int progress) |
| Called when the CDRipper reports progress on a certain track. | |
| void | on_rip_done () |
| Called when the CDRipper reports it is done. | |
| void | on_album_art_done () |
| Called when the AlbumArtComponent done button is clicked. | |
| void | on_album_art_art (const std::string url) |
| Called when album art is selected in the AlbumArtComponent. | |
| void | on_track_selected (unsigned int track) |
| Called when a track is selected in the DiscComponent. | |
| void | on_button (const NowPlayingComponent::Button button) |
| Called when a playback control button (prev/next, play/pause, stop) is clicked. | |
| void | on_album_art_button () |
| AlbumArtComponent done button handler. | |
| void | on_bluetooth_button () |
| Bluetooth button handler. | |
| void | on_shutdown_button () |
| Shutdown button handler. | |
| bool | on_timeout () |
| Called when the track monitoring timer reaches zero. | |
| void | eject (const DriveManager::Drive drive) |
| Instructs the DriveManager to eject a drive. | |
| 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. | |
Playback control button handlers | |
Individual handlers called by on_button(). | |
| void | on_prev () |
| Previous button handler. | |
| void | on_playpause () |
| Play/pause button handler. | |
| void | on_stop () |
| Stop button handler. | |
| void | on_next () |
| Next button handler. | |
Playback control handlers | |
Delegates called by the control button handlers. | |
| void | play (unsigned int track) |
| Play track handler (used for previous/next). | |
| void | play () |
| Play handler. | |
| void | pause () |
| Pause handler. | |
| void | stop () |
| Stop handler. | |
Private Attributes | |
| int | _argc |
| The application argument count. | |
| char ** | _argv |
| The application arguments. | |
| Glib::RefPtr< Gtk::Builder > | _builder |
| The builder initialized with the Discman UI. | |
| Glib::RefPtr< Gtk::Application > | _app |
| The underlying Gtk::Application. | |
| Gtk::Window * | _window |
| Reference to the application window. | |
| DriveManager | _drive_manager |
| Drive manager. | |
| CDRipper * | _ripper |
| CD ripper. | |
| DiscDB::Disc | _disc |
| The Disc returned by DiscDB for the inserted CD. | |
| AudioOutput< int16_t > * | _audio_output |
| The audio output. | |
| unsigned int | _track |
| The current 1-based track being played. | |
| std::string | _album_art_url |
| The URL of the currently displayed album art. | |
| Glib::RefPtr< Gio::DBus::Proxy > | _systemd_proxy |
| The systemd D-Bus proxy, used for host shutdown. | |
| sigc::connection | _timer_connection |
| A connection of a timer to the callback that periodically checks the current track state. | |
| Gtk::Button * | _shutdown_button |
| Shutdown button. | |
Top-level widgets | |
The application maintains references to some top-level widgets. | |
| Gtk::Stack * | _stack |
| Stack that switches between application screens. | |
| Gtk::Box * | _player_box |
| Box holding the main application screen. | |
| Gtk::Box * | _bluetooth_box |
| Box holding the Bluetooth device selection screen. | |
| Gtk::Box * | _album_art_box |
| Box holding the album art selection screen. | |
Components | |
A component is responsible for managing interactions with a subset of the widgets available on a particular application screen. | |
| DiscComponent * | _disc_component |
| Handles the album labels, track listing and eject/rip buttons on the main application screen. | |
| NowPlayingComponent * | _now_playing_component |
| Handles the left-hand side of the main application screen showing album art and current track. | |
| BluetoothComponent * | _bluetooth_component |
| Handles the Bluetooth device selection screen. | |
| AlbumArtComponent * | _album_art_component |
| Handles the album art selection screen. | |
Captures the Discman application global scope.
Definition at line 39 of file application.h.
| Application::Application | ( | int | argc, |
| char ** | argv ) |
Application constructor.
| [in] | argc | Argument count. |
| [in] | argv | Arguments. |
Definition at line 9 of file application.cc.
| Application::~Application | ( | ) |
Application destructor.
Definition at line 66 of file application.cc.
|
private |
Instructs the DriveManager to eject a drive.
| [in] | drive | The drive to eject. |
Definition at line 261 of file application.cc.
|
private |
Called when _app is activated.
Definition at line 144 of file application.cc.
|
private |
Called when album art is selected in the AlbumArtComponent.
Definition at line 175 of file application.cc.
|
private |
AlbumArtComponent done button handler.
Definition at line 154 of file application.cc.
|
private |
Called when the AlbumArtComponent done button is clicked.
Definition at line 171 of file application.cc.
|
private |
Bluetooth button handler.
Definition at line 149 of file application.cc.
|
private |
Called when the user connects to a Bluetooth device.
Definition at line 158 of file application.cc.
|
private |
Called when the BluetoothComponent done button is clicked.
Definition at line 166 of file application.cc.
|
private |
Called when a playback control button (prev/next, play/pause, stop) is clicked.
| [in] | button | the button clicked. |
Definition at line 184 of file application.cc.
|
private |
Called when a drive (disc or iPod/thumb drive) is removed.
| [in] | drive | The drive removed (disc or iPod/thumb drive). |
Definition at line 111 of file application.cc.
|
private |
Called when a drive (disc or iPod/thumb drive) is inserted.
| [in] | drive | The drive inserted (disc or iPod/thumb drive). |
Definition at line 87 of file application.cc.
|
private |
Next button handler.
|
private |
Play/pause button handler.
|
private |
Previous button handler.
|
private |
Called when the CDRipper reports it is done.
Definition at line 300 of file application.cc.
|
private |
Shutdown button handler.
Definition at line 220 of file application.cc.
|
private |
Stop button handler.
|
private |
Called when the track monitoring timer reaches zero.
Definition at line 205 of file application.cc.
|
private |
Called when the CDRipper reports progress on a certain track.
| [in] | track | the 1-based index of the track. |
| [in] | progress | the current percentage completion of the track. |
Definition at line 296 of file application.cc.
|
private |
Called when a track is selected in the DiscComponent.
| [in] | track | the 1-based index of the track. |
Definition at line 180 of file application.cc.
|
private |
|
private |
|
private |
Play track handler (used for previous/next).
| track | the 1-base index of the track to play. |
Definition at line 224 of file application.cc.
|
private |
Queries DiscDB for the full information of the disc inserted.
Definition at line 127 of file application.cc.
|
private |
Instructs the CDRipper to begin ripping one specific track.
| [in] | track | The 1-based index of the track. |
Definition at line 271 of file application.cc.
| void Application::run | ( | ) |
Runs Discman.
Definition at line 83 of file application.cc.
|
private |
|
private |
Box holding the album art selection screen.
Definition at line 79 of file application.h.
|
private |
Handles the album art selection screen.
Definition at line 91 of file application.h.
|
private |
The URL of the currently displayed album art.
Definition at line 66 of file application.h.
|
private |
The underlying Gtk::Application.
Definition at line 59 of file application.h.
|
private |
The application argument count.
Definition at line 55 of file application.h.
|
private |
The application arguments.
Definition at line 56 of file application.h.
|
private |
The audio output.
Definition at line 64 of file application.h.
|
private |
Box holding the Bluetooth device selection screen.
Definition at line 78 of file application.h.
|
private |
Handles the Bluetooth device selection screen.
Definition at line 90 of file application.h.
|
private |
The builder initialized with the Discman UI.
Definition at line 58 of file application.h.
|
private |
The Disc returned by DiscDB for the inserted CD.
Definition at line 63 of file application.h.
|
private |
Handles the album labels, track listing and eject/rip buttons on the main application screen.
Definition at line 88 of file application.h.
|
private |
Drive manager.
Definition at line 61 of file application.h.
|
private |
Handles the left-hand side of the main application screen showing album art and current track.
Definition at line 89 of file application.h.
|
private |
Box holding the main application screen.
Definition at line 77 of file application.h.
|
private |
CD ripper.
Definition at line 62 of file application.h.
|
private |
Shutdown button.
Definition at line 94 of file application.h.
|
private |
Stack that switches between application screens.
Definition at line 76 of file application.h.
|
private |
The systemd D-Bus proxy, used for host shutdown.
Definition at line 68 of file application.h.
|
private |
A connection of a timer to the callback that periodically checks the current track state.
Definition at line 70 of file application.h.
|
private |
The current 1-based track being played.
Definition at line 65 of file application.h.
|
private |
Reference to the application window.
Definition at line 60 of file application.h.