|
Freya
0.0.1
A Gtk3 MPD Client
|
Acts as a Proxy betwenn Browser::Database and MPD::Client, but caches requested data. More...
#include <DatabaseCache.hh>
Public Member Functions | |
| DatabaseCache (MPD::Client &client) | |
| virtual | ~DatabaseCache () |
| void | fill_filelist (MPD::AbstractItemlist &data_model, const char *path) |
| Same as MPD::Client::fill_filelist(), but gets locally cached data. | |
| void | add_item (MPD::AbstractComposite *pItem) |
| Implemented from AbstractItemlist. | |
| void | fill_queue (MPD::AbstractItemlist &data_model) |
| void | fill_queue_changes (MPD::AbstractItemlist &data_model, unsigned last_version, unsigned &first_pos) |
| void | fill_playlists (MPD::AbstractItemlist &data_model) |
| void | fill_outputs (MPD::AbstractItemlist &data_model) |
Acts as a Proxy betwenn Browser::Database and MPD::Client, but caches requested data.
Note: It is actually a Proxy FOR MPD::Client, but used by Browser::Database.
Once the Database requests a list of files for a certain path, a hashmap is looked up if it's already cached, if not DatabaseCache asks the client for the filelist.
As Hashmap a std::map was used, with the Path as key and a vector of values as Hashvalue.
Definition at line 50 of file DatabaseCache.hh.
| Browser::DatabaseCache::DatabaseCache | ( | MPD::Client & | client | ) |
| virtual Browser::DatabaseCache::~DatabaseCache | ( | ) | [virtual] |
| void Browser::DatabaseCache::add_item | ( | MPD::AbstractComposite * | pItem | ) | [virtual] |
Implemented from AbstractItemlist.
You are not supposed to call this yourself.
| pItem |
Implements MPD::AbstractItemlist.
| void Browser::DatabaseCache::fill_filelist | ( | MPD::AbstractItemlist & | data_model, |
| const char * | path | ||
| ) | [virtual] |
Same as MPD::Client::fill_filelist(), but gets locally cached data.
| data_model | |
| path |
Implements MPD::AbstractItemGenerator.
| void Browser::DatabaseCache::fill_outputs | ( | MPD::AbstractItemlist & | data_model | ) | [inline, virtual] |
Implements MPD::AbstractItemGenerator.
Definition at line 81 of file DatabaseCache.hh.
| void Browser::DatabaseCache::fill_playlists | ( | MPD::AbstractItemlist & | data_model | ) | [inline, virtual] |
Implements MPD::AbstractItemGenerator.
Definition at line 80 of file DatabaseCache.hh.
| void Browser::DatabaseCache::fill_queue | ( | MPD::AbstractItemlist & | data_model | ) | [inline, virtual] |
Implements MPD::AbstractItemGenerator.
Definition at line 78 of file DatabaseCache.hh.
| void Browser::DatabaseCache::fill_queue_changes | ( | MPD::AbstractItemlist & | data_model, |
| unsigned | last_version, | ||
| unsigned & | first_pos | ||
| ) | [inline, virtual] |
Implements MPD::AbstractItemGenerator.
Definition at line 79 of file DatabaseCache.hh.
1.8.0