1 /*****************************************************************************
2 * recents.hpp : Recents MRL (menu)
3 *****************************************************************************
4 * Copyright © 2008-2014 VideoLAN and VLC authors
7 * Authors: Ludovic Fauvet <etix@l0cal.com>
8 * Jean-baptiste Kempf <jb@videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * ( at your option ) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef QVLC_RECENTS_H_
26 #define QVLC_RECENTS_H_
29 #include "util/singleton.hpp"
32 #include <QStringList>
36 #define RECENTS_LIST_SIZE 30
41 static int openMRL( intf_thread_t*,
44 bool b_playlist = true);
46 static int openMRLwithOptions( intf_thread_t*,
50 bool b_playlist = true,
51 const char* title = NULL);
54 class RecentsMRL : public QObject, public Singleton<RecentsMRL>
57 friend class Singleton<RecentsMRL>;
60 void addRecent( const QString & );
61 QStringList recentList();
62 playlist_item_t *toPlaylist(int length);
63 QSignalMapper *signalMapper;
65 int time( const QString &mrl );
66 void setTime( const QString &mrl, const int64_t time );
69 RecentsMRL( intf_thread_t* _p_intf );
70 virtual ~RecentsMRL();
72 intf_thread_t *p_intf;
84 void playMRL( const QString & );