00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "zypp/TranslatedText.h"
00011 #include "zypp/base/String.h"
00012 #include "zypp/base/Logger.h"
00013 #include "zypp/repo/RepositoryImpl.h"
00014 #include "MessageImpl.h"
00015 #include "zypp/cache/CacheAttributes.h"
00016
00017
00018 using namespace std;
00019 using namespace zypp::detail;
00020 using namespace::zypp::repo;
00021
00023 namespace zypp { namespace repo { namespace cached {
00024
00026
00027
00028
00030
00033 MessageImpl::MessageImpl (const data::RecordId &id, cached::RepoImpl::Ptr repository_r)
00034 : _repository (repository_r),
00035 _id(id)
00036 {}
00037
00038 Repository
00039 MessageImpl::repository() const
00040 {
00041 return _repository->selfRepository();
00042 }
00043
00045
00047
00048 TranslatedText MessageImpl::summary() const
00049 {
00050 return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectSummary() );
00051 }
00052
00053 TranslatedText MessageImpl::description() const
00054 {
00055 return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDescription() );
00056 }
00057
00058 TranslatedText MessageImpl::insnotify() const
00059 {
00060 return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectInsnotify() );
00061 }
00062
00063 TranslatedText MessageImpl::delnotify() const
00064 {
00065 return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectDelnotify() );
00066 }
00067
00068 TranslatedText MessageImpl::licenseToConfirm() const
00069 {
00070 return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrResObjectLicenseToConfirm() );
00071 }
00072
00073 Vendor MessageImpl::vendor() const
00074 {
00075 return _repository->resolvableQuery().queryStringAttribute( _id, cache::attrResObjectVendor() );
00076 }
00077
00078
00079 ByteCount MessageImpl::size() const
00080 {
00081 return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectInstalledSize() );
00082 }
00083
00084 bool MessageImpl::installOnly() const
00085 {
00086 return _repository->resolvableQuery().queryBooleanAttribute( _id, cache::attrResObjectInstallOnly() );
00087 }
00088
00089 Date MessageImpl::buildtime() const
00090 {
00091 return _repository->resolvableQuery().queryNumericAttribute( _id, cache::attrResObjectBuildTime() );
00092 }
00093
00094 Date MessageImpl::installtime() const
00095 {
00096 return Date();
00097 }
00098
00100
00102
00103 TranslatedText MessageImpl::text() const
00104 {
00105 return _repository->resolvableQuery().queryTranslatedStringAttribute( _id, cache::attrMessageText() );
00106 }
00107
00108 Patch::constPtr MessageImpl::patch() const
00109 {
00110 return 0;
00111 }
00112
00114 } } }
00116