arts Library: kplayobjectfactory.h Source File (arts Library)

| # arts Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# 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 <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// : public QObject ### for KDE4 make it a QObject to be able to receive signals
    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 /*private slots: ### KDE4 and remove Helper class
    00140     void connectAmanPlay();*/
    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 // vim: sw=4 ts=4 noet

This file is part of the documentation for arts Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:27:55 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003