zypp::ZYppCommitResult Class Reference

Result returned from ZYpp::commit. More...

#include <ZYppCommitResult.h>

List of all members.

Classes

class  Impl

Public Member Functions

 ZYppCommitResult ()
 ZYppCommitResult (const Pathname &root_r)
const Pathname & root () const
 Remembered root directory of the target.
const UpdateNotificationsupdateMessages () const
 List of update messages installed during this commit.
UpdateNotificationssetUpdateMessages ()
 Change list of update messages installed during this commit.

Private Attributes

RWCOW_pointer< Impl_pimpl
 Pointer to data.

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const ZYppCommitResult &obj)

Oldstlye interface to be removed asap.

typedef std::list< PoolItemPoolItemList
int _result
 number of committed resolvables
PoolItemList _errors
 list of resolvables with error
PoolItemList _remaining
 list of resolvables remaining (due to wrong media)
PoolItemList _srcremaining
 list of kind:source resolvables remaining (due to wrong media)


Detailed Description

Result returned from ZYpp::commit.

See also:
ZYpp::commit
Todo:
document fields.

Definition at line 50 of file ZYppCommitResult.h.


Member Typedef Documentation

Definition at line 101 of file ZYppCommitResult.h.


Constructor & Destructor Documentation

zypp::ZYppCommitResult::ZYppCommitResult (  ) 

Definition at line 49 of file ZYppCommitResult.cc.

zypp::ZYppCommitResult::ZYppCommitResult ( const Pathname &  root_r  ) 

Definition at line 53 of file ZYppCommitResult.cc.

References _pimpl.


Member Function Documentation

const Pathname & zypp::ZYppCommitResult::root (  )  const

Remembered root directory of the target.

Pathnames within this class are relative to the targets root directory.

Definition at line 57 of file ZYppCommitResult.cc.

References _pimpl.

const UpdateNotifications & zypp::ZYppCommitResult::updateMessages (  )  const

List of update messages installed during this commit.

Pathnames are relative to the targets root directory.

   ZYppCommitResult result;
   ...
   if ( ! result.updateMessages().empty() )
   {
     MIL << "Received " << result.updateMessages().size() << " update notification(s):" << endl;
     for_( it, result.updateMessages().begin(), result.updateMessages().end() )
     {
       MIL << "- From " << it->solvable().asString() << " in file " << Pathname::showRootIf( result.root(), it->file() ) << ":" << endl;
       {
         // store message files content in a string:
         InputStream istr( Pathname::assertprefix( result.root(), it->file() ) );
         std::ostringstream strstr;
         iostr::copy( istr, strstr );
         std::string message( strstr.str() ); // contains the message
       }
       {
         // or write out the message file indented:
         InputStream istr( Pathname::assertprefix( result.root(), it->file() ) );
         iostr::copyIndent( istr, MIL, "> " ) << endl;
       }
     }
   }

Definition at line 60 of file ZYppCommitResult.cc.

References _pimpl.

Referenced by zypp::operator<<().

UpdateNotifications & zypp::ZYppCommitResult::setUpdateMessages (  ) 

Change list of update messages installed during this commit.

Pathnames are relative to the targets root directory.

Definition at line 63 of file ZYppCommitResult.cc.

References _pimpl.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const ZYppCommitResult obj 
) [related]

Stream output.

Definition at line 68 of file ZYppCommitResult.cc.


Member Data Documentation

number of committed resolvables

Definition at line 105 of file ZYppCommitResult.h.

Referenced by zypp::target::TargetImpl::commit(), and zypp::operator<<().

list of resolvables with error

Definition at line 109 of file ZYppCommitResult.h.

Referenced by zypp::target::TargetImpl::commit(), and zypp::operator<<().

list of resolvables remaining (due to wrong media)

Definition at line 113 of file ZYppCommitResult.h.

Referenced by zypp::target::TargetImpl::commit(), and zypp::operator<<().

list of kind:source resolvables remaining (due to wrong media)

Definition at line 117 of file ZYppCommitResult.h.

Referenced by zypp::target::TargetImpl::commit(), and zypp::operator<<().

Pointer to data.

Definition at line 122 of file ZYppCommitResult.h.

Referenced by root(), setUpdateMessages(), updateMessages(), and ZYppCommitResult().


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

doxygen