From 118792619dadf7835a5d823c9261d30d443b7920 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 25 Jul 2014 13:08:02 +0200 Subject: [PATCH] JobReportReceiver: support receiving UserData --- src/callbacks/job.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/callbacks/job.h b/src/callbacks/job.h index b768f7e..497271e 100644 --- a/src/callbacks/job.h +++ b/src/callbacks/job.h @@ -26,25 +26,30 @@ namespace ZmartRecipients /////////////////////////////////////////////////////////////////// struct JobReportReceiver : public callback::ReceiveReport { - virtual bool message( MsgType type_r, const std::string & msg_r ) const + virtual bool message( MsgType type_r, const std::string & msg_r, const UserData & userData_r ) const { Out & out( Zypper::instance()->out() ); switch ( type_r.asEnum() ) { + case MsgType::debug: + out.info( "[zypp] "+msg_r, Out::DEBUG, Out::TYPE_NORMAL ); + break; + case MsgType::info: out.info( msg_r ); break; + case MsgType::warning: out.warning( msg_r ); break; + case MsgType::error: out.error( msg_r ); break; - case MsgType::debug: - out.info( msg_r, Out::DEBUG, Out::TYPE_NORMAL ); - break; + case MsgType::important: + case MsgType::data: default: INT << "Unhandled MsgType(" << type_r.asEnum() << "): " << msg_r << endl; break; -- 2.7.4