Updated the licenses to include my details
[vlc-remote] / playlistmainwindow.h
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
6 *   Software Foundation
7 *
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
12 *
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.
17 */
18 #ifndef PLAYLISTMAINWINDOW_H
19 #define PLAYLISTMAINWINDOW_H
20
21 #include <QMainWindow>
22 #include <QTimer>
23 #include <QtNetwork>
24 #include <QtXml>
25 #include "vlcplaylistelementsimple.h"
26
27 #ifndef LIST_ITEM_TYPE_OFFSET
28 #define LIST_ITEM_TYPE_OFFSET 1000
29 #endif
30
31 namespace Ui {
32     class PlayListMainWindow;
33 }
34
35 class PlayListMainWindow : public QMainWindow {
36     Q_OBJECT
37 public:
38     explicit PlayListMainWindow(QWidget *parent = 0);
39     ~PlayListMainWindow();
40     void init();
41 public slots:
42     void onClear();
43     void onShuffle();
44     void onLoop();
45     void onPlay();
46     void onRepeat();
47     void onRemove();
48     void requestPlayList();
49     void onListSelectionChanged();
50     void finished(QNetworkReply * reply);
51     void readReady();
52     void showPlayList();
53
54 protected slots:
55     void parseXmlPlayList();
56     void updateList();
57
58 protected:
59     void changeEvent(QEvent *e);
60     VlcPlayListElementSimple getElementFromText(QString text);
61     QString getExtension(QString path, QString extension);
62
63 private:
64     Ui::PlayListMainWindow *ui;
65     QTimer * mTimer;
66     QString mIp;
67     QNetworkAccessManager * mNetManager;
68     QList<VlcPlayListElementSimple>* mContents;
69     VlcPlayListElementSimple mCurrentElement;
70     int mCurrentVlcIndex;
71     int mCurrentDepth;
72     QByteArray mResponse;
73 };
74
75 #endif // PLAYLISTMAINWINDOW_H