summaryrefslogtreecommitdiffstats
path: root/noatun/modules/dcopiface/dcopiface.h
blob: 38767fc4472ce809f211ecb7310ec339fb9618f7 (plain)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#ifndef DCOPIFACE_H
#define DCOPIFACE_H

#include <noatun/player.h>
#include <noatun/plugin.h>

#include <dcopobject.h>
#include <kdemacros.h>

class TDE_EXPORT NIF : public Plugin, public DCOPObject
{
K_DCOP

public:
	NIF();
	~NIF();

private slots:
	void newSongPlaying();

k_dcop:
	void toggleListView();
	void handleButtons();
	void removeCurrent();

	void back();
	void stop();
	void play();
	void playpause();
	void forward();
	void skipTo(int);
	void loop();

	void setVolume(int);
	int volume();
	void volumeUp();
	void volumeDown();
	void toggleMute();

	/**
	 * length in milliseconds
	 **/
	int length();
	/**
	 * position in milliseconds
	 **/
	int position();

	/**
	 * 0 stopped
	 * 1 paused
	 * 2 playing
	 **/
	int state();

	TQString lengthString();
	TQString timeString();

	TQString title();

	/**
	 * set a property for the current song
	 **/
	void setCurrentProperty(const TQString &key, const TQString &value);
	/**
	 * get a property from the current song
	 **/
	TQString currentProperty(const TQString &key);
	/**
	 * clear a property from the current song
	 **/
	void clearCurrentProperty(const TQString &key);

	TQCString visStack();
	TQCString session();

	void addFile(const TQString& f, bool autoplay);
	void addFile(const TQStringList &f, bool autoplay);

	void loadPlugin(const TQString &specFile);
	TQStringList availablePlugins();
	TQStringList loadedPlugins();
	bool unloadPlugin(const TQString &specFile);

	TQStringList mimeTypes();
	TQCString version();

	/**
	 * clear the playlist
	 **/
	void clear();
private:
	int mLastVolume; // remember volume for mute/unmute

#ifdef DOCUMENTATION_BLEH_BLEH_DONT_TRY_COMPILING_THIS
signals:
	void exiting();
	void newFile();

#endif
};

#endif