Author: dmacvicar
Date: Tue Jun 12 17:12:30 2007
New Revision: 5736
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5736&view=rev
Log:
- rename some classes to avoid things like yum::YUMBlah
- add Repository link to ResObject, to allow the download on commit
Added:
trunk/libzypp/zypp/repo/susetags/
trunk/libzypp/zypp/repo/susetags/Downloader.cc
- copied, changed from r5713, trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.cc
trunk/libzypp/zypp/repo/susetags/Downloader.h
- copied, changed from r5713, trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.h
trunk/libzypp/zypp/repo/yum/
trunk/libzypp/zypp/repo/yum/Downloader.cc
- copied, changed from r5713, trunk/libzypp/zypp/source/yum/YUMDownloader.cc
trunk/libzypp/zypp/repo/yum/Downloader.h
- copied, changed from r5713, trunk/libzypp/zypp/source/yum/YUMDownloader.h
trunk/libzypp/zypp/repo/yum/ResourceType.cc
- copied, changed from r5713, trunk/libzypp/zypp/source/yum/YUMResourceType.cc
trunk/libzypp/zypp/repo/yum/ResourceType.h
- copied, changed from r5713, trunk/libzypp/zypp/source/yum/YUMResourceType.h
Removed:
trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.cc
trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.h
trunk/libzypp/zypp/source/yum/YUMDownloader.cc
trunk/libzypp/zypp/source/yum/YUMDownloader.h
trunk/libzypp/zypp/source/yum/YUMResourceType.cc
trunk/libzypp/zypp/source/yum/YUMResourceType.h
Modified:
trunk/libzypp/tests/parser/yum/RepomdFileReader_test.cc
trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc
trunk/libzypp/zypp/CMakeLists.txt
trunk/libzypp/zypp/RepoManager.cc
trunk/libzypp/zypp/Repository.cc
trunk/libzypp/zypp/Repository.h
trunk/libzypp/zypp/ResObject.cc
trunk/libzypp/zypp/ResObject.h
trunk/libzypp/zypp/detail/ResObjectImplIf.cc
trunk/libzypp/zypp/detail/ResObjectImplIf.h
trunk/libzypp/zypp/parser/yum/RepoParser.cc
trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc
trunk/libzypp/zypp/parser/yum/RepomdFileReader.h
trunk/libzypp/zypp/repo/cached/AtomImpl.cc
trunk/libzypp/zypp/repo/cached/AtomImpl.h
trunk/libzypp/zypp/repo/cached/MessageImpl.cc
trunk/libzypp/zypp/repo/cached/MessageImpl.h
trunk/libzypp/zypp/repo/cached/PackageImpl.cc
trunk/libzypp/zypp/repo/cached/PackageImpl.h
trunk/libzypp/zypp/repo/cached/PatchImpl.cc
trunk/libzypp/zypp/repo/cached/PatchImpl.h
trunk/libzypp/zypp/repo/cached/PatternImpl.cc
trunk/libzypp/zypp/repo/cached/PatternImpl.h
trunk/libzypp/zypp/repo/cached/ProductImpl.cc
trunk/libzypp/zypp/repo/cached/ProductImpl.h
trunk/libzypp/zypp/repo/cached/ScriptImpl.cc
trunk/libzypp/zypp/repo/cached/ScriptImpl.h
trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc
trunk/libzypp/zypp/repo/cached/SrcPackageImpl.h
Modified: trunk/libzypp/tests/parser/yum/RepomdFileReader_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/parser/yum/RepomdFileReader_test.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/tests/parser/yum/RepomdFileReader_test.cc (original)
+++ trunk/libzypp/tests/parser/yum/RepomdFileReader_test.cc Tue Jun 12 17:12:30 2007
@@ -16,7 +16,7 @@
using namespace boost::unit_test;
using namespace zypp::parser::yum;
-using source::yum::YUMResourceType;
+using repo::yum::ResourceType;
class Collector
{
@@ -24,7 +24,7 @@
Collector()
{}
- bool callback( const OnMediaLocation &loc, const YUMResourceType &t )
+ bool callback( const OnMediaLocation &loc, const ResourceType &t )
{
items.push_back( make_pair( t, loc ) );
//items.push_back(loc);
@@ -32,7 +32,7 @@
return true;
}
- vector > items;
+ vector > items;
//vector<OnMediaLocation> items;
};
@@ -63,7 +63,7 @@
string loc;
getline(ifs, dtype);
- BOOST_CHECK_EQUAL( collect.items[count].first, YUMResourceType(dtype));
+ BOOST_CHECK_EQUAL( collect.items[count].first, ResourceType(dtype));
getline(ifs, checksum_type);
getline(ifs, checksum);
BOOST_CHECK_EQUAL( collect.items[count].second.checksum(), CheckSum(checksum_type, checksum) );
Modified: trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc (original)
+++ trunk/libzypp/tests/repo/yum/YUMDownloader_test.cc Tue Jun 12 17:12:30 2007
@@ -10,7 +10,7 @@
#include "zypp/Url.h"
#include "zypp/PathInfo.h"
#include "zypp/TmpPath.h"
-#include "zypp/source/yum/YUMDownloader.h"
+#include "zypp/repo/yum/Downloader.h"
using std::cout;
@@ -19,13 +19,13 @@
using namespace zypp;
using namespace boost::unit_test;
-using namespace zypp::source::yum;
+using namespace zypp::repo;
void yum_download_test(const string &dir)
{
Pathname p = dir + "/10.2-updates-subset";
Url url("dir:" + p.asString());
- YUMDownloader yum(url, "/");
+ yum::Downloader yum(url, "/");
filesystem::TmpDir tmp;
Pathname localdir(tmp.path());
Modified: trunk/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/CMakeLists.txt?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/CMakeLists.txt (original)
+++ trunk/libzypp/zypp/CMakeLists.txt Tue Jun 12 17:12:30 2007
@@ -741,7 +741,6 @@
)
SET( zypp_source_susetags_SRCS
- source/susetags/SUSETagsDownloader.cc
source/susetags/MediaMetadataParser.cc
source/susetags/MediaPatchesMetadataParser.cc
source/susetags/PackagesLangParser.cc
@@ -758,7 +757,6 @@
)
SET( zypp_source_susetags_HEADERS
- source/susetags/SUSETagsDownloader.h
source/susetags/MediaMetadataParser.h
source/susetags/MediaPatchesMetadataParser.h
source/susetags/PackagesLangParser.h
@@ -780,7 +778,6 @@
)
SET( zypp_source_yum_SRCS
- source/yum/YUMDownloader.cc
source/yum/YUMAtomImpl.cc
source/yum/YUMGroupImpl.cc
source/yum/YUMMessageImpl.cc
@@ -790,11 +787,9 @@
source/yum/YUMProductImpl.cc
source/yum/YUMScriptImpl.cc
source/yum/YUMSourceImpl.cc
- source/yum/YUMResourceType.cc
)
SET( zypp_source_yum_HEADERS
- source/yum/YUMDownloader.h
source/yum/YUMAtomImpl.h
source/yum/YUMGroupImpl.h
source/yum/YUMMessageImpl.h
@@ -804,7 +799,6 @@
source/yum/YUMProductImpl.h
source/yum/YUMScriptImpl.h
source/yum/YUMSourceImpl.h
- source/yum/YUMResourceType.h
)
INSTALL( FILES
@@ -1060,25 +1054,25 @@
# DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/cache/sqlite3x
#)
-SET( zypp_repository_SRCS
+SET( zypp_repo_SRCS
repo/dummy.cc
repo/RepositoryImpl.cc
repo/RepoException.cc
repo/RepoType.cc
)
-SET( zypp_repository_HEADERS
+SET( zypp_repo_HEADERS
repo/RepositoryImpl.h
repo/RepoException.h
repo/RepoType.h
)
INSTALL( FILES
- ${zypp_repository_HEADERS}
+ ${zypp_repo_HEADERS}
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/repo
)
-SET( zypp_repository_cached_SRCS
+SET( zypp_repo_cached_SRCS
repo/cached/RepoImpl.cc
repo/cached/PackageImpl.cc
repo/cached/PatchImpl.cc
@@ -1089,7 +1083,7 @@
repo/cached/AtomImpl.cc
)
-SET( zypp_repository_cached_HEADERS
+SET( zypp_repo_cached_HEADERS
repo/cached/RepoImpl.h
repo/cached/PackageImpl.h
repo/cached/PatchImpl.h
@@ -1100,14 +1094,33 @@
repo/cached/AtomImpl.h
)
-SET( zypp_repository_data_SRCS
+SET( zypp_repo_yum_SRCS
+ repo/yum/Downloader.cc
+ repo/yum/ResourceType.cc
+)
+
+SET( zypp_repo_yum_HEADERS
+ repo/yum/Downloader.h
+ repo/yum/ResourceType.h
+)
+
+SET( zypp_repo_susetags_SRCS
+ repo/susetags/Downloader.cc
+)
+
+SET( zypp_repo_susetags_HEADERS
+ repo/susetags/Downloader.h
+)
+
+
+SET( zypp_repo_data_SRCS
repo/memory/PackageImpl.cc
repo/memory/PatternImpl.cc
repo/memory/ProductImpl.cc
repo/memory/SrcPackageImpl.cc
)
-SET( zypp_repository_data_HEADERS
+SET( zypp_repo_data_HEADERS
repo/memory/PackageImpl.h
repo/memory/PatternImpl.h
repo/memory/ProductImpl.h
@@ -1135,9 +1148,11 @@
${zypp_media_proxyinfo_SRCS}
${zypp_media_SRCS}
${zypp_url_SRCS}
-${zypp_repository_SRCS}
-${zypp_repository_cached_SRCS}
-${zypp_repository_data_SRCS}
+${zypp_repo_SRCS}
+${zypp_repo_cached_SRCS}
+${zypp_repo_yum_SRCS}
+${zypp_repo_susetags_SRCS}
+${zypp_repo_data_SRCS}
${zypp_target_store_xml_SRCS}
${zypp_target_store_SRCS}
${zypp_target_rpm_SRCS}
@@ -1179,7 +1194,7 @@
${zypp_HEADERS}
${zypp_zypp_detail_HEADERS}
${zypp_thread_HEADERS}
-${zypp_repository_HEADERS}
+${zypp_repo_HEADERS}
${zypp_source_susetags_HEADERS}
${zypp_target_modalias_HEADERS}
${zypp_target_HEADERS}
Modified: trunk/libzypp/zypp/RepoManager.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/RepoManager.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/RepoManager.cc (original)
+++ trunk/libzypp/zypp/RepoManager.cc Tue Jun 12 17:12:30 2007
@@ -27,10 +27,10 @@
#include "zypp/MediaSetAccess.h"
#include "zypp/parser/RepoFileReader.h"
-#include "zypp/source/yum/YUMDownloader.h"
+#include "zypp/repo/yum/Downloader.h"
#include "zypp/parser/yum/RepoParser.h"
-#include "zypp/source/susetags/SUSETagsDownloader.h"
+#include "zypp/repo/susetags/Downloader.h"
#include "zypp/parser/susetags/RepoParser.h"
using namespace std;
@@ -38,8 +38,7 @@
using namespace zypp::repo;
using namespace zypp::filesystem;
-using zypp::source::yum::YUMDownloader;
-using zypp::source::susetags::SUSETagsDownloader;
+using namespace zypp::repo;
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -242,14 +241,14 @@
{
case RepoType::RPMMD_e :
{
- YUMDownloader downloader( url, "/" );
+ yum::Downloader downloader( url, "/" );
downloader.download(tmpdir.path());
// no error
}
break;
case RepoType::YAST2_e :
{
- SUSETagsDownloader downloader( url, "/" );
+ susetags::Downloader downloader( url, "/" );
downloader.download(tmpdir.path());
// no error
}
Modified: trunk/libzypp/zypp/Repository.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/Repository.cc (original)
+++ trunk/libzypp/zypp/Repository.cc Tue Jun 12 17:12:30 2007
@@ -46,5 +46,10 @@
return _pimpl->resolvables();
}
+ const RepoInfo Repository::info() const
+ {
+ return _pimpl->info();
+ }
+
}
Modified: trunk/libzypp/zypp/Repository.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/Repository.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/Repository.h (original)
+++ trunk/libzypp/zypp/Repository.h Tue Jun 12 17:12:30 2007
@@ -8,6 +8,7 @@
#include "zypp/base/PtrTypes.h"
#include "zypp/base/SafeBool.h"
#include "zypp/ResStore.h"
+#include "zypp/RepoInfo.h"
namespace zypp
{
@@ -53,6 +54,8 @@
const ResStore & resolvables();
+ const RepoInfo info() const;
+
private:
friend base::SafeBool<Repository>::operator bool_type() const;
/** \ref SafeBool test. */
Modified: trunk/libzypp/zypp/ResObject.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResObject.cc (original)
+++ trunk/libzypp/zypp/ResObject.cc Tue Jun 12 17:12:30 2007
@@ -11,6 +11,7 @@
*/
#include "zypp/ResObject.h"
#include "zypp/source/SourceImpl.h"
+#include "zypp/Repository.h"
#include "zypp/detail/ResObjectImplIf.h"
using namespace std;
@@ -83,6 +84,12 @@
unsigned ResObject::sourceMediaNr() const
{ return pimpl().sourceMediaNr(); }
+
+ Repository ResObject::repository() const
+ { return pimpl().repository(); }
+
+ unsigned ResObject::mediaNr() const
+ { return pimpl().mediaNr(); }
bool ResObject::installOnly() const
{ return pimpl().installOnly(); }
Modified: trunk/libzypp/zypp/ResObject.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/ResObject.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/ResObject.h (original)
+++ trunk/libzypp/zypp/ResObject.h Tue Jun 12 17:12:30 2007
@@ -27,6 +27,7 @@
class ResObjectImplIf;
}
class Source_Ref;
+ class Repository;
class ByteCount;
///////////////////////////////////////////////////////////////////
@@ -99,18 +100,29 @@
/**
* Source providing this resolvable
*/
- Source_Ref source() const;
+ /*ZYPP_DEPRECATED */ Source_Ref source() const;
/**
+ * Source providing this resolvable
+ */
+ Repository repository() const;
+
+ /**
+ * Media number where the resolvable is located
+ * 0 if no media access is required.
+ */
+ unsigned mediaNr() const;
+
+ /**
* Media number where the resolvable is located
* 0 if no media access is required.
*/
- unsigned sourceMediaNr() const;
+ /* ZYPP_DEPRECATED */ unsigned sourceMediaNr() const;
/**
* \deprecated Use sourceMediaNr
*/
- ZYPP_DEPRECATED unsigned mediaId() const
+ /* ZYPP_DEPRECATED */ unsigned mediaId() const
{ return sourceMediaNr(); }
/**
Modified: trunk/libzypp/zypp/detail/ResObjectImplIf.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/ResObjectImplIf.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/detail/ResObjectImplIf.cc (original)
+++ trunk/libzypp/zypp/detail/ResObjectImplIf.cc Tue Jun 12 17:12:30 2007
@@ -12,6 +12,7 @@
#include "zypp/detail/ResObjectImplIf.h"
#include "zypp/source/SourceImpl.h"
#include "zypp/SourceFactory.h"
+#include "zypp/Repository.h"
///////////////////////////////////////////////////////////////////
namespace zypp
@@ -51,7 +52,13 @@
Source_Ref ResObjectImplIf::source() const
{ return Source_Ref::noSource; }
+
+ Repository ResObjectImplIf::repository() const
+ { return Repository::noRepository; }
+ unsigned ResObjectImplIf::mediaNr() const
+ { return 0; }
+
unsigned ResObjectImplIf::sourceMediaNr() const
{ return 0; }
Modified: trunk/libzypp/zypp/detail/ResObjectImplIf.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/detail/ResObjectImplIf.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/detail/ResObjectImplIf.h (original)
+++ trunk/libzypp/zypp/detail/ResObjectImplIf.h Tue Jun 12 17:12:30 2007
@@ -35,6 +35,7 @@
class Resolvable;
class Source_Ref;
+ class Repository;
///////////////////////////////////////////////////////////////////
namespace detail
@@ -84,6 +85,15 @@
virtual ByteCount archivesize() const PURE_VIRTUAL;
/** Backlink to the source providing this. */
+ virtual Repository repository() const PURE_VIRTUAL;
+
+ /** Number of the source media that provides the data
+ * required for installation. Zero, if no media access
+ * is required.
+ */
+ virtual unsigned mediaNr() const PURE_VIRTUAL;
+
+ /** Backlink to the source providing this. */
virtual Source_Ref source() const PURE_VIRTUAL;
/** Number of the source media that provides the data
Modified: trunk/libzypp/zypp/parser/yum/RepoParser.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/RepoParser.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/RepoParser.cc (original)
+++ trunk/libzypp/zypp/parser/yum/RepoParser.cc Tue Jun 12 17:12:30 2007
@@ -6,7 +6,7 @@
| /_____||_| |_| |_| |
| |
\---------------------------------------------------------------------*/
-/** \file zypp2/parser/yum/RepoParser.cc
+/** \file zypp/parser/yum/RepoParser.cc
* YUM repository metadata parser implementation.
*/
#include <iostream>
@@ -15,7 +15,7 @@
#include "zypp/base/Logger.h"
#include "zypp/base/UserRequestException.h"
-#include "zypp/source/yum/YUMResourceType.h"
+#include "zypp/repo/yum/ResourceType.h"
#include "zypp/parser/yum/RepomdFileReader.h"
#include "zypp/parser/yum/PrimaryFileReader.h"
@@ -33,7 +33,7 @@
#define ZYPP_BASE_LOGGER_LOGGROUP "parser"
using namespace std;
-using zypp::source::yum::YUMResourceType;
+using zypp::repo::yum::ResourceType;
namespace zypp
{
@@ -57,17 +57,17 @@
*/
struct RepoParserJob
{
- RepoParserJob(const Pathname & filename, const YUMResourceType & type)
+ RepoParserJob(const Pathname & filename, const ResourceType & type)
: _filename(filename), _type(type) {}
const Pathname & filename() const { return _filename; }
- const YUMResourceType & type() const { return _type; }
+ const ResourceType & type() const { return _type; }
private:
/** File to be processed */
Pathname _filename;
/** Type of YUM file */
- YUMResourceType _type;
+ ResourceType _type;
};
@@ -104,7 +104,7 @@
* \param loc location of discovered data file
* \param dtype YUM data type
*/
- bool repomd_CB(const OnMediaLocation & loc, const YUMResourceType & dtype);
+ bool repomd_CB(const OnMediaLocation & loc, const ResourceType & dtype);
/**
* Callback for processing packages returned from \ref PrimaryFileReader.
@@ -199,7 +199,7 @@
// -------------------------------------------------------------------------
bool RepoParser::Impl::repomd_CB(
- const OnMediaLocation & loc, const YUMResourceType & dtype)
+ const OnMediaLocation & loc, const ResourceType & dtype)
{
DBG << "Adding " << dtype
<< " (" << loc.filename() << ") to RepoParser jobs " << endl;
@@ -232,7 +232,7 @@
{
DBG << "Adding patch " << loc.filename() << " to RepoParser jobs " << endl;
- _jobs.push_back(RepoParserJob(loc.filename(), YUMResourceType::PATCH));
+ _jobs.push_back(RepoParserJob(loc.filename(), ResourceType::PATCH));
return true;
}
@@ -339,7 +339,7 @@
switch(job.type().toEnum())
{
// parse primary.xml.gz
- case YUMResourceType::PRIMARY_e:
+ case ResourceType::PRIMARY_e:
{
PrimaryFileReader(
cache_dir + job.filename(),
@@ -348,7 +348,7 @@
break;
}
- case YUMResourceType::PATCHES_e:
+ case ResourceType::PATCHES_e:
{
PatchesFileReader(
cache_dir + job.filename(),
@@ -359,7 +359,7 @@
break;
}
- case YUMResourceType::PATCH_e:
+ case ResourceType::PATCH_e:
{
PatchFileReader(
cache_dir + job.filename(),
@@ -367,7 +367,7 @@
break;
}
- case YUMResourceType::OTHER_e:
+ case ResourceType::OTHER_e:
{
if (!_options.skipOther)
{
@@ -381,7 +381,7 @@
break;
}
- case YUMResourceType::FILELISTS_e:
+ case ResourceType::FILELISTS_e:
{
if (!_options.skipFilelists)
{
@@ -396,7 +396,7 @@
break;
}
- case YUMResourceType::PATTERNS_e:
+ case ResourceType::PATTERNS_e:
{
PatternFileReader(
cache_dir + job.filename(),
@@ -404,7 +404,7 @@
break;
}
- case YUMResourceType::PRODUCTS_e:
+ case ResourceType::PRODUCTS_e:
{
ProductFileReader(
cache_dir + job.filename(),
Modified: trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc (original)
+++ trunk/libzypp/zypp/parser/yum/RepomdFileReader.cc Tue Jun 12 17:12:30 2007
@@ -20,7 +20,7 @@
using namespace std;
using namespace zypp::xml;
-using zypp::source::yum::YUMResourceType;
+using zypp::repo::yum::ResourceType;
namespace zypp
{
@@ -75,7 +75,7 @@
Tag _tag;
/** Type of metadata file. */
- source::yum::YUMResourceType _type;
+ repo::yum::ResourceType _type;
/** Function for processing collected data. Passed-in through constructor. */
ProcessResource _callback;
@@ -94,7 +94,7 @@
RepomdFileReader::Impl::Impl(
const Pathname &repomd_file, const ProcessResource & callback)
:
- _tag(tag_NONE), _type(YUMResourceType::NONE_e), _callback(callback)
+ _tag(tag_NONE), _type(ResourceType::NONE_e), _callback(callback)
{
Reader reader( repomd_file );
MIL << "Reading " << repomd_file << endl;
@@ -129,7 +129,7 @@
if ( reader_r->name() == "data" )
{
_tag = tag_Data;
- _type = YUMResourceType(reader_r->getAttribute("type").asString());
+ _type = ResourceType(reader_r->getAttribute("type").asString());
return true;
}
Modified: trunk/libzypp/zypp/parser/yum/RepomdFileReader.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/parser/yum/RepomdFileReader.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/parser/yum/RepomdFileReader.h (original)
+++ trunk/libzypp/zypp/parser/yum/RepomdFileReader.h Tue Jun 12 17:12:30 2007
@@ -17,7 +17,7 @@
#include "zypp/base/Function.h"
#include "zypp/OnMediaLocation.h"
-#include "zypp/source/yum/YUMResourceType.h"
+#include "zypp/repo/yum/ResourceType.h"
namespace zypp
{
@@ -32,7 +32,7 @@
* other data about metadata files to be processed.
*
* After each package is read, a \ref OnMediaLocation
- * and \ref source::yum::YUMResourceType is prepared and \ref _callback
+ * and \ref repo::yum::ResourceType is prepared and \ref _callback
* is called with these two objects passed in.
*
* The \ref _callback is provided on construction.
@@ -53,7 +53,7 @@
*/
typedef function< bool(
const OnMediaLocation &,
- const source::yum::YUMResourceType &)>
+ const repo::yum::ResourceType &)>
ProcessResource;
/**
Modified: trunk/libzypp/zypp/repo/cached/AtomImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/AtomImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/AtomImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/AtomImpl.cc Tue Jun 12 17:12:30 2007
@@ -109,7 +109,7 @@
return Source_Ref::noSource;
}
-unsigned AtomImpl::sourceMediaNr() const
+unsigned AtomImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/AtomImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/AtomImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/AtomImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/AtomImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
virtual Repository repository() const;
Modified: trunk/libzypp/zypp/repo/cached/MessageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/MessageImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/MessageImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/MessageImpl.cc Tue Jun 12 17:12:30 2007
@@ -109,7 +109,7 @@
return Source_Ref::noSource;
}
-unsigned MessageImpl::sourceMediaNr() const
+unsigned MessageImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/MessageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/MessageImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/MessageImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/MessageImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
// MESSAGE
virtual TranslatedText text() const;
Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PackageImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PackageImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/PackageImpl.cc Tue Jun 12 17:12:30 2007
@@ -117,7 +117,7 @@
return Source_Ref::noSource;
}
-unsigned PackageImpl::sourceMediaNr() const
+unsigned PackageImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/PackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PackageImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PackageImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/PackageImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
// PACKAGE
virtual CheckSum checksum() const;
Modified: trunk/libzypp/zypp/repo/cached/PatchImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PatchImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PatchImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/PatchImpl.cc Tue Jun 12 17:12:30 2007
@@ -112,7 +112,7 @@
return Source_Ref::noSource;
}
-unsigned PatchImpl::sourceMediaNr() const
+unsigned PatchImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/PatchImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PatchImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PatchImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/PatchImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
// PATCH
virtual std::string id() const;
Modified: trunk/libzypp/zypp/repo/cached/PatternImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PatternImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PatternImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/PatternImpl.cc Tue Jun 12 17:12:30 2007
@@ -112,7 +112,7 @@
return Source_Ref::noSource;
}
-unsigned PatternImpl::sourceMediaNr() const
+unsigned PatternImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/PatternImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/PatternImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/PatternImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/PatternImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
// PATTERN
virtual bool isDefault() const;
Modified: trunk/libzypp/zypp/repo/cached/ProductImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/ProductImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/ProductImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/ProductImpl.cc Tue Jun 12 17:12:30 2007
@@ -109,7 +109,7 @@
return Source_Ref::noSource;
}
-unsigned ProductImpl::sourceMediaNr() const
+unsigned ProductImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/ProductImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/ProductImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/ProductImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/ProductImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
// PRODUCT
virtual std::string category() const;
Modified: trunk/libzypp/zypp/repo/cached/ScriptImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/ScriptImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/ScriptImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/ScriptImpl.cc Tue Jun 12 17:12:30 2007
@@ -109,7 +109,7 @@
return Source_Ref::noSource;
}
-unsigned ScriptImpl::sourceMediaNr() const
+unsigned ScriptImpl::mediaNr() const
{
return 1;
}
Modified: trunk/libzypp/zypp/repo/cached/ScriptImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/ScriptImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/ScriptImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/ScriptImpl.h Tue Jun 12 17:12:30 2007
@@ -44,7 +44,7 @@
virtual Date installtime() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
// SCRIPT
virtual Pathname do_script() const;
Modified: trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc (original)
+++ trunk/libzypp/zypp/repo/cached/SrcPackageImpl.cc Tue Jun 12 17:12:30 2007
@@ -82,7 +82,7 @@
return _install_only;
}
-unsigned SrcPackageImpl::sourceMediaNr() const
+unsigned SrcPackageImpl::mediaNr() const
{
return _media_nr;
}
Modified: trunk/libzypp/zypp/repo/cached/SrcPackageImpl.h
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/cached/SrcPackageImpl.h?rev=5736&r1=5735&r2=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/repo/cached/SrcPackageImpl.h (original)
+++ trunk/libzypp/zypp/repo/cached/SrcPackageImpl.h Tue Jun 12 17:12:30 2007
@@ -39,7 +39,7 @@
virtual Pathname location() const;
virtual bool installOnly() const;
virtual Source_Ref source() const;
- virtual unsigned sourceMediaNr() const;
+ virtual unsigned mediaNr() const;
virtual Vendor vendor() const;
protected:
Copied: trunk/libzypp/zypp/repo/susetags/Downloader.cc (from r5713, trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/susetags/Downloader.cc?p2=trunk/libzypp/zypp/repo/susetags/Downloader.cc&p1=trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.cc&r1=5713&r2=5736&rev=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.cc (original)
+++ trunk/libzypp/zypp/repo/susetags/Downloader.cc Tue Jun 12 17:12:30 2007
@@ -5,24 +5,24 @@
#include "zypp/MediaSetAccess.h"
#include "zypp/Fetcher.h"
-#include "zypp/source/susetags/SUSETagsDownloader.h"
+#include "zypp/repo/susetags/Downloader.h"
using namespace std;
namespace zypp
{
-namespace source
+namespace repo
{
namespace susetags
{
-SUSETagsDownloader::SUSETagsDownloader( const Url &url, const Pathname &path )
+Downloader::Downloader( const Url &url, const Pathname &path )
: _url(url), _path(path)
{
}
-void SUSETagsDownloader::download( const Pathname &dest_dir )
+void Downloader::download( const Pathname &dest_dir )
{
MediaSetAccess media(_url, _path);
Fetcher fetcher;
Copied: trunk/libzypp/zypp/repo/susetags/Downloader.h (from r5713, trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/susetags/Downloader.h?p2=trunk/libzypp/zypp/repo/susetags/Downloader.h&p1=trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.h&r1=5713&r2=5736&rev=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/source/susetags/SUSETagsDownloader.h (original)
+++ trunk/libzypp/zypp/repo/susetags/Downloader.h Tue Jun 12 17:12:30 2007
@@ -15,15 +15,15 @@
namespace zypp
{
- namespace source
+ namespace repo
{
namespace susetags
{
- class SUSETagsDownloader
+ class Downloader
{
public:
- SUSETagsDownloader( const Url &url, const Pathname &path );
+ Downloader( const Url &url, const Pathname &path );
void download( const Pathname &dest_dir );
private:
Url _url;
Copied: trunk/libzypp/zypp/repo/yum/Downloader.cc (from r5713, trunk/libzypp/zypp/source/yum/YUMDownloader.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/yum/Downloader.cc?p2=trunk/libzypp/zypp/repo/yum/Downloader.cc&p1=trunk/libzypp/zypp/source/yum/YUMDownloader.cc&r1=5713&r2=5736&rev=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/source/yum/YUMDownloader.cc (original)
+++ trunk/libzypp/zypp/repo/yum/Downloader.cc Tue Jun 12 17:12:30 2007
@@ -16,7 +16,7 @@
#include "zypp/parser/yum/RepomdFileReader.h"
#include "zypp/parser/yum/PatchesFileReader.h"
-#include "YUMDownloader.h"
+#include "Downloader.h"
using namespace std;
using namespace zypp::xml;
@@ -24,17 +24,17 @@
namespace zypp
{
-namespace source
+namespace repo
{
namespace yum
{
-YUMDownloader::YUMDownloader( const Url &url, const Pathname &path )
+Downloader::Downloader( const Url &url, const Pathname &path )
: _url(url), _path(path), _media(url, path)
{
}
-bool YUMDownloader::patches_Callback( const OnMediaLocation &loc, const string &id )
+bool Downloader::patches_Callback( const OnMediaLocation &loc, const string &id )
{
MIL << id << " : " << loc << endl;
_fetcher.enqueueDigested(loc);
@@ -42,12 +42,12 @@
}
-bool YUMDownloader::repomd_Callback( const OnMediaLocation &loc, const YUMResourceType &dtype )
+bool Downloader::repomd_Callback( const OnMediaLocation &loc, const ResourceType &dtype )
{
MIL << dtype << " : " << loc << endl;
// skip other
- if ( dtype == YUMResourceType::OTHER )
+ if ( dtype == ResourceType::OTHER )
{
MIL << "Skipping other.xml" << endl;
return true;
@@ -58,17 +58,17 @@
// We got a patches file we need to read, to add patches listed
// there, so we transfer what we have in the queue, and
// queue the patches in the patches callback
- if ( dtype == YUMResourceType::PATCHES )
+ if ( dtype == ResourceType::PATCHES )
{
_fetcher.start( _dest_dir, _media);
// now the patches.xml file must exists
- PatchesFileReader( _dest_dir + loc.filename(), bind( &YUMDownloader::patches_Callback, this, _1, _2));
+ PatchesFileReader( _dest_dir + loc.filename(), bind( &Downloader::patches_Callback, this, _1, _2));
}
return true;
}
-void YUMDownloader::download( const Pathname &dest_dir )
+void Downloader::download( const Pathname &dest_dir )
{
Pathname repomdpath = "/repodata/repomd.xml";
Pathname keypath = "/repodata/repomd.xml.key";
@@ -99,7 +99,7 @@
_fetcher.reset();
Reader reader( dest_dir + "/repodata/repomd.xml" );
- RepomdFileReader( dest_dir + "/repodata/repomd.xml", bind( &YUMDownloader::repomd_Callback, this, _1, _2));
+ RepomdFileReader( dest_dir + "/repodata/repomd.xml", bind( &Downloader::repomd_Callback, this, _1, _2));
// ready, go!
_fetcher.start( dest_dir, _media);
Copied: trunk/libzypp/zypp/repo/yum/Downloader.h (from r5713, trunk/libzypp/zypp/source/yum/YUMDownloader.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/yum/Downloader.h?p2=trunk/libzypp/zypp/repo/yum/Downloader.h&p1=trunk/libzypp/zypp/source/yum/YUMDownloader.h&r1=5713&r2=5736&rev=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/source/yum/YUMDownloader.h (original)
+++ trunk/libzypp/zypp/repo/yum/Downloader.h Tue Jun 12 17:12:30 2007
@@ -16,11 +16,11 @@
#include "zypp/OnMediaLocation.h"
#include "zypp/MediaSetAccess.h"
#include "zypp/parser/xml/Reader.h"
-#include "zypp/source/yum/YUMResourceType.h"
+#include "zypp/repo/yum/ResourceType.h"
namespace zypp
{
- namespace source
+ namespace repo
{
namespace yum
{
@@ -29,25 +29,25 @@
* to a local directory
*
* \code
- * YUMDownloader yum(url, path);
+ * Downloader yum(url, path);
* yum.download("localdir");
* \endcode
*/
- class YUMDownloader
+ class Downloader
{
public:
/**
* Create the download object for a repository
* located in \a url with path \a path
*/
- YUMDownloader( const Url &url, const Pathname &path );
+ Downloader( const Url &url, const Pathname &path );
/**
* starts the download to local directory \a dest_dir
*/
void download( const Pathname &dest_dir );
protected:
- bool repomd_Callback( const OnMediaLocation &loc, const YUMResourceType &dtype );
+ bool repomd_Callback( const OnMediaLocation &loc, const ResourceType &dtype );
bool patches_Callback( const OnMediaLocation &loc, const std::string &id );
private:
Url _url;
Copied: trunk/libzypp/zypp/repo/yum/ResourceType.cc (from r5713, trunk/libzypp/zypp/source/yum/YUMResourceType.cc)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/yum/ResourceType.cc?p2=trunk/libzypp/zypp/repo/yum/ResourceType.cc&p1=trunk/libzypp/zypp/source/yum/YUMResourceType.cc&r1=5713&r2=5736&rev=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/source/yum/YUMResourceType.cc (original)
+++ trunk/libzypp/zypp/repo/yum/ResourceType.cc Tue Jun 12 17:12:30 2007
@@ -9,62 +9,62 @@
#include <map>
#include "zypp/base/Exception.h"
-#include "YUMResourceType.h"
+#include "ResourceType.h"
namespace zypp
{
- namespace source
+ namespace repo
{
namespace yum
{
- static std::mapstd::string,YUMResourceType::Type _table;
+ static std::mapstd::string,ResourceType::Type _table;
- const YUMResourceType YUMResourceType::REPOMD(YUMResourceType::REPOMD_e);
- const YUMResourceType YUMResourceType::PRIMARY(YUMResourceType::PRIMARY_e);
- const YUMResourceType YUMResourceType::OTHER(YUMResourceType::OTHER_e);
- const YUMResourceType YUMResourceType::FILELISTS(YUMResourceType::FILELISTS_e);
- const YUMResourceType YUMResourceType::GROUP(YUMResourceType::GROUP_e);
- const YUMResourceType YUMResourceType::PATCHES(YUMResourceType::PATCHES_e);
- const YUMResourceType YUMResourceType::PATCH(YUMResourceType::PATCH_e);
- const YUMResourceType YUMResourceType::PRODUCTS(YUMResourceType::PRODUCTS_e);
- const YUMResourceType YUMResourceType::PATTERNS(YUMResourceType::PATTERNS_e);
+ const ResourceType ResourceType::REPOMD(ResourceType::REPOMD_e);
+ const ResourceType ResourceType::PRIMARY(ResourceType::PRIMARY_e);
+ const ResourceType ResourceType::OTHER(ResourceType::OTHER_e);
+ const ResourceType ResourceType::FILELISTS(ResourceType::FILELISTS_e);
+ const ResourceType ResourceType::GROUP(ResourceType::GROUP_e);
+ const ResourceType ResourceType::PATCHES(ResourceType::PATCHES_e);
+ const ResourceType ResourceType::PATCH(ResourceType::PATCH_e);
+ const ResourceType ResourceType::PRODUCTS(ResourceType::PRODUCTS_e);
+ const ResourceType ResourceType::PATTERNS(ResourceType::PATTERNS_e);
- YUMResourceType::YUMResourceType(const std::string & strval_r)
+ ResourceType::ResourceType(const std::string & strval_r)
: _type(parse(strval_r))
{}
- YUMResourceType::Type YUMResourceType::parse(const std::string & strval_r)
+ ResourceType::Type ResourceType::parse(const std::string & strval_r)
{
if (_table.empty())
{
// initialize it
- _table["repomd"] = YUMResourceType::REPOMD_e;
- _table["primary"] = YUMResourceType::PRIMARY_e;
- _table["other"] = YUMResourceType::OTHER_e;
- _table["filelists"] = YUMResourceType::FILELISTS_e;
- _table["group"] = YUMResourceType::GROUP_e;
- _table["patches"] = YUMResourceType::PATCHES_e;
- _table["patch"] = YUMResourceType::PATCH_e;
- _table["products"] = YUMResourceType::PRODUCTS_e;
- _table["patterns"] = YUMResourceType::PATTERNS_e;
- _table["NONE"] = _table["none"] = YUMResourceType::NONE_e;
+ _table["repomd"] = ResourceType::REPOMD_e;
+ _table["primary"] = ResourceType::PRIMARY_e;
+ _table["other"] = ResourceType::OTHER_e;
+ _table["filelists"] = ResourceType::FILELISTS_e;
+ _table["group"] = ResourceType::GROUP_e;
+ _table["patches"] = ResourceType::PATCHES_e;
+ _table["patch"] = ResourceType::PATCH_e;
+ _table["products"] = ResourceType::PRODUCTS_e;
+ _table["patterns"] = ResourceType::PATTERNS_e;
+ _table["NONE"] = _table["none"] = ResourceType::NONE_e;
}
- std::mapstd::string,YUMResourceType::Type::const_iterator it
+ std::mapstd::string,ResourceType::Type::const_iterator it
= _table.find(strval_r);
if (it == _table.end())
{
ZYPP_THROW(Exception(
- "YUMResourceType parse: illegal string value '" + strval_r + "'"));
+ "ResourceType parse: illegal string value '" + strval_r + "'"));
}
return it->second;
}
- const std::string & YUMResourceType::asString() const
+ const std::string & ResourceType::asString() const
{
static std::map _table;
if ( _table.empty() )
Copied: trunk/libzypp/zypp/repo/yum/ResourceType.h (from r5713, trunk/libzypp/zypp/source/yum/YUMResourceType.h)
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/repo/yum/ResourceType.h?p2=trunk/libzypp/zypp/repo/yum/ResourceType.h&p1=trunk/libzypp/zypp/source/yum/YUMResourceType.h&r1=5713&r2=5736&rev=5736&view=diff
==============================================================================
--- trunk/libzypp/zypp/source/yum/YUMResourceType.h (original)
+++ trunk/libzypp/zypp/repo/yum/ResourceType.h Tue Jun 12 17:12:30 2007
@@ -15,7 +15,7 @@
namespace zypp
{
- namespace source
+ namespace repo
{
namespace yum
{
@@ -24,17 +24,17 @@
/**
*
*/
- struct YUMResourceType
+ struct ResourceType
{
- static const YUMResourceType REPOMD;
- static const YUMResourceType PRIMARY;
- static const YUMResourceType OTHER;
- static const YUMResourceType FILELISTS;
- static const YUMResourceType GROUP;
- static const YUMResourceType PATCHES; // suse extension
- static const YUMResourceType PATCH; // suse extension
- static const YUMResourceType PRODUCTS; // suse extension
- static const YUMResourceType PATTERNS; // suse extension
+ static const ResourceType REPOMD;
+ static const ResourceType PRIMARY;
+ static const ResourceType OTHER;
+ static const ResourceType FILELISTS;
+ static const ResourceType GROUP;
+ static const ResourceType PATCHES; // suse extension
+ static const ResourceType PATCH; // suse extension
+ static const ResourceType PRODUCTS; // suse extension
+ static const ResourceType PATTERNS; // suse extension
enum Type
{
@@ -50,13 +50,13 @@
PATTERNS_e
};
- YUMResourceType(Type type) : _type(type) {}
+ ResourceType(Type type) : _type(type) {}
- explicit YUMResourceType(const std::string & strval_r);
+ explicit ResourceType(const std::string & strval_r);
const Type toEnum() const { return _type; }
- YUMResourceType::Type parse(const std::string & strval_r);
+ ResourceType::Type parse(const std::string & strval_r);
const std::string & asString() const;
@@ -64,10 +64,10 @@
};
- inline std::ostream & operator<<( std::ostream & str, const YUMResourceType & obj )
+ inline std::ostream & operator<<( std::ostream & str, const ResourceType & obj )
{ return str << obj.asString(); }
- inline bool operator==(const YUMResourceType & obj1, const YUMResourceType & obj2)
+ inline bool operator==(const ResourceType & obj1, const ResourceType & obj2)
{ return obj1._type == obj2._type; }
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org