00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef KPLAYOBJECT_H
00023
#define KPLAYOBJECT_H
00024
00025
#include "kmedia2.h"
00026
#include "soundserver.h"
00027
#include <kurl.h>
00028
#include <qobject.h>
00029
00030
class KDE_EXPORT KPlayObject :
public QObject
00031 {
00032 Q_OBJECT
00033
public:
00034 KPlayObject();
00035 KPlayObject(Arts::PlayObject playobject,
bool isStream);
00036 ~KPlayObject();
00037
00042
void setObject(Arts::PlayObject playObject);
00043
00047 Arts::PlayObject object();
00048
00055
bool isNull();
00056
00061
bool stream();
00062
00066
void play();
00067
00071
void seek(Arts::poTime newTime);
00072
00076
void pause();
00077
00082
void halt();
00083
00087
QString description();
00088
00092 Arts::poTime currentTime();
00093
00097 Arts::poTime overallTime();
00098
00102 Arts::poCapabilities capabilities();
00103
00107
QString mediaName();
00108
00112 Arts::poState state();
00113
00114
private:
00115 Arts::PlayObject m_playObject;
00116
bool m_isStream;
00117 };
00118
00119
00120
00121
namespace KDE {
00122
00123
class PlayObjectFactory;
00124
00188 class KDE_EXPORT PlayObject :
public QObject
00189 {
00190 Q_OBJECT
00191
public:
00192 ~PlayObject();
00193
00197 Arts::PlayObject object();
00198
00205
bool isNull();
00206
00210
bool stream();
00211
00215
void play();
00216
00221
void seek(Arts::poTime newTime);
00222
00229
void pause();
00230
00237
void halt();
00238
00242
QString description();
00243
00247 Arts::poTime currentTime();
00248
00252 Arts::poTime overallTime();
00253
00258 Arts::poCapabilities capabilities();
00259
00263
QString mediaName();
00264
00272 Arts::poState state();
00273
00274 signals:
00282
void playObjectCreated();
00283
00284
private slots:
00285
void attachPlayObject( Arts::PlayObject );
00286
00287
private:
00288 Arts::PlayObject m_playObject;
00289
bool m_isStream;
00290
00291
struct PrivateData;
00292 PrivateData* d;
00293
00294
00295 PlayObject();
00296 PlayObject(
const PlayObject& ) :
QObject() {};
00297 PlayObject(Arts::PlayObject playobject,
bool isStream);
00298 PlayObject( Arts::SoundServerV2 server,
const KURL& url,
bool isStream,
bool createBUS );
00299
00300
friend class KDE::PlayObjectFactory;
00301
00302 };
00303
00304 }
00305
00306
#endif