File: xmediainfocache.h

package info (click to toggle)
esperanza 0.2.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 600 kB
  • ctags: 536
  • sloc: cpp: 4,533; sh: 63; makefile: 4
file content (44 lines) | stat: -rw-r--r-- 881 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __XMEDIAINFOCACHE_H__
#define __XMEDIAINFOCACHE_H__

class XMediainfoCache;

#include "xclient.h"

#include <QObject>
#include <QIcon>
#include <QPixmap>
#include <QHash>
#include <QList>
#include <QVariant>
#include <QPixmapCache>

class XMediainfoCache : public QObject
{
	Q_OBJECT
	public:
		XMediainfoCache (QObject *, XClient *);

		QHash<QString, QVariant> get_info (uint32_t id);
		QIcon get_icon (uint32_t id);
		QPixmap get_pixmap (uint32_t id);

	signals:
		void entryChanged (uint32_t);

	public slots:
		void got_connection (XClient *);

	private:
		bool handle_medialib_info (const Xmms::PropDict &info);
		bool handle_mlib_entry_changed (const uint32_t &id);
		bool handle_bindata (const Xmms::bin &, const QString &);

		QHash< uint32_t, QHash<QString, QVariant> > m_info;

		QHash < QString, QList <uint32_t> > m_icon_map;

		XClient *m_client;
};
	
#endif