libzypp  15.21.1
zypp::target::CommitPlugins Class Reference

Helper for commit plugin execution. More...

Inheritance diagram for zypp::target::CommitPlugins:

Public Member Functions

 CommitPlugins ()
 Default ctor: Empty plugin list. More...
 
 ~CommitPlugins ()
 Dtor: Send PLUGINEND message and close plugins. More...
 
bool empty () const
 Whether no plugins are waiting. More...
 
void send (const PluginFrame &frame_r)
 Send PluginFrame to all open plugins. More...
 
void load (const Pathname &path_r)
 Find and launch plugins sending PLUGINSTART message. More...
 

Private Member Functions

PluginFrame doSend (PluginScript &script_r, const PluginFrame &frame_r)
 Send PluginFrame and expect valid answer (ACK|_ENOMETHOD). More...
 
void doLoad (const PathInfo &pi_r)
 Launch a plugin sending PLUGINSTART message. More...
 

Private Attributes

std::list< PluginScript_scripts
 

Detailed Description

Helper for commit plugin execution.

Definition at line 237 of file TargetImpl.cc.

Constructor & Destructor Documentation

zypp::target::CommitPlugins::CommitPlugins ( )
inline

Default ctor: Empty plugin list.

Definition at line 241 of file TargetImpl.cc.

zypp::target::CommitPlugins::~CommitPlugins ( )
inline

Dtor: Send PLUGINEND message and close plugins.

Definition at line 245 of file TargetImpl.cc.

Member Function Documentation

bool zypp::target::CommitPlugins::empty ( ) const
inline

Whether no plugins are waiting.

Definition at line 253 of file TargetImpl.cc.

void zypp::target::CommitPlugins::send ( const PluginFrame frame_r)
inline

Send PluginFrame to all open plugins.

Failed plugins are removed from the execution list.

Definition at line 260 of file TargetImpl.cc.

void zypp::target::CommitPlugins::load ( const Pathname &  path_r)
inline

Find and launch plugins sending PLUGINSTART message.

If path_r is a directory all executable files whithin are expected to be plugins. Otherwise path_r must point to an executable plugin.

Definition at line 280 of file TargetImpl.cc.

PluginFrame zypp::target::CommitPlugins::doSend ( PluginScript script_r,
const PluginFrame frame_r 
)
inlineprivate

Send PluginFrame and expect valid answer (ACK|_ENOMETHOD).

Upon invalid answer or error, close the plugin. and remove it from the execution list.

Returns
the received PluginFrame (empty Frame upon Exception)

Definition at line 319 of file TargetImpl.cc.

void zypp::target::CommitPlugins::doLoad ( const PathInfo &  pi_r)
inlineprivate

Launch a plugin sending PLUGINSTART message.

Definition at line 341 of file TargetImpl.cc.

Member Data Documentation

std::list<PluginScript> zypp::target::CommitPlugins::_scripts
private

Definition at line 363 of file TargetImpl.cc.


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