Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

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 KPlayObjectFactory
00030 {
00031 public:
00032         KPlayObjectFactory(Arts::SoundServerV2 server);
00033         ~KPlayObjectFactory();
00034 
00035         KPlayObject *createPlayObject(const KURL& url, bool createBUS);
00036         KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
00037 
00038         void setAllowStreaming(bool s) { m_allowStreaming = s; }
00039         bool allowStreaming() { return m_allowStreaming; }
00040 
00041         bool isAStream() { return m_stream; }
00042         
00043 private:
00044         Arts::SoundServerV2 m_server;
00045         bool m_allowStreaming;
00046         bool m_stream;
00047 };
00048 
00049 
00050 namespace KDE {
00051 
00058 class PlayObjectFactory
00059 {
00060 public:
00065         PlayObjectFactory(Arts::SoundServerV2 server);
00066         ~PlayObjectFactory();
00067 
00078         KDE::PlayObject *createPlayObject(const KURL& url, bool createBUS);
00079         
00084         KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
00085 
00091         void setAllowStreaming(bool s) { d->allowStreaming = s; }
00092 
00097         bool allowStreaming() { return d->allowStreaming; }
00098 
00102         static QStringList mimeTypes(void);
00103 
00104 private:
00105         struct PrivateData {
00106                 Arts::SoundServerV2 server;
00107                 bool allowStreaming;
00108                 bool isStream;
00109         };
00110         PrivateData* d;
00111 };
00112 
00113 }
00114 #endif

Generated on Wed Aug 13 23:29:54 2003 for kdelibs by doxygen1.2.18