PatchImpl.cc

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00013 #include "zypp/TranslatedText.h"
00014 #include "zypp/base/String.h"
00015 #include "zypp/base/Logger.h"
00016 #include "zypp/repo/RepositoryImpl.h"
00017 #include "PatchImpl.h"
00018 #include "zypp/cache/CacheAttributes.h"
00019 
00020 
00021 using namespace std;
00022 using namespace zypp::detail;
00023 using namespace::zypp::repo;
00024 
00026 namespace zypp { namespace repo { namespace cached {
00027 
00029 //
00030 //        CLASS NAME : PatchImpl
00031 //
00033 
00036 PatchImpl::PatchImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
00037     : _repository (repository_r),
00038       _id(id)
00039 {}
00040 
00041 Repository
00042 PatchImpl::repository() const
00043 {
00044   return _repository->selfRepository();
00045 }
00046 
00048 // ResObject Attributes
00050 
00051 TranslatedText PatchImpl::summary() const
00052 {
00053   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
00054 }
00055 
00056 TranslatedText PatchImpl::description() const
00057 {
00058   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
00059 }
00060 
00061 TranslatedText PatchImpl::insnotify() const
00062 {
00063   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
00064 }
00065 
00066 TranslatedText PatchImpl::delnotify() const
00067 {
00068   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
00069 }
00070 
00071 TranslatedText PatchImpl::licenseToConfirm() const
00072 {
00073   return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
00074 }
00075 
00076 Vendor PatchImpl::vendor() const
00077 {
00078   return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
00079 }
00080 
00081 
00082 ByteCount PatchImpl::size() const
00083 {
00084   return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
00085 }
00086 
00087 bool PatchImpl::installOnly() const
00088 {
00089   return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
00090 }
00091 
00092 Date PatchImpl::buildtime() const
00093 {
00094   return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
00095 }
00096 
00097 Date PatchImpl::installtime() const
00098 {
00099   return Date();
00100 }
00101 
00103 // PATCH
00105 
00106 std::string PatchImpl::id() const
00107 {
00108   return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatchId() );
00109 }
00110 
00111 Date PatchImpl::timestamp() const
00112 {
00113   return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrPatchTimestamp() );
00114 }
00115 
00116 std::string PatchImpl::category() const
00117 {
00118   return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrPatchCategory() );
00119 }
00120 
00121 bool PatchImpl::reboot_needed() const
00122 {
00123   return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrPatchRebootNeeded() );
00124 }
00125 
00126 bool PatchImpl::affects_pkg_manager() const
00127 {
00128   return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrPatchAffectsPkgManager() );
00129 }
00130 
00132 } } } // namespace zypp::repo::cached
00134 

Generated on Tue Sep 25 19:23:00 2007 for libzypp by  doxygen 1.5.3