1 /*****************************************************************************
2 * ml_item.hpp: the media library's result item
3 *****************************************************************************
4 * Copyright (C) 2008-2011 the VideoLAN Team and AUTHORS
7 * Authors: Antoine Lejeune <phytos@videolan.org>
8 * Jean-Philippe André <jpeg@videolan.org>
9 * Rémi Duraffort <ivoire@videolan.org>
10 * Adrien Maglo <magsoft@videolan.org>
11 * Srikanth Raju <srikiraju#gmail#com>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26 *****************************************************************************/
28 #ifndef _MEDIA_LIBRARY_MLITEM_H
29 #define _MEDIA_LIBRARY_MLITEM_H
37 #include <vlc_common.h>
38 #include <vlc_interface.h>
39 #include <vlc_media_library.h>
41 #include "ml_model.hpp"
49 MLItem( const MLModel
*p_model
, intf_thread_t
*_p_intf
,
50 ml_media_t
*p_media
, MLItem
*p_parent
);
53 void addChild( MLItem
*child
, int row
= -1 );
54 void delChild( int row
);
57 MLItem
* child( int row
) const;
58 int childCount() const;
60 MLItem
* parent() const;
62 QVariant
data( int column
) const;
63 bool setData( ml_select_e meta
, const QVariant
&data
);
65 int rowOfChild( MLItem
*item
) const;
67 // Media structure connections
69 ml_media_t
* getMedia() const;
72 bool operator<( MLItem
* item
);
76 intf_thread_t
* p_intf
;
78 media_library_t
* p_ml
;
79 QList
< MLItem
* > children
;