Author: mlandres Date: Tue Jun 26 11:08:20 2007 New Revision: 5840 URL: http://svn.opensuse.org/viewcvs/zypp?rev=5840&view=rev Log: Added Pathname::asUrl() Modified: branches/REFACTORING-10_3/libzypp/zypp/Pathname.cc branches/REFACTORING-10_3/libzypp/zypp/Pathname.h Modified: branches/REFACTORING-10_3/libzypp/zypp/Pathname.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/Pathname.cc?rev=5840&r1=5839&r2=5840&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/Pathname.cc (original) +++ branches/REFACTORING-10_3/libzypp/zypp/Pathname.cc Tue Jun 26 11:08:20 2007 @@ -12,6 +12,7 @@ #include <iostream> #include "zypp/Pathname.h" +#include "zypp/Url.h" using std::string; @@ -229,6 +230,18 @@ /////////////////////////////////////////////////////////////////// // + // METHOD NAME : Pathname::asUrl + // METHOD TYPE : Url + // + Url Pathname::asUrl() const + { + Url ret( "dir:///" ); + ret.setPathName( asString() ); + return ret; + } + + /////////////////////////////////////////////////////////////////// + // // METHOD NAME : Pathname::extension // METHOD TYPE : string // Modified: branches/REFACTORING-10_3/libzypp/zypp/Pathname.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/REFACTORING-10_3/libzypp/zypp/Pathname.h?rev=5840&r1=5839&r2=5840&view=diff ============================================================================== --- branches/REFACTORING-10_3/libzypp/zypp/Pathname.h (original) +++ branches/REFACTORING-10_3/libzypp/zypp/Pathname.h Tue Jun 26 11:08:20 2007 @@ -18,6 +18,9 @@ /////////////////////////////////////////////////////////////////// namespace zypp { ///////////////////////////////////////////////////////////////// + + class Url; + /////////////////////////////////////////////////////////////////// namespace filesystem { ///////////////////////////////////////////////////////////////// @@ -77,6 +80,9 @@ const std::string & asString() const { return name_t; } + /** Url representation using \c dir schema. */ + Url asUrl() const; + /** String representation. */ const char * c_str() const { return name_t.c_str(); } -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org