libyui-qt-pkg  2.42.5
 All Classes Functions Variables Enumerations
YQZyppSolverDialogPluginStub.cc
1 /**************************************************************************
2 Copyright (C) 2000 - 2010 Novell, Inc.
3 All Rights Reserved.
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 
19 **************************************************************************/
20 
21 
22 /*---------------------------------------------------------------------\
23 | |
24 | __ __ ____ _____ ____ |
25 | \ \ / /_ _/ ___|_ _|___ \ |
26 | \ V / _` \___ \ | | __) | |
27 | | | (_| |___) || | / __/ |
28 | |_|\__,_|____/ |_| |_____| |
29 | |
30 | core system |
31 | (c) SuSE Linux AG |
32 \----------------------------------------------------------------------/
33 
34  File: YQZyppSolverDialogPluginStub.cc
35 
36  Authors: Stefan Schubert <schubi@suse.de>
37 
38  Textdomain "qt-pkg"
39 
40 
41 /-*/
42 
43 #include <qmessagebox.h>
44 #include "YQZyppSolverDialogPluginStub.h"
45 
46 #define YUILogComponent "qt-ui"
47 #include "YUILog.h"
48 #include "YQi18n.h"
49 
50 #define PLUGIN_BASE_NAME "qt_zypp_solver_dialog"
51 
52 using std::endl;
53 
55  : YUIPlugin( PLUGIN_BASE_NAME )
56 {
57  if ( success() )
58  {
59  yuiMilestone() << "Loaded " << PLUGIN_BASE_NAME
60  << " plugin successfully from " << pluginLibFullPath()
61  << endl;
62  }
63 
64 
65  impl = (YQZyppSolverDialogPluginIf*) locateSymbol("ZYPPDIALOGP");
66 
67  if ( ! impl )
68  {
69  yuiError() << "Plugin " << PLUGIN_BASE_NAME << " does not provide ZYPPP symbol" << endl;
70  }
71 }
72 
73 
75 {
76  // NOP
77 }
78 
79 
80 bool
82 {
83  if ( ! impl )
84  {
85  QMessageBox::information( 0,
86  _("Missing package") ,
87  _("Package libqdialogsolver is required for this feature."));
88  return false;
89  }
90 
91  return impl->createZyppSolverDialog( item );
92 }
93 
94