+/* VLC-REMOTE for MAEMO 5
+* Copyright (C) 2010 Schutz Sacha <istdasklar@gmail.com>, Dru Moore <usr@dru-id.co.uk>, Yann Nave <yannux@onbebop.net>
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2,
+* or (at your option) any later version, as published by the Free
+* Software Foundation
+*
+* This program 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 this program; if not, write to the
+* Free Software Foundation, Inc.,
+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+#include "appsettings.h"
+// initialize static storage for settings reference
+//QSettings AppSettings::settings;
+
+AppSettings::AppSettings() {
+}
+
+AppSettings::~AppSettings() {
+ ;
+}
+
+QString AppSettings::getCurrentKey() {
+ QSettings sets;
+ return sets.value("config/currentKey", "").toString();
+}
+QString AppSettings::getCurrentIp() {
+ QSettings sets;
+ return sets.value("account/" + getCurrentKey(), "").toString();
+}
+VlcDirectory AppSettings::getHomeDirectory() {
+ QSettings sets;
+ VlcDirectory home;
+ home.name = sets.value("config/accounts/" + getCurrentKey() + "/homeDirName", "Default").toString();
+ home.path = sets.value("config/accounts/" + getCurrentKey() + "/homeDirPath", "~/").toString();
+ return home;
+}
+bool AppSettings::setHomeDirectory(VlcDirectory dir) {
+ QSettings sets;
+ sets.setValue("config/accounts/" + getCurrentKey() + "/homeDirName", dir.name);
+ sets.setValue("config/accounts/" + getCurrentKey() + "/homeDirPath", dir.path);
+ return true;
+}
+QList<VlcDirectory>* AppSettings::getFavourites() { return new QList<VlcDirectory>(); }
+bool AppSettings::addFavourite(VlcDirectory dir) { return true; }
+bool AppSettings::deleteFavourite(VlcDirectory dir) { return true; }