arts Library API Documentation

kplayobjectfactory.h

00001 /* 00002 00003 Copyright (C) 2001 Nikolas Zimmermann <wildfox@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 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// : public QObject ### for KDE4 make it a QObject to be able to receive signals 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 /*private slots: ### KDE4 and remove Helper class 00138 void connectAmanPlay();*/ 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 // vim: sw=4 ts=4 noet
KDE Logo
This file is part of the documentation for arts Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:49:27 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003