From: Stanislav Visnovsky Date: Fri, 27 Jan 2006 09:41:20 +0000 (+0000) Subject: selection data access (YUM does not compile yet) X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~3056 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc22e0eacfa9d21fcf7638fd25645c34ac957a24;p=platform%2Fupstream%2Flibzypp.git selection data access (YUM does not compile yet) --- diff --git a/zypp/Selection.cc b/zypp/Selection.cc index fd4d101..7bafadc 100644 --- a/zypp/Selection.cc +++ b/zypp/Selection.cc @@ -42,6 +42,35 @@ namespace zypp // /////////////////////////////////////////////////////////////////// + /** selection summary (FIXME: localized) */ + Label summary() const + { + return pimpl().summary(); + } + + /** */ + Text description() const + { + return pimpl().description(); + } + + /** selection category */ + Text category() const + { + return pimpl().category(); + } + + /** selection visibility (for hidden selections) */ + bool visible() const + { + return pimpl().visible(); + } + + /** selection presentation order */ + Text order() const + { + return pimpl().order(); + } ///////////////////////////////////////////////////////////////// } // namespace zypp diff --git a/zypp/Selection.h b/zypp/Selection.h index 00fba3b..427f5fb 100644 --- a/zypp/Selection.h +++ b/zypp/Selection.h @@ -35,8 +35,22 @@ namespace zypp typedef TraitsType::constPtrType constPtr; public: + // data access: + + /** selection summary (FIXME: localized) */ + Label summary() const; + /** */ - // data here: + Text description() const; + + /** selection category */ + Text category() const; + + /** selection visibility (for hidden selections) */ + bool visible() const; + + /** selection presentation order */ + Text order() const; protected: /** Ctor */ diff --git a/zypp/detail/SelectionImplIf.h b/zypp/detail/SelectionImplIf.h index f0d14c0..b28d741 100644 --- a/zypp/detail/SelectionImplIf.h +++ b/zypp/detail/SelectionImplIf.h @@ -36,9 +36,24 @@ namespace zypp typedef Selection ResType; public: + + /** */ + virtual Label summary() const = 0; + + /** */ + virtual Text description() const = 0; + + /** */ + virtual Text category() const = 0; + + /** */ + virtual bool visible() const = 0; + + /** */ + virtual Text order() const = 0; #if 0 - virtual std::string summary( const LangCode & lang = LangCode("") ) const; - virtual std::list description( const LangCode & lang = LangCode("") ) const; + virtual std::list suggests() const; + virtual std::list recommends() const; virtual std::list insnotify( const LangCode & lang = LangCode("") ) const; virtual std::list delnotify( const LangCode & lang = LangCode("") ) const; virtual ByteCount size() const; @@ -46,11 +61,7 @@ namespace zypp virtual std::string instSrcLabel() const; virtual Vendor instSrcVendor() const; virtual unsigned instSrcRank() const; - virtual std::string category() const; - virtual bool visible() const; - virtual std::list suggests() const; virtual std::list suggests_ptrs() const; - virtual std::list recommends() const; virtual std::list recommends_ptrs() const; virtual std::list inspacks( const LangCode & lang = LangCode("") ) const; virtual std::list delpacks( const LangCode & lang = LangCode("") ) const; @@ -58,8 +69,6 @@ namespace zypp virtual std::set pureInspacks_ptrs( const LangCode & lang ) const; virtual std::set inspacks_ptrs( const LangCode & lang ) const; virtual std::set delpacks_ptrs( const LangCode & lang ) const; - virtual ByteCount archivesize() const; - virtual std::string order() const; virtual bool isBase() const; virtual PMError provideSelToInstall( Pathname & path_r ) const; #endif