yast2-core
|
#include <Y2PluginComponent.h>
Public Member Functions | |
Y2PluginComponent (bool is_server, string filename, const char *creator_name, const char *component_name, int level) | |
Y2PluginComponent (string filename, const char *creator_name, const char *component_name, const char *name_space) | |
~Y2PluginComponent () | |
string | name () const |
YCPValue | evaluate (const YCPValue &command) |
SCRAgent * | getSCRAgent () |
Y2Namespace * | import (const char *name_space) |
void | result (const YCPValue &result) |
void | setServerOptions (int argc, char **argv) |
YCPValue | doActualWork (const YCPList &arglist, Y2Component *user_interface) |
Y2Component * | component () |
![]() | |
Y2Component () | |
virtual | ~Y2Component () |
virtual bool | remote () const |
Private Member Functions | |
bool | loadPlugin (const char *name_space=NULL) |
Y2ComponentCreator * | locateSym (int num) |
Private Attributes | |
const bool | is_server |
string | filename |
string | creator_name |
string | component_name |
int | argc |
char ** | argv |
int | level |
void * | handle |
Y2Component * | comp |
Y2PluginComponent::Y2PluginComponent | ( | bool | is_server, |
string | filename, | ||
const char * | creator_name, | ||
const char * | component_name, | ||
int | level | ||
) |
References loadPlugin().
Y2PluginComponent::Y2PluginComponent | ( | string | filename, |
const char * | creator_name, | ||
const char * | component_name, | ||
const char * | name_space | ||
) |
References loadPlugin().
Y2PluginComponent::~Y2PluginComponent | ( | ) |
Frees internal data.
References comp, handle, and Y2Component::result().
|
inline |
Return the already allocated component. It could be NULL, if there was a problem loading the component.
References comp.
Referenced by Y2CCPlugin::provideNamespace().
|
virtual |
Launches the plugin with the previously set parameters.
Reimplemented from Y2Component.
References comp, Y2Component::doActualWork(), handle, and loadPlugin().
Let the server evaluate a command.
This method is only valid, if the component is a server.
Reimplemented from Y2Component.
References comp, component_name, Y2Component::evaluate(), handle, loadPlugin(), and y2error.
|
virtual |
Returns the SCRAgent of the Y2Component or NULL if it doesn't have one.
Reimplemented from Y2Component.
References comp, Y2Component::getSCRAgent(), handle, and loadPlugin().
|
virtual |
Try to import a given namespace. This method is used for transparent handling of namespaces (YCP modules) through whole YaST. NOTICE: there is no reverse operation to import. Semantics of YCP modules is there is a single instance and it is available from the first import until the end of YaST run.
name_space | the name of the required namespace |
Reimplemented from Y2Component.
References comp, handle, Y2Component::import(), and loadPlugin().
|
private |
Does actually load the plugin.
References argc, argv, comp, component_name, Y2ComponentCreator::create(), filename, handle, is_server, Y2ComponentCreator::isServerCreator(), locateSym(), Y2ComponentCreator::provideNamespace(), Y2Component::setServerOptions(), y2debug, y2error, and y2milestone.
Referenced by doActualWork(), evaluate(), getSCRAgent(), import(), and Y2PluginComponent().
|
private |
Tries to locate the global componentcreator via dlsym.
References creator_name, handle, and y2debug.
Referenced by loadPlugin().
|
virtual |
|
virtual |
Tells this server, that the client doesn't need it's services any longer and that the exit code of the client is result.
This method is only valid, if the component is a server.
Reimplemented from Y2Component.
|
virtual |
Sets the commandline options of the server.
This method is only valid, if the component is a server.
Reimplemented from Y2Component.
References argc, argv, comp, and Y2Component::setServerOptions().
|
private |
Stores options for a server plugin.
Referenced by loadPlugin(), and setServerOptions().
|
private |
Stores options for a server plugin.
Referenced by loadPlugin(), and setServerOptions().
|
private |
The created Y2Component.
Referenced by component(), doActualWork(), evaluate(), getSCRAgent(), import(), loadPlugin(), result(), setServerOptions(), and ~Y2PluginComponent().
|
private |
Name of the component that is implemented by the plugin.
Referenced by evaluate(), loadPlugin(), and name().
|
private |
Name of the global component creator.
Referenced by locateSym().
|
private |
The name of the plugin library.
Referenced by loadPlugin().
|
private |
Handle of the dynamic loaded library.
Referenced by doActualWork(), evaluate(), getSCRAgent(), import(), loadPlugin(), locateSym(), result(), and ~Y2PluginComponent().
|
private |
It this component a server or a client?
Referenced by loadPlugin().
|
private |
The component level the plugin was started in.