1 /* VLC-REMOTE for MAEMO 5
2 * Copyright (C) 2010 Schutz Sacha <istdasklar@gmail.com>, Dru Moore <usr@dru-id.co.uk>, Yann Nave <yannux@onbebop.net>
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2,
5 * or (at your option) any later version, as published by the Free
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details
13 * You should have received a copy of the GNU General Public
14 * License along with this program; if not, write to the
15 * Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 #ifndef PLAYLISTMAINWINDOW_H
19 #define PLAYLISTMAINWINDOW_H
21 #include <QMainWindow>
25 #include "vlcplaylistelementsimple.h"
26 #include "vlcstatus.h"
28 #ifndef LIST_ITEM_TYPE_OFFSET
29 #define LIST_ITEM_TYPE_OFFSET 1000
33 class PlayListMainWindow;
36 class PlayListMainWindow : public QMainWindow {
39 explicit PlayListMainWindow(QWidget *parent = 0);
40 ~PlayListMainWindow();
49 void requestPlayList();
50 void onListSelectionChanged();
51 void finished(QNetworkReply * reply);
53 void error(QNetworkReply::NetworkError code);
55 void updateUiWithCurrentStatus(VlcStatus * status);
58 void parseXmlPlayList();
60 int parsePlayListItem(QDomNode *node, QString *extension, bool *hasArt, int *currentLeafId, int depth);
63 void idUpdated(int id, bool hasArt, QString extension);
66 void changeEvent(QEvent *e);
67 VlcPlayListElementSimple getElementFromId(int id);
68 QString getExtension(QString path, QString extension);
71 Ui::PlayListMainWindow *ui;
74 QNetworkAccessManager * mNetManager;
75 QList<VlcPlayListElementSimple>* mContents;
76 VlcPlayListElementSimple mCurrentElement;
82 #endif // PLAYLISTMAINWINDOW_H