[UI] First working mobile version

This commit is contained in:
emeric
2015-03-04 13:16:44 +01:00
parent e5a5e7dbc9
commit d2603da6de
27 changed files with 1071 additions and 52 deletions
+111
View File
@@ -0,0 +1,111 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Wt/WText>
#include <Wt/WTemplate>
#include <Wt/WPushButton>
#include "ArtistSearch.hpp"
namespace UserInterface {
namespace Mobile {
ArtistSearch::ArtistSearch(Database::Handler& db, Wt::WContainerWidget *parent)
: Wt::WContainerWidget(parent),
_db(db),
_resCount(0)
{
Wt::WTemplate *title = new Wt::WTemplate(this);
title->setTemplateText(Wt::WString::tr("mobile-search-title"));
title->bindWidget("text", new Wt::WText("Artists", Wt::PlainText));
}
void
ArtistSearch::clear()
{
while (count() > 1)
removeWidget(this->widget(1));
_resCount = 0;
}
void
ArtistSearch::search(Database::SearchFilter filter, size_t nb)
{
clear();
addResults(filter, nb);
}
void
ArtistSearch::addResults(Database::SearchFilter filter, std::size_t nb)
{
std::vector<std::string> artists;
{
Wt::Dbo::Transaction transaction(_db.getSession());
// Request one more to see if more results are to be expected
artists = Database::Track::getArtists(_db.getSession(), filter, _resCount, nb + 1);
}
bool expectMoreResults;
if (artists.size() == nb + 1)
{
expectMoreResults = true;
artists.pop_back();
}
else
expectMoreResults = false;
BOOST_FOREACH(std::string artist, artists)
{
Wt::WTemplate* res = new Wt::WTemplate(this);
res->setTemplateText(Wt::WString::tr("mobile-artist-res"));
Wt::WText *text = new Wt::WText(Wt::WString::fromUTF8(artist), Wt::PlainText);
res->bindWidget("name", text);
res->clicked().connect(std::bind([=] {
_sigArtistSelected(artist);
}));
}
_resCount += artists.size();;
if (expectMoreResults)
{
Wt::WTemplate* moreRes = new Wt::WTemplate(this);
moreRes->setTemplateText(Wt::WString::tr("mobile-search-more"));
moreRes->bindWidget("text", new Wt::WText("Tap to show more results..."));
moreRes->clicked().connect(std::bind([=] {
_sigMoreArtistsSelected();
removeWidget(moreRes);
addResults(filter, 20);
}));
}
}
} // namespace Mobile
} // namespace UserInterface
+58
View File
@@ -0,0 +1,58 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UI_MOBILE_ARTIST_SEARCH_HPP
#define UI_MOBILE_ARTIST_SEARCH_HPP
#include <boost/algorithm/string/split.hpp>
#include <Wt/WContainerWidget>
#include "database/DatabaseHandler.hpp"
namespace UserInterface {
namespace Mobile {
class ArtistSearch : public Wt::WContainerWidget
{
public:
ArtistSearch(Database::Handler& db, Wt::WContainerWidget *parent = 0);
void search(Database::SearchFilter filter, std::size_t nb);
// Slots
Wt::Signal<std::string>& artistSelected() { return _sigArtistSelected;}
Wt::Signal<void>& moreArtistsSelected() { return _sigMoreArtistsSelected;}
private:
Wt::Signal<std::string> _sigArtistSelected;
Wt::Signal<void> _sigMoreArtistsSelected;
void clear(void);
void addResults(Database::SearchFilter filter, size_t nb);
Database::Handler& _db;
std::size_t _resCount;
};
} // namespace Mobile
} // namespace UserInterface
#endif
+176 -3
View File
@@ -17,18 +17,191 @@
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
#include <Wt/WContainerWidget>
#include <Wt/WTemplate>
#include <Wt/WLineEdit>
#include <Wt/WPushButton>
#include <Wt/WText>
#include <Wt/WTable>
#include "MobileAudio.hpp"
#include "ArtistSearch.hpp"
#include "ReleaseSearch.hpp"
#include "TrackSearch.hpp"
#include "MobileAudioMediaPlayer.hpp"
#include "logger/Logger.hpp"
namespace UserInterface {
namespace Mobile {
Audio::Audio(Wt::WContainerWidget *parent)
: UserInterface::Audio(parent)
Audio::Audio(Database::Handler& db, Wt::WContainerWidget *parent)
: UserInterface::Audio(parent),
_db(db)
{
new Wt::WText("Mobile version not implemented", this);
// Root div has to be a "container"
this->setStyleClass("container");
Wt::WTemplate* search = new Wt::WTemplate(this);
search->setTemplateText(Wt::WString::tr("mobile-search"));
Wt::WLineEdit *edit = new Wt::WLineEdit();
edit->setEmptyText("Search...");
search->bindWidget("search", edit);
search->setMargin(10);
ArtistSearch* artistSearch = new ArtistSearch(_db, this);
ReleaseSearch* releaseSearch = new ReleaseSearch(_db, this);
TrackSearch* trackSearch = new TrackSearch(_db, this);
Wt::WTemplate* playerTemplate = new Wt::WTemplate(this);
playerTemplate->setTemplateText(Wt::WString::tr("mobile-audio-player"));
AudioMediaPlayer* mediaPlayer = new AudioMediaPlayer();
playerTemplate->bindWidget("player", mediaPlayer);
edit->changed().connect(std::bind([=] () {
std::string text = edit->text().toUTF8();
// When a new search is done, output some results from:
// Artist
// Release
// Song
std::vector<std::string> keywords;
boost::algorithm::split(keywords, text, boost::is_any_of(" "), boost::token_compress_on);
{
Database::SearchFilter filter;
BOOST_FOREACH(std::string keyword, keywords)
{
Database::SearchFilter::FieldValues likeMatch;
likeMatch[Database::SearchFilter::Field::Artist].push_back(keyword);
likeMatch[Database::SearchFilter::Field::Release].push_back(keyword);
filter.likeMatches.push_back(likeMatch);
}
releaseSearch->search(filter, 3);
}
{
Database::SearchFilter filter;
BOOST_FOREACH(std::string keyword, keywords)
{
Database::SearchFilter::FieldValues likeMatch;
likeMatch[Database::SearchFilter::Field::Artist].push_back(keyword);
filter.likeMatches.push_back(likeMatch);
}
artistSearch->search(filter, 3);
}
{
Database::SearchFilter filter;
BOOST_FOREACH(std::string keyword, keywords)
{
Database::SearchFilter::FieldValues likeMatch;
likeMatch[Database::SearchFilter::Field::Track].push_back(keyword);
filter.likeMatches.push_back(likeMatch);
}
trackSearch->search(filter, 3);
}
artistSearch->show();
releaseSearch->show();
trackSearch->show();
}));
artistSearch->moreArtistsSelected().connect(std::bind([=] {
releaseSearch->hide();
trackSearch->hide();
artistSearch->show();
}));
artistSearch->artistSelected().connect(std::bind([=] (std::string artist) {
artistSearch->hide();
trackSearch->hide();
releaseSearch->show();
Database::SearchFilter filter;
filter.exactMatch[Database::SearchFilter::Field::Artist].push_back(artist);
releaseSearch->search(filter, 20);
}, std::placeholders::_1));
releaseSearch->moreReleasesSelected().connect(std::bind([=] {
artistSearch->hide();
trackSearch->hide();
releaseSearch->show();
}));
releaseSearch->releaseSelected().connect(std::bind([=] (std::string release)
{
artistSearch->hide();
releaseSearch->hide();
trackSearch->show();
// TODO load track search with selected release
Database::SearchFilter filter;
filter.exactMatch[Database::SearchFilter::Field::Release].push_back(release);
trackSearch->search(filter, 20);
}, std::placeholders::_1));
trackSearch->moreTracksSelected().connect(std::bind([=]
{
artistSearch->hide();
releaseSearch->hide();
}));
trackSearch->trackPlay().connect(std::bind([=] (Database::Track::id_type id)
{
LMS_LOG(MOD_UI, SEV_DEBUG) << "Playing track id " << id;
Wt::Dbo::Transaction transaction(_db.getSession());
Database::Track::pointer track = Database::Track::getById(_db.getSession(), id);
if (track)
{
// Determine the output format using the encoding of the player
Transcode::Format::Encoding encoding;
switch(AudioMediaPlayer::getEncoding())
{
case Wt::WMediaPlayer::MP3: encoding = Transcode::Format::MP3; break;
case Wt::WMediaPlayer::M4A: encoding = Transcode::Format::M4A; break;
case Wt::WMediaPlayer::OGA: encoding = Transcode::Format::OGA; break;
default:
encoding = Transcode::Format::MP3;
}
// TODO compute parameters using user s profile
Transcode::InputMediaFile inputFile(track->getPath());
Transcode::Parameters parameters(inputFile, Transcode::Format::get(encoding));
parameters.setBitrate(Transcode::Stream::Audio, 96000);
mediaPlayer->play(parameters);
}
} , std::placeholders::_1));
// Initially, populate the widgets using an empty search
{
Database::SearchFilter filter; // empty filter
artistSearch->search(filter, 3);
releaseSearch->search(filter, 3);
trackSearch->search(filter, 3);
}
}
} // namespace Mobile
+7 -2
View File
@@ -22,6 +22,8 @@
#include <Wt/WContainerWidget>
#include "database/DatabaseHandler.hpp"
#include "audio/Audio.hpp"
namespace UserInterface {
@@ -30,10 +32,13 @@ namespace Mobile {
class Audio : public UserInterface::Audio
{
public:
Audio(Wt::WContainerWidget *parent = 0);
Audio(Database::Handler& db, Wt::WContainerWidget *parent = 0);
void search(std::string text) {};
void search(std::string text) {}
private:
Database::Handler& _db;
};
} // namespace Mobile
@@ -0,0 +1,60 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Wt/WApplication>
#include <Wt/WEnvironment>
#include "MobileAudioMediaPlayer.hpp"
#include "resource/AvConvTranscodeStreamResource.hpp"
namespace UserInterface {
namespace Mobile {
Wt::WMediaPlayer::Encoding
AudioMediaPlayer::getEncoding()
{
const Wt::WEnvironment& env = Wt::WApplication::instance()->environment();
if (env.agentIsIE())
return Wt::WMediaPlayer::MP3;
else
return Wt::WMediaPlayer::OGA;
}
AudioMediaPlayer::AudioMediaPlayer(Wt::WContainerWidget *parent)
: Wt::WContainerWidget(parent)
{
_player = new Wt::WMediaPlayer(Wt::WMediaPlayer::Audio, this);
_player->addSource( getEncoding(), "" );
}
void
AudioMediaPlayer::play(const Transcode::Parameters& parameters)
{
AvConvTranscodeStreamResource *resource = new AvConvTranscodeStreamResource( parameters, this );
_player->clearSources();
_player->addSource( getEncoding(), Wt::WLink(resource));
_player->play();
}
} // namespace UserInterface
} // namespace Mobile
@@ -0,0 +1,50 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UI_AUDIO_MOBILE_MEDIA_PLAYER_HPP
#define UI_AUDIO_MOBILE_MEDIA_PLAYER_HPP
#include <Wt/WContainerWidget>
#include <Wt/WMediaPlayer>
#include "transcode/Parameters.hpp"
namespace UserInterface {
namespace Mobile {
class AudioMediaPlayer : public Wt::WContainerWidget
{
public:
static Wt::WMediaPlayer::Encoding getEncoding();
AudioMediaPlayer(Wt::WContainerWidget *parent = 0);
void play(const Transcode::Parameters& parameters);
private:
Wt::WMediaPlayer *_player;
};
} // namespace UserInterface
} // namespace Mobile
#endif
+120
View File
@@ -0,0 +1,120 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Wt/WText>
#include <Wt/WImage>
#include <Wt/WPushButton>
#include <Wt/WTemplate>
#include "logger/Logger.hpp"
#include "ReleaseSearch.hpp"
namespace UserInterface {
namespace Mobile {
ReleaseSearch::ReleaseSearch(Database::Handler& db, Wt::WContainerWidget *parent)
: Wt::WContainerWidget(parent),
_db(db),
_resCount(0)
{
Wt::WTemplate* title = new Wt::WTemplate(this);
title->setTemplateText(Wt::WString::tr("mobile-search-title"));
title->bindWidget("text", new Wt::WText("Releases", Wt::PlainText));
_coverResource = new CoverResource(db, 56);
}
void
ReleaseSearch::clear()
{
while (count() > 1)
removeWidget(this->widget(1));
_resCount = 0;
}
void
ReleaseSearch::search(Database::SearchFilter filter, size_t max)
{
clear();
addResults(filter, max);
}
void
ReleaseSearch::addResults(Database::SearchFilter filter, size_t nb)
{
std::vector<std::string> releases;
{
Wt::Dbo::Transaction transaction(_db.getSession());
// Request one more to see if more results are to be expected
releases = Database::Track::getReleases(_db.getSession(), filter, _resCount, nb + 1);
}
bool expectMoreResults;
if (releases.size() == nb + 1)
{
expectMoreResults = true;
releases.pop_back();
}
else
expectMoreResults = false;
BOOST_FOREACH(std::string release, releases)
{
Wt::WTemplate* releaseWidget = new Wt::WTemplate(this);
releaseWidget->setTemplateText(Wt::WString::tr("mobile-release-res"));
Wt::WImage *cover = new Wt::WImage();
cover->setStyleClass("center-block");
cover->setImageLink( Wt::WLink( _coverResource->getReleaseUrl(release)));
releaseWidget->bindWidget("cover", cover);
releaseWidget->bindWidget("name", new Wt::WText(Wt::WString::fromUTF8(release), Wt::PlainText));
releaseWidget->clicked().connect(std::bind([=] {
_sigReleaseSelected(release);
}));
}
_resCount += releases.size();;
if (expectMoreResults)
{
Wt::WTemplate* moreRes = new Wt::WTemplate(this);
moreRes->setTemplateText(Wt::WString::tr("mobile-search-more"));
moreRes->bindWidget("text", new Wt::WText("Tap to show more results..."));
moreRes->clicked().connect(std::bind([=] {
_sigMoreReleasesSelected();
removeWidget(moreRes);
addResults(filter, 20);
}));
}
}
} // namespace Mobile
} // namespace UserInterface
+65
View File
@@ -0,0 +1,65 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UI_MOBILE_RELEASE_SEARCH_HPP
#define UI_MOBILE_RELEASE_SEARCH_HPP
#include <boost/algorithm/string/split.hpp>
#include <Wt/WContainerWidget>
#include <Wt/WSignal>
#include "resource/CoverResource.hpp"
#include "database/DatabaseHandler.hpp"
namespace UserInterface {
namespace Mobile {
class ReleaseSearch : public Wt::WContainerWidget
{
public:
ReleaseSearch(Database::Handler& db, Wt::WContainerWidget *parent = 0);
void search(Database::SearchFilter filter, size_t nb);
// Slots
Wt::Signal<std::string>& releaseSelected() { return _sigReleaseSelected;}
Wt::Signal<void>& moreReleasesSelected() { return _sigMoreReleasesSelected;}
private:
Wt::Signal<std::string> _sigReleaseSelected;
Wt::Signal<void> _sigMoreReleasesSelected;
void clear(void);
void addResults(Database::SearchFilter filter, size_t nb);
Database::Handler& _db;
CoverResource* _coverResource;
std::size_t _resCount;
};
} // namespace Mobile
} // namespace UserInterface
#endif
+133
View File
@@ -0,0 +1,133 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#include <Wt/WText>
#include <Wt/WImage>
#include <Wt/WPushButton>
#include <Wt/WTemplate>
#include "logger/Logger.hpp"
#include "TrackSearch.hpp"
namespace UserInterface {
namespace Mobile {
TrackSearch::TrackSearch(Database::Handler& db, Wt::WContainerWidget *parent)
: Wt::WContainerWidget(parent),
_db(db),
_resCount(0)
{
Wt::WTemplate* title = new Wt::WTemplate(this);
title->setTemplateText(Wt::WString::tr("mobile-search-title"));
title->bindWidget("text", new Wt::WText("Tracks", Wt::PlainText));
_coverResource = new CoverResource(db, 56);
}
void
TrackSearch::clear()
{
while (count() > 1)
removeWidget(this->widget(1));
_resCount = 0;
}
void
TrackSearch::search(Database::SearchFilter filter, size_t max)
{
clear();
addResults(filter, max);
}
void
TrackSearch::addResults(Database::SearchFilter filter, size_t nb)
{
Wt::Dbo::Transaction transaction(_db.getSession());
std::vector< Database::Track::pointer > tracks = Database::Track::getTracks(_db.getSession(), filter, _resCount, nb + 1);
bool expectMoreResults;
if (tracks.size() == nb + 1)
{
expectMoreResults = true;
tracks.pop_back();
}
else
expectMoreResults = false;
BOOST_FOREACH(Database::Track::pointer track, tracks)
{
Wt::WTemplate* trackWidget = new Wt::WTemplate(this);
trackWidget->setTemplateText(Wt::WString::tr("mobile-track-res"));
Wt::WImage *cover = new Wt::WImage();
cover->setStyleClass("center-block");
cover->setImageLink( Wt::WLink (_coverResource->getTrackUrl(track.id())) );
trackWidget->bindWidget("cover", cover);
// Track Name (bold)
// Artist - Album (italic)
Wt::WContainerWidget *container = new Wt::WContainerWidget();
Wt::WText *title = new Wt::WText(Wt::WString::fromUTF8(track->getName()), Wt::PlainText);
title->setStyleClass("mobile-track");
container->addWidget(title);
if (!track->getArtistName().empty()
|| !track->getReleaseName().empty())
{
title->setInline(false);
Wt::WText *artistRelease = new Wt::WText(Wt::WString::fromUTF8(track->getArtistName() + " - " + track->getReleaseName()), Wt::PlainText);
artistRelease->setStyleClass("mobile-artist");
container->addWidget(artistRelease);
}
trackWidget->bindWidget("name", container);
Wt::WPushButton *playBtn = new Wt::WPushButton("Play");
playBtn->setStyleClass("btn-primary center-block");
playBtn->clicked().connect(std::bind([=] {
_sigTrackPlay.emit(track.id());
}));
trackWidget->bindWidget("btn", playBtn);
}
_resCount += tracks.size();
if (expectMoreResults)
{
Wt::WTemplate* moreRes = new Wt::WTemplate(this);
moreRes->setTemplateText(Wt::WString::tr("mobile-search-more"));
moreRes->bindWidget("text", new Wt::WText("Tap to show more results..."));
moreRes->clicked().connect(std::bind([=] {
_sigMoreTracksSelected();
removeWidget(moreRes);
addResults(filter, 20);
}));
}
}
} // namespace Mobile
} // namespace UserInterface
+65
View File
@@ -0,0 +1,65 @@
/*
* Copyright (C) 2015 Emeric Poupon
*
* This file is part of LMS.
*
* LMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LMS. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UI_MOBILE_TRACK_SEARCH_HPP
#define UI_MOBILE_TRACK_SEARCH_HPP
#include <boost/algorithm/string/split.hpp>
#include <Wt/WContainerWidget>
#include <Wt/WSignal>
#include "resource/CoverResource.hpp"
#include "database/DatabaseHandler.hpp"
namespace UserInterface {
namespace Mobile {
class TrackSearch : public Wt::WContainerWidget
{
public:
TrackSearch(Database::Handler& db, Wt::WContainerWidget *parent = 0);
void search(Database::SearchFilter filter, size_t nb);
// Slots
Wt::Signal<Database::Track::id_type>& trackPlay() { return _sigTrackPlay;}
Wt::Signal<void>& moreTracksSelected() { return _sigMoreTracksSelected;}
private:
Wt::Signal<Database::Track::id_type> _sigTrackPlay;
Wt::Signal<void> _sigMoreTracksSelected;
void clear(void);
void addResults(Database::SearchFilter filter, size_t nb);
Database::Handler& _db;
CoverResource* _coverResource;
std::size_t _resCount;
};
} // namespace Mobile
} // namespace UserInterface
#endif