00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef PMSelectionDataProvider_h
00022 #define PMSelectionDataProvider_h
00023
00024 #include <iosfwd>
00025 #include <string>
00026 #include <list>
00027 #include <set>
00028
00029 #include <y2util/FSize.h>
00030 #include <y2util/Vendor.h>
00031 #include <y2util/Pathname.h>
00032
00033 #include <y2pm/PMSelectablePtr.h>
00034
00035 #include <y2pm/PMError.h>
00036 #include <y2pm/PMLangCode.h>
00037 #include <y2pm/PMSelectionDataProviderPtr.h>
00038 #include <y2pm/PMSelectionPtr.h>
00039
00041
00042
00053 class PMSelectionDataProvider : public CountedRep {
00054 REP_BODY(PMSelectionDataProvider);
00055
00056 public:
00057
00059
00061
00062
00063 static std::string summary ( const LangCode& lang = LangCode("") ) { return std::string(); }
00064 static std::list<std::string> description( const LangCode& lang = LangCode("") ) { return std::list<std::string>(); }
00065 static std::list<std::string> insnotify ( const LangCode& lang = LangCode("") ) { return std::list<std::string>(); }
00066 static std::list<std::string> delnotify ( const LangCode& lang = LangCode("") ) { return std::list<std::string>(); }
00067 static FSize size() { return FSize(0); }
00068 static bool providesSources() { return false; }
00069 static std::string instSrcLabel() { return std::string(); }
00070 static Vendor instSrcVendor() { return Vendor(); }
00071 static unsigned instSrcRank() { return unsigned(-1); }
00072
00073
00074 static std::string category() { return std::string(); }
00075 static bool visible() { return true; }
00076 static std::list<std::string> suggests() { return std::list<std::string>(); }
00077 static std::list<PMSelectionPtr> suggests_ptrs() { return std::list<PMSelectionPtr>(); }
00078 static std::list<std::string> recommends() { return std::list<std::string>(); }
00079 static std::list<PMSelectionPtr> recommends_ptrs() { return std::list<PMSelectionPtr>(); }
00080 static std::list<std::string> inspacks ( const LangCode& lang = LangCode("") ) { return std::list<std::string>(); }
00081 static std::list<std::string> delpacks ( const LangCode& lang = LangCode("") ) { return std::list<std::string>(); }
00082
00083
00084 static PM::LocaleSet supportedLocales() { return PM::LocaleSet(); }
00085 static std::set<PMSelectablePtr> pureInspacks_ptrs( const LangCode& lang ) { return std::set<PMSelectablePtr>(); }
00086 static std::set<PMSelectablePtr> inspacks_ptrs( const LangCode& lang ) { return std::set<PMSelectablePtr>(); }
00087 static std::set<PMSelectablePtr> delpacks_ptrs( const LangCode& lang ) { return std::set<PMSelectablePtr>(); }
00088
00089 static FSize archivesize() { return FSize(0); }
00090 static std::string order() { return "000"; }
00091
00092 static bool isBase() { return false; }
00093
00094
00095 static PMError provideSelToInstall( Pathname & path_r ) { path_r = Pathname(); return PMError::E_error; }
00096
00097 protected:
00098
00099 PMSelectionDataProvider();
00100
00101 virtual ~PMSelectionDataProvider();
00102
00106 PMSelectionPtr mkPtr( const PMSelection & sel_r ) const { return const_cast<PMSelection*>(&sel_r); }
00107
00108 public:
00109
00111
00113
00114
00115 virtual std::string summary ( const PMSelection & sel_r, const LangCode& lang = LangCode("") ) const { return summary(); }
00116 virtual std::list<std::string> description ( const PMSelection & sel_r, const LangCode& lang = LangCode("") ) const { return description(); }
00117 virtual std::list<std::string> insnotify ( const PMSelection & sel_r, const LangCode& lang = LangCode("") ) const { return insnotify(); }
00118 virtual std::list<std::string> delnotify ( const PMSelection & sel_r, const LangCode& lang = LangCode("") ) const { return delnotify(); }
00119 virtual FSize size ( const PMSelection & sel_r ) const { return size(); }
00120 virtual bool providesSources( const PMSelection & sel_r ) const { return providesSources(); }
00121 virtual std::string instSrcLabel ( const PMSelection & sel_r ) const { return instSrcLabel(); }
00122 virtual Vendor instSrcVendor ( const PMSelection & sel_r ) const { return instSrcVendor(); }
00123 virtual unsigned instSrcRank ( const PMSelection & sel_r ) const { return instSrcRank(); }
00124
00125
00126 virtual std::string category ( const PMSelection & sel_r ) const { return category(); }
00127 virtual bool visible ( const PMSelection & sel_r ) const { return visible(); }
00128 virtual std::list<std::string> suggests ( const PMSelection & sel_r ) const { return suggests(); }
00129 virtual std::list<PMSelectionPtr> suggests_ptrs ( const PMSelection & sel_r ) const { return suggests_ptrs(); }
00130 virtual std::list<std::string> recommends ( const PMSelection & sel_r ) const { return recommends(); }
00131 virtual std::list<PMSelectionPtr> recommends_ptrs( const PMSelection & sel_r ) const { return recommends_ptrs(); }
00132 virtual std::list<std::string> inspacks ( const PMSelection & sel_r, const LangCode& lang = LangCode("") ) const { return inspacks(); }
00133 virtual std::list<std::string> delpacks ( const PMSelection & sel_r, const LangCode& lang = LangCode("") ) const { return delpacks(); }
00134
00135
00136 virtual PM::LocaleSet supportedLocales( const PMSelection & sel_r ) const { return PM::LocaleSet(); }
00137 virtual std::set<PMSelectablePtr> pureInspacks_ptrs( const PMSelection & sel_r, const LangCode& lang ) const { return pureInspacks_ptrs(lang); }
00138 virtual std::set<PMSelectablePtr> inspacks_ptrs ( const PMSelection & sel_r, const LangCode& lang ) const { return inspacks_ptrs(lang); }
00139 virtual std::set<PMSelectablePtr> delpacks_ptrs ( const PMSelection & sel_r, const LangCode& lang ) const { return delpacks_ptrs(lang); }
00140
00141 virtual FSize archivesize ( const PMSelection & sel_r ) const { return archivesize(); }
00142 virtual std::string order ( const PMSelection & sel_r ) const { return order(); }
00143
00144 virtual bool isBase ( const PMSelection & sel_r ) const { return isBase(); }
00145
00146
00147 virtual PMError provideSelToInstall( const PMSelection & sel_r, Pathname & path_r ) const { return provideSelToInstall( path_r ); }
00148 };
00149
00151
00152 #endif // PMSelectionDataProvider_h
00153