|
Freya
0.0.1
A Gtk3 MPD Client
|
The Base to MPD::Client. More...
#include <BaseClient.hh>
Public Member Functions | |
| void | go_idle () |
| Go into idle mode, you are not allowed to send commands while idling! | |
| void | go_busy () |
| Leave idle mode, so you can send commands to the server. | |
| Connection & | get_connection () |
| Returns the underlying connection. | |
| bool | is_connected () |
| true if connected | |
| void | begin () |
| Start a commandlist. | |
| void | commit () |
| Commit the commandlist. | |
| Status * | get_status () |
| Get the current MPD::Status. | |
| EventNotifier & | signal_client_update () |
| Get the notify sigc::signal. | |
| ConnectionNotifier & | signal_connection_change () |
| Register for connection changes. | |
| void | force_update () |
| Forces client update. | |
| Query * | create_db_songs_query (bool exact=false) |
| Creates a Query to search songs in the the Database. | |
| Query * | create_db_tag_query (mpd_tag_type tag) |
| Creates a Query to search tags in the Database. | |
Protected Member Functions | |
| BaseClient () | |
| Do not allow to instantiate BaseClient. | |
| bool | __connect () |
| This is called internally by MPD::Client and does the actual connect work. | |
| bool | __disconnect () |
| Same as __connect() | |
Protected Attributes | |
| MPD::Connection | m_Conn |
| The connection to the MPD server. | |
| MPD::Listener * | mp_Listener |
| Event Listener. | |
| bool | m_ListBegun |
| BaseClient::begin() was called but not yet BaseClient::commit() | |
The Base to MPD::Client.
BaseClient does not offer any special command it can send to the server, but is able to set up everything related to connections, i.e setting up the Listener and the connection or reconnection once connection is lost connect() is not a public method, since you are not supposed to instanciate this class, MPD::Client offers the connect() you want to use.
The splitting between BaseClient and Client was done to allow Client Extensions, i.e. AudioOutput, that implements certain mpd commands to enable audio outputs.
Definition at line 52 of file BaseClient.hh.
| MPD::BaseClient::BaseClient | ( | ) | [protected] |
Do not allow to instantiate BaseClient.
| bool MPD::BaseClient::__connect | ( | ) | [protected] |
This is called internally by MPD::Client and does the actual connect work.
| bool MPD::BaseClient::__disconnect | ( | ) | [protected] |
Same as __connect()
| void MPD::BaseClient::begin | ( | ) |
Start a commandlist.
| void MPD::BaseClient::commit | ( | ) |
Commit the commandlist.
| Query* MPD::BaseClient::create_db_songs_query | ( | bool | exact = false | ) |
| Query* MPD::BaseClient::create_db_tag_query | ( | mpd_tag_type | tag | ) |
| void MPD::BaseClient::force_update | ( | ) |
Forces client update.
Updates status, stats, current song and sends all possible events to all connected listeners
Returns the underlying connection.
You are not supposed to call this as user of the client, it's use is intended as client extension that need to send it's own commands to MPD.
Get the current MPD::Status.
WARNING: This function does not guarantee to be up-to-date!!! If you need always the last status you may have to register for client updates, since the mainloop iteration might take a few cycles. It is therefore not encouraged to be used.
| void MPD::BaseClient::go_busy | ( | ) |
Leave idle mode, so you can send commands to the server.
| void MPD::BaseClient::go_idle | ( | ) |
Go into idle mode, you are not allowed to send commands while idling!
| bool MPD::BaseClient::is_connected | ( | ) |
true if connected
Get the notify sigc::signal.
Use connect() on it. This is called always once a new event happens. See the typedef in Listener.hh for the exact signature
Register for connection changes.
MPD::Connection MPD::BaseClient::m_Conn [protected] |
The connection to the MPD server.
Definition at line 170 of file BaseClient.hh.
bool MPD::BaseClient::m_ListBegun [protected] |
BaseClient::begin() was called but not yet BaseClient::commit()
Definition at line 179 of file BaseClient.hh.
MPD::Listener* MPD::BaseClient::mp_Listener [protected] |
Event Listener.
Definition at line 174 of file BaseClient.hh.
1.8.0