IBR-DTNSuite  0.8
ibrdtn/ibrdtn/api/FileBundle.cpp
Go to the documentation of this file.
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 
00013 namespace dtn
00014 {
00015         namespace api
00016         {
00017                 FileBundle::FileBundle(const dtn::data::EID &destination, const ibrcommon::File &file)
00018                  : Bundle(destination)
00019                 {
00020                         // create a reference out of the given file
00021                         ibrcommon::BLOB::Reference ref = ibrcommon::BLOB::open(file);
00022 
00023                         // create a new payload block with this reference.
00024                         _b.push_back(ref);
00025                 }
00026 
00027                 FileBundle::~FileBundle()
00028                 {
00029                 }
00030         }
00031 }