Author: jkupec
Date: Wed Jun 13 15:29:49 2007
New Revision: 5741
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5741&view=rev
Log:
10.1 compatibility code removed
Modified:
trunk/zypper/src/zypper-callbacks.cc
trunk/zypper/src/zypper-callbacks.h
trunk/zypper/src/zypper-media-callbacks.h
trunk/zypper/src/zypper-rpm-callbacks.h
trunk/zypper/src/zypper-source-callbacks.h
Modified: trunk/zypper/src/zypper-callbacks.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-callbacks.cc?rev=5741&r1=5740&r2=5741&view=diff
==============================================================================
--- trunk/zypper/src/zypper-callbacks.cc (original)
+++ trunk/zypper/src/zypper-callbacks.cc Wed Jun 13 15:29:49 2007
@@ -10,17 +10,17 @@
void display_progress (const string& s, int percent) {
static AliveCursor cursor;
- cerr_v << CLEARLN << cursor++ << " " << s << "[" << percent << "%]" << flush;
+ cout_v << CLEARLN << cursor++ << " " << s << "[" << percent << "%]" << flush;
}
void display_done () {
- cerr_v << endl;
+ cout_v << endl;
}
//template<typename Action>
//Action ...
int read_action_ari (int default_action) {
- cerr << _("(A)bort, (R)etry, (I)gnore?") << " "; // don't translate letters in parentheses!!
+ cout << _("(A)bort, (R)etry, (I)gnore?") << " "; // don't translate letters in parentheses!!
// non-interactive mode
if (gSettings.non_interactive) {
Modified: trunk/zypper/src/zypper-callbacks.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-callbacks.h?rev=5741&r1=5740&r2=5741&view=diff
==============================================================================
--- trunk/zypper/src/zypper-callbacks.h (original)
+++ trunk/zypper/src/zypper-callbacks.h Wed Jun 13 15:29:49 2007
@@ -13,15 +13,6 @@
#include <string>
#include
-// trying to compile for 10.1 where the callbacks had different signatures
-#ifdef LIBZYPP_1xx
-typedef std::string cbstring;
-typedef zypp::Url cbUrl;
-#else
-typedef const std::string& cbstring;
-typedef const zypp::Url& cbUrl;
-#endif
-
/*
enum Error {
NO_ERROR,
Modified: trunk/zypper/src/zypper-media-callbacks.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-media-callbacks.h?rev=5741&r1=5740&r2=5741&view=diff
==============================================================================
--- trunk/zypper/src/zypper-media-callbacks.h (original)
+++ trunk/zypper/src/zypper-media-callbacks.h Wed Jun 13 15:29:49 2007
@@ -13,6 +13,8 @@
#include
#include <iostream>
+#include
+
#include
#include
#include
@@ -32,7 +34,7 @@
struct MediaChangeReportReceiver : public zypp::callback::ReceiveReport<MediaChangeReport>
{
- virtual MediaChangeReport::Action requestMedia( zypp::Source_Ref source, unsigned mediumNr, MediaChangeReport::Error error, cbstring description )
+ virtual MediaChangeReport::Action requestMedia( zypp::Source_Ref source, unsigned mediumNr, MediaChangeReport::Error error, const std::string & description )
{
cout << "Please insert media [" << description << "] # " << mediumNr << ". Retry [y/n]: " << endl;
if (readBoolAnswer())
@@ -46,32 +48,33 @@
// progress for downloading a file
struct DownloadProgressReportReceiver : public zypp::callback::ReceiveReportzypp::media::DownloadProgressReport
{
- virtual void start( cbUrl file, zypp::Pathname localfile )
+ virtual void start( const zypp::Url & file, zypp::Pathname localfile )
{
- cerr_v << "Downloading: "
- << file << " to " << localfile << std::endl;
+ cout_v << CLEARLN << _("Downloading: ") << file;
+ cout_vv << " to " << localfile;
+ cout_v << std::endl;
}
- virtual bool progress(int value, cbUrl /*file*/)
+ virtual bool progress(int value, const zypp::Url & /*file*/)
{
display_progress ("Downloading", value);
return true;
}
- virtual DownloadProgressReport::Action problem( cbUrl /*file*/, DownloadProgressReport::Error error, cbstring description )
+ virtual DownloadProgressReport::Action problem( const zypp::Url & /*file*/, DownloadProgressReport::Error error, const std::string & description )
{
display_done ();
display_error (error, description);
return DownloadProgressReport::ABORT;
}
- virtual void finish( cbUrl /*file*/, Error error, cbstring konreason )
+ virtual void finish( const zypp::Url & /*file*/, Error error, const std::string & konreason )
{
display_done ();
display_error (error, konreason);
}
};
-
+
///////////////////////////////////////////////////////////////////
}; // namespace ZmartRecipients
///////////////////////////////////////////////////////////////////
Modified: trunk/zypper/src/zypper-rpm-callbacks.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-rpm-callbacks.h?rev=5741&r1=5740&r2=5741&view=diff
==============================================================================
--- trunk/zypper/src/zypper-rpm-callbacks.h (original)
+++ trunk/zypper/src/zypper-rpm-callbacks.h Wed Jun 13 15:29:49 2007
@@ -111,12 +111,12 @@
return true;
}
- virtual Action problem( zypp::target::rpm::ScanDBReport::Error error, cbstring description )
+ virtual Action problem( zypp::target::rpm::ScanDBReport::Error error, const std::string & description )
{
return zypp::target::rpm::ScanDBReport::problem( error, description );
}
- virtual void finish( Error error, cbstring reason )
+ virtual void finish( Error error, const std::string & reason )
{
display_done ();
display_error (error, reason);
@@ -138,14 +138,14 @@
return true;
}
- virtual Action problem( zypp::Resolvable::constPtr resolvable, Error error, cbstring description )
+ virtual Action problem( zypp::Resolvable::constPtr resolvable, Error error, const std::string & description )
{
cerr << resolvable << endl;
display_error (error, description);
return (Action) read_action_ari ();
}
- virtual void finish( zypp::Resolvable::constPtr /*resolvable*/, Error error, cbstring reason )
+ virtual void finish( zypp::Resolvable::constPtr /*resolvable*/, Error error, const std::string & reason )
{
display_done ();
display_error (error, reason);
@@ -182,7 +182,7 @@
return true;
}
- virtual Action problem( zypp::Resolvable::constPtr resolvable, Error error, cbstring description, RpmLevel level )
+ virtual Action problem( zypp::Resolvable::constPtr resolvable, Error error, const std::string & description, RpmLevel level )
{
cerr << resolvable << " " << description << std::endl;
cerr << level;
@@ -194,7 +194,7 @@
return (Action) read_action_ari ();
}
- virtual void finish( zypp::Resolvable::constPtr /*resolvable*/, Error error, cbstring reason, RpmLevel level )
+ virtual void finish( zypp::Resolvable::constPtr /*resolvable*/, Error error, const std::string & reason, RpmLevel level )
{
display_done ();
if (error != NO_ERROR) {
Modified: trunk/zypper/src/zypper-source-callbacks.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/zypper/src/zypper-source-callbacks.h?rev=5741&r1=5740&r2=5741&view=diff
==============================================================================
--- trunk/zypper/src/zypper-source-callbacks.h (original)
+++ trunk/zypper/src/zypper-source-callbacks.h Wed Jun 13 15:29:49 2007
@@ -37,17 +37,17 @@
cout << "Determining " << url << " source type..." << endl;
}
- virtual void failedProbe( const zypp::Url &/*url*/, cbstring type )
+ virtual void failedProbe( const zypp::Url &/*url*/, const std::string & type )
{
cout << ".. not " << type << endl;
}
- virtual void successProbe( const zypp::Url &url, cbstring type )
+ virtual void successProbe( const zypp::Url &url, const std::string & type )
{
cout << url << " is type " << type << endl;
}
- virtual void finish(const zypp::Url &/*url*/, Error error, cbstring reason )
+ virtual void finish(const zypp::Url &/*url*/, Error error, const std::string & reason )
{
if ( error == INVALID )
{
@@ -59,7 +59,7 @@
virtual bool progress(const zypp::Url &/*url*/, int /*value*/)
{ return true; }
- virtual Action problem( const zypp::Url &/*url*/, Error error, cbstring description )
+ virtual Action problem( const zypp::Url &/*url*/, Error error, const std::string & description )
{
display_done ();
display_error (error, description);
@@ -103,7 +103,7 @@
return true;
}
- virtual void problemDeltaDownload( cbstring description )
+ virtual void problemDeltaDownload( const std::string & description )
{
std::cerr << description << std::endl;
}
@@ -128,7 +128,7 @@
display_step( "Applying delta " /* + _delta.asString()*/, value );
}
- virtual void problemDeltaApply( cbstring description )
+ virtual void problemDeltaApply( const std::string & description )
{
std::cerr << description << std::endl;
}
@@ -156,7 +156,7 @@
return true;
}
- virtual void problemPatchDownload( cbstring description )
+ virtual void problemPatchDownload( const std::string & description )
{
std::cerr << description << std::endl;
}
@@ -167,7 +167,7 @@
}
- virtual void start( zypp::Resolvable::constPtr resolvable_ptr, cbUrl url )
+ virtual void start( zypp::Resolvable::constPtr resolvable_ptr, const zypp::Url & url )
{
_resolvable_ptr = resolvable_ptr;
_url = url;
@@ -190,13 +190,13 @@
return true;
}
- virtual Action problem( zypp::Resolvable::constPtr resolvable_ptr, Error /*error*/, cbstring description )
+ virtual Action problem( zypp::Resolvable::constPtr resolvable_ptr, Error /*error*/, const std::string & description )
{
std::cerr << description << std::endl;
return (Action) read_action_ari(ABORT);
}
- virtual void finish( zypp::Resolvable::constPtr /*resolvable_ptr*/, Error error, cbstring reason )
+ virtual void finish( zypp::Resolvable::constPtr /*resolvable_ptr*/, Error error, const std::string & reason )
{
display_done ();
display_error (error, reason);
@@ -206,7 +206,7 @@
#ifndef LIBZYPP_1xx
struct SourceReportReceiver : public zypp::callback::ReceiveReportzypp::source::SourceReport
{
- virtual void start( zypp::Source_Ref source, cbstring task )
+ virtual void start( zypp::Source_Ref source, const std::string & task )
{
_task = task;
_source = source;
@@ -225,14 +225,14 @@
return true;
}
- virtual Action problem( zypp::Source_Ref /*source*/, Error error, cbstring description )
+ virtual Action problem( zypp::Source_Ref /*source*/, Error error, const std::string & description )
{
display_done ();
display_error (error, description);
return (Action) read_action_ari ();
}
- virtual void finish( zypp::Source_Ref /*source*/, cbstring task, Error error, cbstring reason )
+ virtual void finish( zypp::Source_Ref /*source*/, const std::string & task, Error error, const std::string & reason )
{
display_step(100);
// many of these, avoid newline
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org