kplayobjectfactory.h
/*
Copyright (C) 2001 Nikolas Zimmermann <wildfox@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KPLAYOBJECTFACTORY_H
#define KPLAYOBJECTFACTORY_H
#include <kurl.h>
#include <kdelibs_export.h>
#include "soundserver.h"
#include "kplayobject.h"
class KArtsServer;
class KDE_EXPORT KPlayObjectFactory
{
public:
KPlayObjectFactory(Arts::SoundServerV2 server);
KPlayObjectFactory(KArtsServer* server);
~KPlayObjectFactory();
KPlayObject *createPlayObject(const KURL& url, bool createBUS);
KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
void setAllowStreaming(bool s) { m_allowStreaming = s; }
bool allowStreaming() { return m_allowStreaming; }
bool isAStream() { return m_stream; }
private:
Arts::SoundServerV2 m_server;
bool m_allowStreaming;
bool m_stream;
};
class KAudioManagerPlay;
namespace KDE {
class POFHelper;
class KDE_EXPORT PlayObjectFactory// : public QObject ### for KDE4 make it a QObject to be able to receive signals
{
public:
PlayObjectFactory(Arts::SoundServerV2 server);
PlayObjectFactory( KArtsServer* server );
~PlayObjectFactory();
void setAudioManagerPlay( KAudioManagerPlay * amanplay );
KDE::PlayObject *createPlayObject(const KURL& url, bool createBUS);
KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS);
void setAllowStreaming(bool s) { d->allowStreaming = s; }
bool allowStreaming() { return d->allowStreaming; }
static QStringList mimeTypes(void);
/*private slots: ### KDE4 and remove Helper class
void connectAmanPlay();*/
private:
struct PrivateData {
Arts::SoundServerV2 server;
KDE::PlayObject* playObj;
KAudioManagerPlay* amanPlay;
POFHelper* helper;
bool allowStreaming;
bool isStream;
};
PrivateData* d;
};
}
#endif
// vim: sw=4 ts=4 noet
KURL
KArtsServer
KArtsServer is a wrapper to conveniently get a reference to a SoundServer, and restart artsd when nec...
Definition: kartsserver.h:37
KDE::PlayObjectFactory::allowStreaming
bool allowStreaming()
returns "true" if the factory is allowed to create streaming PlayObjects.
Definition: kplayobjectfactory.h:132
KDE::PlayObject
This class acts as a general interface to the KDE multimedia framework.
Definition: kplayobject.h:188
KAudioManagerPlay
KDE Wrapper for Arts::Synth_AMAN_PLAY.
Definition: kaudiomanagerplay.h:38
KDE::PlayObjectFactory::setAllowStreaming
void setAllowStreaming(bool s)
setAllowStreaming( true ) allows the factory to create a streaming PlayObject for a non-local URL...
Definition: kplayobjectfactory.h:126
KDE::PlayObjectFactory
This class implements a factory to create KDE::PlayObjects for a given URL and mimetype.
Definition: kplayobjectfactory.h:79

KDE Home | KDE Accessibility Home | Description of Access Keys