Author: dmacvicar Date: Sat Feb 2 00:19:54 2008 New Revision: 8441 URL: http://svn.opensuse.org/viewcvs/zypp?rev=8441&view=rev Log: - move the cookie saving code Modified: branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.h Modified: branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc?rev=8441&r1=8440&r2=8441&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.cc Sat Feb 2 00:19:54 2008 @@ -105,6 +105,16 @@ return status; } + void RepoStatus::saveToCookieFile( const Pathname &cookiefile ) + { + std::ofstream file(cookiefile.c_str()); + if (!file) { + ZYPP_THROW (Exception( "Can't open " + cookiefile.asString() ) ); + } + file << *(this); + file.close(); + } + RepoStatus::RepoStatus( const Pathname &path ) : _pimpl( new Impl() ) { Modified: branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.h URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.h?rev=8441&r1=8440&r2=8441&view=diff ============================================================================== --- branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.h (original) +++ branches/tmp/ma/jump_sat/libzypp/zypp/RepoStatus.h Sat Feb 2 00:19:54 2008 @@ -49,6 +49,12 @@ static RepoStatus fromCookieFile( const Pathname &path ); /** + * save the status information to a cookie file + * \throws Exception if the file can't be saved + */ + void saveToCookieFile( const Pathname &path ); + + /** * Checksum of the repository. * Usually the checksum of the index, but any * checksum that changes when the repository changes -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org