00001 /* 00002 * FileBundle.cpp 00003 * 00004 * Created on: 24.07.2009 00005 * Author: morgenro 00006 */ 00007 00008 #include "ibrdtn/config.h" 00009 #include "ibrdtn/api/FileBundle.h" 00010 #include "ibrdtn/data/PayloadBlock.h" 00011 #include "ibrcommon/data/BLOB.h" 00012 #include <cassert> 00013 00014 namespace dtn 00015 { 00016 namespace api 00017 { 00018 FileBundle::FileBundle(dtn::data::EID destination, string filename) 00019 : Bundle(destination), _filename(filename) 00020 { 00021 // create a reference out of the given file 00022 ibrcommon::BLOB::Reference ref = ibrcommon::FileBLOB::create(_filename); 00023 00024 // create a memory based payload block. 00025 _b.push_back(ref); 00026 } 00027 00028 FileBundle::~FileBundle() 00029 { 00030 } 00031 } 00032 }
1.7.1