kdemm Library API Documentation

factory.h

00001 /*  This file is part of the KDE project
00002     Copyright (C) 2004 Matthias Kretz <kretz@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00016     Boston, MA 02111-1307, USA.
00017 
00018 */
00019 
00020 #ifndef KDEMM_FACTORY_H
00021 #define KDEMM_FACTORY_H
00022 
00023 #include <kurl.h>
00024 #include <kdemm/channel.h>
00025 #include <qstring.h>
00026 #include <qstringlist.h>
00027 #include <dcopobject.h>
00028 
00029 namespace KDE
00030 {
00044 namespace Multimedia
00045 {
00046 class Backend;
00047 class Player;
00048 class VideoPlayer;
00049 
00067 class KDE_EXPORT Factory : public QObject, public DCOPObject
00068 {
00069     Q_OBJECT
00070     public:
00078         static Factory * self();
00079 
00090         Player * createPlayer();
00091 
00100         VideoPlayer * createVideoPlayer();
00101 
00109         bool playSoundEvent(const KURL & url);
00110 
00130         Channel * createChannel( const QString & title,
00131                 const QString & channeltype = QString::fromLatin1( "default" ),
00132                 Channel::Direction direction = Channel::Output );
00133 
00142         QStringList availableChannels( Channel::Direction direction = Channel::Output ) const;
00143 
00147         QStringList playableMimeTypes() const;
00148 
00152         bool isMimeTypePlayable( const QString & mimetype ) const;
00153 
00157         QString backendName() const;
00158 
00162         QString backendComment() const;
00163 
00171         QString backendVersion() const;
00172 
00176         QString backendIcon() const;
00177 
00181         QString backendWebsite() const;
00182 
00183     signals:
00188         void deleteYourObjects();
00189 
00196         void recreateObjects();
00197 
00198     protected:
00199         Factory();
00200         ~Factory();
00201 
00202     private slots:
00203         void objectDestroyed( QObject * );
00204 
00205     private:
00206         static Factory * m_self;
00207         class Private;
00208         Private * d;
00209 
00210     K_DCOP
00211     k_dcop:
00216         void kdemmBackendChanged();
00217 
00218 };
00219 }} // namespaces
00220 
00221 #endif // BACKENDFACTORY_H
00222 // vim: sw=4 ts=4 tw=80 noet
KDE Logo
This file is part of the documentation for kdemm Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Sep 13 04:04:37 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003