selection data access (YUM does not compile yet)
authorStanislav Visnovsky <visnov@suse.cz>
Fri, 27 Jan 2006 09:41:20 +0000 (09:41 +0000)
committerStanislav Visnovsky <visnov@suse.cz>
Fri, 27 Jan 2006 09:41:20 +0000 (09:41 +0000)
zypp/Selection.cc
zypp/Selection.h
zypp/detail/SelectionImplIf.h

index fd4d101..7bafadc 100644 (file)
@@ -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
index 00fba3b..427f5fb 100644 (file)
@@ -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 */
index f0d14c0..b28d741 100644 (file)
@@ -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<std::string> description( const LangCode & lang = LangCode("") ) const;
+      virtual std::list<std::string> suggests() const;
+      virtual std::list<std::string> recommends() const;
       virtual std::list<std::string> insnotify( const LangCode & lang = LangCode("") ) const;
       virtual std::list<std::string> 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<std::string> suggests() const;
       virtual std::list<PMSelectionPtr> suggests_ptrs() const;
-      virtual std::list<std::string> recommends() const;
       virtual std::list<PMSelectionPtr> recommends_ptrs() const;
       virtual std::list<std::string> inspacks( const LangCode & lang = LangCode("") ) const;
       virtual std::list<std::string> delpacks( const LangCode & lang = LangCode("") ) const;
@@ -58,8 +69,6 @@ namespace zypp
       virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode & lang ) const;
       virtual std::set<PMSelectablePtr> inspacks_ptrs( const LangCode & lang ) const;
       virtual std::set<PMSelectablePtr> 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