kplayobjectfactory.h
00001     
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 "soundserver.h"
00027 #include "kplayobject.h"
00028 
00029 class KArtsServer;
00030 
00031 class KPlayObjectFactory
00032 {
00033 public:
00038     KPlayObjectFactory(Arts::SoundServerV2 server);
00039 
00047     KPlayObjectFactory(KArtsServer* server);
00048 
00049     ~KPlayObjectFactory();
00050 
00051     KPlayObject *createPlayObject(const KURL& url, bool createBUS);
00052     KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
00053 
00054     void setAllowStreaming(bool s) { m_allowStreaming = s; }
00055     bool allowStreaming() { return m_allowStreaming; }
00056 
00057     bool isAStream() { return m_stream; }
00058     
00059 private:
00060     Arts::SoundServerV2 m_server;
00061     bool m_allowStreaming;
00062     bool m_stream;
00063 };
00064 
00065 class KAudioManagerPlay;
00066 
00067 namespace KDE {
00068 
00069 class POFHelper;
00070 
00077 class PlayObjectFactory
00078 {
00079 public:
00084     PlayObjectFactory(Arts::SoundServerV2 server);
00092     PlayObjectFactory( KArtsServer* server );
00093     ~PlayObjectFactory();
00094 
00099     void setAudioManagerPlay( KAudioManagerPlay * amanplay );
00100 
00111     KDE::PlayObject *createPlayObject(const KURL& url, bool createBUS);
00112     
00117     KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
00118 
00124     void setAllowStreaming(bool s) { d->allowStreaming = s; }
00125 
00130     bool allowStreaming() { return d->allowStreaming; }
00131 
00135     static QStringList mimeTypes(void);
00136 
00137 
00138 
00139 
00140 private:
00141     struct PrivateData {
00142         Arts::SoundServerV2 server;
00143         KDE::PlayObject* playObj;
00144         KAudioManagerPlay* amanPlay;
00145         POFHelper* helper;
00146         bool allowStreaming;
00147         bool isStream;
00148     };
00149     PrivateData* d;
00150 };
00151 
00152 }
00153 #endif
00154 
 
This file is part of the documentation for arts Library Version 3.2.0.