kplayobjectfactory.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KPLAYOBJECTFACTORY_H
00023 #define KPLAYOBJECTFACTORY_H
00024
00025 #include <kurl.h>
00026 #include <kdelibs_export.h>
00027
00028 #include "soundserver.h"
00029 #include "kplayobject.h"
00030
00031 class KArtsServer;
00032
00033 class KDE_EXPORT KPlayObjectFactory
00034 {
00035 public:
00040 KPlayObjectFactory(Arts::SoundServerV2 server);
00041
00049 KPlayObjectFactory(KArtsServer* server);
00050
00051 ~KPlayObjectFactory();
00052
00053 KPlayObject *createPlayObject(const KURL& url, bool createBUS);
00054 KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
00055
00056 void setAllowStreaming(bool s) { m_allowStreaming = s; }
00057 bool allowStreaming() { return m_allowStreaming; }
00058
00059 bool isAStream() { return m_stream; }
00060
00061 private:
00062 Arts::SoundServerV2 m_server;
00063 bool m_allowStreaming;
00064 bool m_stream;
00065 };
00066
00067 class KAudioManagerPlay;
00068
00069 namespace KDE {
00070
00071 class POFHelper;
00072
00079 class KDE_EXPORT PlayObjectFactory
00080 {
00081 public:
00086 PlayObjectFactory(Arts::SoundServerV2 server);
00094 PlayObjectFactory( KArtsServer* server );
00095 ~PlayObjectFactory();
00096
00101 void setAudioManagerPlay( KAudioManagerPlay * amanplay );
00102
00113 KDE::PlayObject *createPlayObject(const KURL& url, bool createBUS);
00114
00119 KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
00120
00126 void setAllowStreaming(bool s) { d->allowStreaming = s; }
00127
00132 bool allowStreaming() { return d->allowStreaming; }
00133
00137 static QStringList mimeTypes(void);
00138
00139
00140
00141
00142 private:
00143 struct PrivateData {
00144 Arts::SoundServerV2 server;
00145 KDE::PlayObject* playObj;
00146 KAudioManagerPlay* amanPlay;
00147 POFHelper* helper;
00148 bool allowStreaming;
00149 bool isStream;
00150 };
00151 PrivateData* d;
00152 };
00153
00154 }
00155 #endif
00156
|