00001 /* This file is part of the KDE project 00002 Copyright (C) 2002 Simon Hausmann <hausmann@kde.org> 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; see the file COPYING. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 00020 #include "modplugin.h" 00021 #include "modpluginimpl.h" 00022 00023 ModPluginImpl::ModPluginImpl() 00024 :m_plugin( 0 ), ref( 0 ) 00025 { 00026 } 00027 00028 ModPluginImpl::~ModPluginImpl() 00029 { 00030 delete m_plugin; 00031 } 00032 00033 #ifndef QT_NO_COMPONENT 00034 00035 QRESULT ModPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 00036 { 00037 *iface = 0; 00038 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 00039 *iface = this, (*iface)->addRef(); 00040 else 00041 return QS_FALSE; 00042 return QS_OK; 00043 } 00044 00045 Q_EXPORT_INTERFACE() 00046 { 00047 Q_CREATE_INSTANCE( ModPluginImpl ) 00048 } 00049 00050 #endif 00051 00052 MediaPlayerDecoder *ModPluginImpl::decoder() 00053 { 00054 if ( !m_plugin ) 00055 m_plugin = new ModPlugin; 00056 return m_plugin; 00057 } 00058 00059 MediaPlayerEncoder *ModPluginImpl::encoder() 00060 { 00061 return 0; 00062 }
1.4.2