IBR-DTNSuite
0.12
Main Page
Namespaces
Classes
Files
File List
File Members
NativeP2pManager.h
Go to the documentation of this file.
1
/*
2
* NativeP2pManager.h
3
*
4
* Copyright (C) 2013 IBR, TU Braunschweig
5
*
6
* Written-by: Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de>
7
*
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
11
*
12
* http://www.apache.org/licenses/LICENSE-2.0
13
*
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
19
*
20
*/
21
22
#ifndef NATIVEP2PMANAGER_H_
23
#define NATIVEP2PMANAGER_H_
24
25
#include "
net/P2PDialupExtension.h
"
26
#include "
core/Node.h
"
27
#include <
ibrdtn/data/EID.h
>
28
#include <string>
29
30
namespace
dtn
31
{
32
namespace
net
33
{
34
class
NativeP2pManager
:
protected
dtn::net::P2PDialupExtension
35
{
36
// the protocol returned by getProtocol()
37
const
dtn::core::Node::Protocol
_protocol;
38
39
public
:
40
NativeP2pManager
(
const
std::string &protocol);
41
virtual
~NativeP2pManager
() = 0;
42
46
virtual
dtn::core::Node::Protocol
getProtocol
()
const
;
47
51
virtual
void
connect
(
const
dtn::core::Node::URI
&uri);
52
56
virtual
void
disconnect
(
const
dtn::core::Node::URI
&uri);
57
58
// method for JNI
59
virtual
void
connect
(
const
std::string &identifier) = 0;
60
61
// method for JNI
62
virtual
void
disconnect
(
const
std::string &identifier) = 0;
63
64
protected
:
65
// method for JNI
66
virtual
void
fireDiscovered
(
const
dtn::data::EID
&eid,
const
std::string &identifier,
size_t
timeout,
int
priority);
67
68
// method for JNI
69
virtual
void
fireDisconnected
(
const
dtn::data::EID
&eid,
const
std::string &identifier);
70
71
// method for JNI
72
virtual
void
fireConnected
(
const
dtn::data::EID
&eid,
const
std::string &identifier,
size_t
timeout,
int
priority);
73
74
// method for JNI
75
virtual
void
fireInterfaceUp
(
const
std::string &iface);
76
77
// method for JNI
78
virtual
void
fireInterfaceDown
(
const
std::string &iface);
79
};
80
}
/* namespace net */
81
}
/* namespace dtn */
82
#endif
/* NATIVEP2PMANAGER_H_ */
daemon
src
net
NativeP2pManager.h
Generated on Thu Mar 27 2014 09:26:20 for IBR-DTNSuite by
1.8.4