WIP. Database updater now has its own namespace and dedicated directory
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
AudioDatabaseWidget::AudioDatabaseWidget( DatabaseHandler& db, Wt::WContainerWidget *parent)
|
||||
AudioDatabaseWidget::AudioDatabaseWidget( Database::Handler& db, Wt::WContainerWidget *parent)
|
||||
: Wt::WContainerWidget(parent),
|
||||
_refreshingFilters(false)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace UserInterface {
|
||||
class AudioDatabaseWidget : public Wt::WContainerWidget
|
||||
{
|
||||
public:
|
||||
AudioDatabaseWidget( DatabaseHandler& db, Wt::WContainerWidget *parent = 0);
|
||||
AudioDatabaseWidget( Database::Handler& db, Wt::WContainerWidget *parent = 0);
|
||||
|
||||
void search(const std::string& text);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
TableFilterWidget::TableFilterWidget(DatabaseHandler& db, std::string table, std::string field, Wt::WContainerWidget* parent)
|
||||
TableFilterWidget::TableFilterWidget(Database::Handler& db, std::string table, std::string field, Wt::WContainerWidget* parent)
|
||||
: FilterWidget( parent ),
|
||||
_db(db),
|
||||
_table(table),
|
||||
|
||||
@@ -14,7 +14,7 @@ class TableFilterWidget : public FilterWidget
|
||||
{
|
||||
|
||||
public:
|
||||
TableFilterWidget(DatabaseHandler& db, std::string table, std::string field, Wt::WContainerWidget* parent = 0);
|
||||
TableFilterWidget(Database::Handler& db, std::string table, std::string field, Wt::WContainerWidget* parent = 0);
|
||||
|
||||
// Set constraints on this filter
|
||||
virtual void refresh(const Constraint& constraint);
|
||||
@@ -24,7 +24,7 @@ class TableFilterWidget : public FilterWidget
|
||||
|
||||
protected:
|
||||
|
||||
DatabaseHandler& _db;
|
||||
Database::Handler& _db;
|
||||
const std::string _table;
|
||||
const std::string _field;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
TrackWidget::TrackWidget( DatabaseHandler& db, Wt::WContainerWidget* parent)
|
||||
TrackWidget::TrackWidget( Database::Handler& db, Wt::WContainerWidget* parent)
|
||||
: FilterWidget( parent ),
|
||||
_db(db),
|
||||
_tableView(nullptr),
|
||||
|
||||
@@ -15,7 +15,7 @@ class TrackWidget : public FilterWidget
|
||||
{
|
||||
public:
|
||||
|
||||
TrackWidget( DatabaseHandler& db, Wt::WContainerWidget* parent = 0);
|
||||
TrackWidget( Database::Handler& db, Wt::WContainerWidget* parent = 0);
|
||||
|
||||
// Set constraints created by parent filters
|
||||
void refresh(const Constraint& constraint);
|
||||
@@ -34,11 +34,11 @@ class TrackWidget : public FilterWidget
|
||||
|
||||
Wt::Signal< boost::filesystem::path > _trackSelected;
|
||||
|
||||
DatabaseHandler& _db;
|
||||
Database::Handler& _db;
|
||||
|
||||
typedef boost::tuple<Database::Track::pointer, Database::Release::pointer, Database::Artist::pointer> ResultType;
|
||||
Wt::Dbo::QueryModel< ResultType > _queryModel;
|
||||
Wt::WTableView* _tableView;
|
||||
Wt::Dbo::QueryModel< ResultType > _queryModel;
|
||||
Wt::WTableView* _tableView;
|
||||
|
||||
void updateStats(void);
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ class SessionData
|
||||
void setAuthenticatedUser(std::string user);
|
||||
|
||||
|
||||
DatabaseHandler& getDatabaseHandler() { return _db;}
|
||||
const DatabaseHandler& getDatabaseHandler() const { return _db;}
|
||||
Database::Handler& getDatabaseHandler() { return _db;}
|
||||
const Database::Handler& getDatabaseHandler() const { return _db;}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
DatabaseHandler _db;
|
||||
std::string _authenticatedUser;
|
||||
Database::Handler _db;
|
||||
std::string _authenticatedUser;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
namespace UserInterface {
|
||||
|
||||
VideoDatabaseWidget::VideoDatabaseWidget(DatabaseHandler& db, Wt::WContainerWidget *parent)
|
||||
VideoDatabaseWidget::VideoDatabaseWidget(Database::Handler& db, Wt::WContainerWidget *parent)
|
||||
: Wt::WContainerWidget(parent),
|
||||
_db(db)
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace UserInterface {
|
||||
class VideoDatabaseWidget : public Wt::WContainerWidget
|
||||
{
|
||||
public:
|
||||
VideoDatabaseWidget( DatabaseHandler& db, Wt::WContainerWidget *parent = 0);
|
||||
VideoDatabaseWidget( Database::Handler& db, Wt::WContainerWidget *parent = 0);
|
||||
|
||||
// Signals
|
||||
Wt::Signal< boost::filesystem::path >& playVideo() { return _playVideo; }
|
||||
@@ -28,7 +28,7 @@ class VideoDatabaseWidget : public Wt::WContainerWidget
|
||||
void addDirectory(const std::string& name, const boost::filesystem::path& path);
|
||||
void addVideo(const std::string& name, const boost::posix_time::time_duration& duration, const boost::filesystem::path& path);
|
||||
|
||||
DatabaseHandler& _db;
|
||||
Database::Handler& _db;
|
||||
|
||||
Wt::Signal< boost::filesystem::path > _playVideo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user