JobReportReceiver: support receiving UserData
authorMichael Andres <ma@suse.de>
Fri, 25 Jul 2014 11:08:02 +0000 (13:08 +0200)
committerMichael Andres <ma@suse.de>
Fri, 25 Jul 2014 11:08:02 +0000 (13:08 +0200)
src/callbacks/job.h

index b768f7e..497271e 100644 (file)
@@ -26,25 +26,30 @@ namespace ZmartRecipients
   ///////////////////////////////////////////////////////////////////
   struct JobReportReceiver : public callback::ReceiveReport<JobReport>
   {
-    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;