IBR-DTNSuite
0.10
Main Page
Namespaces
Classes
Files
File List
File Members
BundleSelector.h
Go to the documentation of this file.
1
/*
2
* BundleSelector.h
3
*
4
* Created on: 22.01.2013
5
* Author: morgenro
6
*/
7
8
#ifndef BUNDLESELECTOR_H_
9
#define BUNDLESELECTOR_H_
10
11
#include "
storage/BundleResult.h
"
12
#include <
ibrdtn/data/EID.h
>
13
#include <
ibrdtn/data/MetaBundle.h
>
14
#include <
ibrdtn/data/Number.h
>
15
#include <
ibrcommon/Exceptions.h
>
16
17
namespace
dtn
18
{
19
namespace
storage
20
{
21
class
BundleSelectorException
:
public
ibrcommon::Exception
22
{
23
public
:
24
BundleSelectorException
(std::string
what
=
"Bundle query aborted."
) throw() : ibrcommon::
Exception
(
what
)
25
{
26
}
27
};
28
29
class
NoBundleFoundException
:
public
dtn::MissingObjectException
30
{
31
public
:
32
NoBundleFoundException
(std::string
what
=
"No bundle match the specified criteria."
) throw() : dtn::
MissingObjectException
(
what
)
33
{
34
};
35
};
36
37
class
BundleSelector
38
{
39
public
:
40
virtual
~BundleSelector
() {};
41
46
virtual
dtn::data::Size
limit
()
const
throw () {
return
1; };
47
54
virtual
bool
shouldAdd
(
const
dtn::data::MetaBundle
&)
const
throw (
BundleSelectorException
) {
return
false
; };
55
};
56
}
57
}
58
59
#endif
/* BUNDLESELECTOR_H_ */
daemon
src
storage
BundleSelector.h
Generated on Mon Jul 22 2013 15:16:00 for IBR-DTNSuite by
1.8.3.1