libyui-qt
2.43.5
|
00001 /* 00002 Copyright (C) 2000-2012 Novell, Inc 00003 This library is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU Lesser General Public License as 00005 published by the Free Software Foundation; either version 2.1 of the 00006 License, or (at your option) version 3.0 of the License. This library 00007 is distributed in the hope that it will be useful, but WITHOUT ANY 00008 WARRANTY; without even the implied warranty of MERCHANTABILITY or 00009 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00010 License for more details. You should have received a copy of the GNU 00011 Lesser General Public License along with this library; if not, write 00012 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth 00013 Floor, Boston, MA 02110-1301 USA 00014 */ 00015 00016 00017 /*-/ 00018 00019 File: YQPackageSelectorPluginStub.cc 00020 00021 Authors: Katharina Machalkova <kmachalkova@suse.cz> 00022 Stephan Kulow <coolo@suse.de> 00023 00024 /-*/ 00025 00026 00027 #include "YQPackageSelectorPluginStub.h" 00028 00029 #define YUILogComponent "qt-ui" 00030 #include <yui/YUILog.h> 00031 00032 #define PLUGIN_BASE_NAME "qt-pkg" 00033 00034 YQPackageSelectorPluginStub::YQPackageSelectorPluginStub() 00035 : YPackageSelectorPlugin( PLUGIN_BASE_NAME ) 00036 { 00037 if ( success() ) 00038 { 00039 yuiMilestone() << "Loaded " << PLUGIN_BASE_NAME 00040 << " plugin successfully from " << pluginLibFullPath() 00041 << std::endl; 00042 } 00043 00044 00045 impl = (YQPackageSelectorPluginIf*) locateSymbol("PSP"); 00046 00047 if ( ! impl ) 00048 { 00049 yuiError() << "Plugin " << PLUGIN_BASE_NAME << " does not provide PSP symbol" << std::endl; 00050 } 00051 } 00052 00053 00054 YQPackageSelectorPluginStub::~YQPackageSelectorPluginStub() 00055 { 00056 // NOP 00057 } 00058 00059 00060 YPackageSelector * 00061 YQPackageSelectorPluginStub::createPackageSelector( YWidget * parent, long modeFlags ) 00062 { 00063 if ( ! impl ) 00064 YUI_THROW( YUIPluginException( PLUGIN_BASE_NAME ) ); 00065 00066 return impl->createPackageSelector( parent, modeFlags ); 00067 } 00068 00069 00070 YWidget * 00071 YQPackageSelectorPluginStub::createPatternSelector( YWidget * parent, long modeFlags ) 00072 { 00073 if ( ! impl ) 00074 YUI_THROW( YUIPluginException( PLUGIN_BASE_NAME ) ); 00075 00076 return impl->createPatternSelector( parent, modeFlags ); 00077 } 00078 00079 00080 YWidget * 00081 YQPackageSelectorPluginStub::createSimplePatchSelector( YWidget * parent, long modeFlags ) 00082 { 00083 if ( ! impl ) 00084 YUI_THROW( YUIPluginException( PLUGIN_BASE_NAME ) ); 00085 00086 return impl->createSimplePatchSelector( parent, modeFlags ); 00087 } 00088