scim 1.4.7

scim::HelperModule Class Reference

The class used to load a Helper module and run its Helpers. More...

#include <scim_helper_module.h>

Collaboration diagram for scim::HelperModule:

List of all members.

Public Member Functions

 HelperModule (const String &name=String(""))
 Constructor.
bool load (const String &name)
 Load a Helper module.
bool unload ()
 Unload the module.
bool valid () const
 Check if a Helper module has been loaded successfully.
unsigned int number_of_helpers () const
 Get the number of helpers supported by this module.
bool get_helper_info (unsigned int idx, HelperInfo &info) const
 The the information of a specific helper.
void run_helper (const String &uuid, const ConfigPointer &config, const String &display) const
 Run a specific helper.

Detailed Description

The class used to load a Helper module and run its Helpers.

This class should not be used directly. HelperManager should be used instead.


Constructor & Destructor Documentation

scim::HelperModule::HelperModule ( const String name = String(""))

Constructor.

Parameters:
nameThe name of the Helper module to be loaded.

Member Function Documentation

bool scim::HelperModule::load ( const String name)

Load a Helper module.

If a module has already been loaded, then it'll be unloaded first.

Parameters:
nameThe name of the Helper module to be loaded.
Returns:
true if success.
bool scim::HelperModule::unload ( )

Unload the module.

Returns:
true if success.
bool scim::HelperModule::valid ( ) const

Check if a Helper module has been loaded successfully.

Returns:
true if a module has been loaded successfully.
unsigned int scim::HelperModule::number_of_helpers ( ) const

Get the number of helpers supported by this module.

Returns:
the number of helpers supported by this module.
bool scim::HelperModule::get_helper_info ( unsigned int  idx,
HelperInfo info 
) const

The the information of a specific helper.

Parameters:
idxThe index of the helper, must between 0 to number_of_helpers () - 1.
infoThe HeperInfo object to store the information.
Returns:
true if this helper is ok and the information is stored into info successfully.
void scim::HelperModule::run_helper ( const String uuid,
const ConfigPointer config,
const String display 
) const

Run a specific helper.

The helper should be run in an independent process, this function will not return until the helper exits.

Parameters:
configThe Config object to be used to read configurations.
uuidThe UUID of the helper, which is returned by get_helper_info ().
displayThe display in which this helper should run.

The documentation for this class was generated from the following file: