IBR-DTNSuite
0.8
|
00001 /* 00002 * BundleList.h 00003 * 00004 * Created on: 26.07.2010 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef BUNDLESUMMARY_H_ 00009 #define BUNDLESUMMARY_H_ 00010 00011 #include "routing/SummaryVector.h" 00012 #include <ibrdtn/data/BundleList.h> 00013 00014 00015 namespace dtn 00016 { 00017 namespace routing 00018 { 00019 class BundleSummary : public dtn::data::BundleList 00020 { 00021 public: 00022 BundleSummary(); 00023 virtual ~BundleSummary(); 00024 00025 void add(const dtn::data::MetaBundle bundle); 00026 void remove(const dtn::data::MetaBundle bundle); 00027 void clear(); 00028 00029 bool contains(const dtn::data::BundleID &bundle) const; 00030 00031 const SummaryVector& getSummaryVector() const; 00032 00033 protected: 00034 void eventBundleExpired(const ExpiringBundle&); 00035 void eventCommitExpired(); 00036 00037 private: 00038 SummaryVector _vector; 00039 }; 00040 } 00041 } 00042 00043 #endif /* BUNDLESUMMARY_H_ */