00001
00002
00003
00004
00005
00006
00007
00008 #ifndef METABUNDLE_CPP_
00009 #define METABUNDLE_CPP_
00010
00011 #include "ibrdtn/data/MetaBundle.h"
00012
00013 namespace dtn
00014 {
00015 namespace data
00016 {
00017 MetaBundle::MetaBundle()
00018 : BundleID(), lifetime(), destination(), reportto(),
00019 custodian(), appdatalength(0), procflags(0)
00020 {
00021 }
00022
00023 MetaBundle::MetaBundle(const dtn::data::Bundle &b)
00024 : BundleID(b), lifetime(b._lifetime), destination(b._destination), reportto(b._reportto),
00025 custodian(b._custodian), appdatalength(b._appdatalength), procflags(b._procflags)
00026 {
00027 }
00028
00029 MetaBundle::~MetaBundle()
00030 {}
00031
00032 int MetaBundle::getPriority() const
00033 {
00034
00035 if (procflags & dtn::data::Bundle::PRIORITY_BIT1)
00036 {
00037 return 0;
00038 }
00039 else
00040 {
00041 if (procflags & dtn::data::Bundle::PRIORITY_BIT2) return 1;
00042 else return -1;
00043 }
00044 }
00045 }
00046 }
00047
00048 #endif