YUIPlugin Class Reference

#include <YUIPlugin.h>

Inheritance diagram for YUIPlugin:

YPackageSelectorPlugin

List of all members.

Public Member Functions

 YUIPlugin (const char *pluginLibBaseName)
virtual ~YUIPlugin ()
void * locateSymbol (const char *symbol)
bool error () const
bool success () const
string errorMsg () const

Protected Member Functions

void * pluginLibHandle ()
string pluginLibBaseName () const
string pluginLibFullPath () const
void loadPluginLib ()

Private Attributes

string _pluginLibBaseName
void * _pluginLibHandle
string _errorMsg


Detailed Description

Wrapper class for dlopen() and related.

Constructor & Destructor Documentation

YUIPlugin::YUIPlugin ( const char *  pluginLibBaseName  ) 

Constructor: Load the specified plugin library from the standard UI plugin directory (/usr/lib/YaST2/plugin).

YUIPlugin::~YUIPlugin (  )  [virtual]

Destructor. Calls dlclose() which will unload the plugin library if it is no longer used, i.e. if the reference count dlopen() uses reaches 0.


Member Function Documentation

void * YUIPlugin::locateSymbol ( const char *  symbol  ) 

Try to locate the specified symbol (function or global variable) in the plugin library.

Returns the in-memory address of that symbol or 0 if it could not be found or if loading the plugin library had failed in the constructor.

bool YUIPlugin::error (  )  const

Returns 'true' if there was an error loading the plugin.

bool YUIPlugin::success (  )  const

Returns 'true' if there was no error loading the plugin.

string YUIPlugin::errorMsg (  )  const

Returns a human readable (but in most cases untranslated) error message if there was an error.

void* YUIPlugin::pluginLibHandle (  )  [inline, protected]

Returns the dlopen() handle of the plugin library.

string YUIPlugin::pluginLibBaseName (  )  const [inline, protected]

Returns the base name of the plugin library.

string YUIPlugin::pluginLibFullPath (  )  const [protected]

Returns the full path of the plugin library.

void YUIPlugin::loadPluginLib (  )  [protected]

Loads the plugin library.


Member Data Documentation

string YUIPlugin::_pluginLibBaseName [private]

void* YUIPlugin::_pluginLibHandle [private]

string YUIPlugin::_errorMsg [private]


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:27:50 2007 for yast2-core by  doxygen 1.5.3