5 #include <QStandardItem>
7 #include <QNetworkReply>
9 #include <QSignalMapper>
11 class playlist : public QAbstractTableModel
26 //this Enum MUST BE sequantial
27 //And when changed must update the length
28 #define PLAYLISTENUMS 9
55 QList<songElement *>* getList();
56 explicit playlist(QObject *parent = 0);
57 int addSong(QStandardItem *item,QString name);
58 void removeSong(int position);
59 void getSong(int position);
60 QIODevice * getBuffer(int position);
61 bool isStream(int position);
62 void markPlayed(int position);
63 void deleteSong(int position);
64 void setGscom(gscom *comm);
65 void freeMemory(int position);
67 void setCurrentPlaying(int position);
69 int findFirstNotPlayed();
70 void beginDownload(int position);
71 bool existAt(int position);
73 //Implemented virtual classes for Model View
74 QVariant data(const QModelIndex &index, int role) const;
75 int columnCount(const QModelIndex &parent) const;
76 int rowCount(const QModelIndex &parent) const;
79 void downloadProgress(int position, qint64 d, qint64 t);
80 void bufferReady(int position);
81 void sFailure(int position,failType);
82 void downloadComplete(int position);
84 //void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
85 void rowsInserted ( const QModelIndex & parent, int start, int end );
89 void downloadSlot(qint64 d, qint64 t);
90 void networkReplyFinish();
91 void downloadDone(int position);
93 void setBufferRdy(int b);
94 void getNError(QNetworkReply::NetworkError);
101 int currentplayingitem;
103 QList<songElement *> *pList;
104 QSignalMapper *mapper;
105 QNetworkReply *reply;
106 QNetworkAccessManager *manager;
107 int currentdownloaditem;