forked from chozabu/FriendMap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTurtleTunnelInfo.h
47 lines (35 loc) · 936 Bytes
/
TurtleTunnelInfo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef TURTLETUNNELINFO_H
#define TURTLETUNNELINFO_H
#include <QtGlobal>
#include "DataModel.h"
#include "turtle/p3turtle.h"
#include "turtle/turtletypes.h"
enum TunnelType {
Download,
Upload,
Mediator
};
class TurtleTunnelInfo {
public:
TurtleTunnelInfo(const std::vector<std::string>& tunnels_info_str, const DataModel& dm);
const TurtleTunnelId& getId() const;
const TurtlePeerId& getSourceID() const;
const TurtlePeerId& getDestinationID() const;
double getSpeedBps() const;
const std::string& getIdString() const;
std::string toString() const;
const std::string& getHash() const {
return hash;
}
TunnelType getType() const;
private:
TurtleTunnelId id;
std::string id_str;
TurtlePeerId source_id;
TurtlePeerId destination_id;
std::string hash;
std::string secs_ago;
double speed_Bps;
std::string speed_Bps_str;
};
#endif