Author: dmacvicar Date: Mon Jul 9 23:34:37 2007 New Revision: 5940 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5940&view=rev Log: enable RepoReport Modified: trunk/zypper/src/zypper-source-callbacks.h Modified: trunk/zypper/src/zypper-source-callbacks.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-source-callbacks.h?rev=5940&r1=5939&r2=5940&view=diff ============================================================================== --- trunk/zypper/src/zypper-source-callbacks.h (original) +++ trunk/zypper/src/zypper-source-callbacks.h Mon Jul 9 23:34:37 2007 @@ -30,7 +30,7 @@ { /////////////////////////////////////////////////////////////////// /* // progress for probing a source - struct ProbeSourceReceive : public zypp::callback::ReceiveReportzypp::source::ProbeSourceReport + struct ProbeSourceReceive : public zypp::callback::ReceiveReportzypp::source::ProbeRepoReport { virtual void start(const zypp::Url &url) { @@ -69,7 +69,7 @@ }; */ // progress for downloading a resolvable -struct DownloadResolvableReportReceiver : public zypp::callback::ReceiveReportzypp::source::DownloadResolvableReport +struct DownloadResolvableReportReceiver : public zypp::callback::ReceiveReportzypp::repo::DownloadResolvableReport { zypp::Resolvable::constPtr _resolvable_ptr; zypp::Url _url; @@ -211,20 +211,19 @@ } }; -/* -struct SourceReportReceiver : public zypp::callback::ReceiveReportzypp::source::SourceReport +struct RepoReportReceiver : public zypp::callback::ReceiveReportzypp::repo::RepoReport { - virtual void start( zypp::Source_Ref source, const std::string & task ) + virtual void start( zypp::Repository repo, const std::string & task ) { _task = task; - _source = source; + _repo = repo; display_step(0); } void display_step( int value ) { - display_progress ("(" + _source.alias() + ") " + _task , value); + display_progress ("(" + _repo.info().alias() + ") " + _task , value); } virtual bool progress( int value ) @@ -233,14 +232,14 @@ return true; } - virtual Action problem( zypp::Source_Ref /*source*//*, Error error, const std::string & description ) + virtual Action problem( zypp::Repository /*repo*/, Error error, const std::string & description ) { display_done (); display_error (error, description); return (Action) read_action_ari (); } - virtual void finish( zypp::Source_Ref /*source*//*, const std::string & task, Error error, const std::string & reason ) + virtual void finish( zypp::Repository /*repo*/, const std::string & task, Error error, const std::string & reason ) { display_step(100); // many of these, avoid newline @@ -252,9 +251,8 @@ } std::string _task; - zypp::Source_Ref _source; + zypp::Repository _repo; }; -*/ /////////////////////////////////////////////////////////////////// }; // namespace ZmartRecipients /////////////////////////////////////////////////////////////////// @@ -263,20 +261,20 @@ private: // ZmartRecipients::ProbeSourceReceive _sourceProbeReport; -// ZmartRecipients::SourceReportReceiver _SourceReport; + ZmartRecipients::RepoReportReceiver _repoReport; ZmartRecipients::DownloadResolvableReportReceiver _downloadReport; public: SourceCallbacks() { // _sourceProbeReport.connect(); -// _SourceReport.connect(); + _repoReport.connect(); _downloadReport.connect(); } ~SourceCallbacks() { // _sourceProbeReport.disconnect(); -// _SourceReport.disconnect(); + _repoReport.disconnect(); _downloadReport.disconnect(); } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org