-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimpledownloader.h
More file actions
44 lines (35 loc) · 876 Bytes
/
simpledownloader.h
File metadata and controls
44 lines (35 loc) · 876 Bytes
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
#ifndef SIMPLEDOWNLOADER_H
#define SIMPLEDOWNLOADER_H
extern "C" {
#include <ccn/fetch.h>
#include <ccn/ccn.h>
#include <ccn/charbuf.h>
#include <ccn/uri.h>
#include <ccn/header.h>
#include <ccn/reg_mgmt.h>
}
#include "libdash.h"
#include <boost/shared_ptr.hpp>
#include <fstream>
#include <string>
#include <sys/time.h>
#include <unistd.h>
#include "ccnxconnection.h"
namespace SmartSync
{
class SimpleDownloader
{
public:
SimpleDownloader(std::string mpd_uri, unsigned int bandwidth_limit);
~SimpleDownloader();
void operator()();
protected:
dash::mpd::IMPD* mpd;
dash::IDASHManager* manager;
unsigned int lastSegmentBytes;
struct timeval start;
unsigned int bandwidth_limit;
unsigned int getDownloadRate();
};
}
#endif // SIMPLEDOWNLOADER_H