00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef I_BESCatalogDirectory_h
00034 #define I_BESCatalogDirectory_h 1
00035
00036 #include "sys/stat.h"
00037
00038 #include <list>
00039 #include <string>
00040
00041 using std::list ;
00042 using std::string ;
00043
00044 #include "BESCatalog.h"
00045
00046 class BESInfo ;
00047 class BESCatalogUtils ;
00048
00051 class BESCatalogDirectory : public BESCatalog
00052 {
00053 private:
00054 const BESCatalogUtils * _utils ;
00055 typedef struct _bes_dir_entry
00056 {
00057 bool collection ;
00058 bool isData ;
00059 string name ;
00060 string size ;
00061 string mod_date ;
00062 string mod_time ;
00063 } bes_dir_entry ;
00064
00065 void add_stat_info( BESInfo *info,
00066 struct stat &buf,
00067 const string &node ) ;
00068 void add_stat_info( bes_dir_entry &entry,
00069 struct stat &buf,
00070 const string &node ) ;
00071 bool isData( const string &inQuestion,
00072 list<string> &provides ) ;
00073 public:
00074 BESCatalogDirectory( const string &name ) ;
00075 virtual ~BESCatalogDirectory( void ) ;
00076
00077 virtual void show_catalog( const string &container,
00078 const string &catalog_or_info,
00079 BESInfo *info ) ;
00080
00081 virtual void dump( ostream &strm ) const ;
00082 };
00083
00084 #endif // I_BESCatalogDirectory_h
00085