~ubuntu-branches/ubuntu/quantal/aria2/quantal

« back to all changes in this revision

Viewing changes to test/MockDHTTask.h

  • Committer: Bazaar Package Importer
  • Author(s): Kartik Mistry
  • Date: 2010-11-24 12:26:31 UTC
  • mfrom: (1.6.1 upstream) (2.3.8 experimental)
  • Revision ID: james.westby@ubuntu.com-20101124122631-upujekj1ek94h3x2
Tags: 1.10.6-1
* New upstream release:
  + Fixed FTBFS on alpha arch (Closes: #590257)
  + Added IPv6 support (Closes: #448390)
* debian/patches/ftbfs_kfreebsd.diff:
  + Dropped, merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef _D_MOCK_DHT_TASK_H_
2
 
#define _D_MOCK_DHT_TASK_H_
 
1
#ifndef D_MOCK_DHT_TASK_H
 
2
#define D_MOCK_DHT_TASK_H
3
3
 
4
4
#include "DHTTask.h"
 
5
 
 
6
#include <cstring>
 
7
 
5
8
#include "DHTNode.h"
6
9
#include "DHTConstants.h"
7
 
#include <cstring>
8
10
 
9
11
namespace aria2 {
10
12
 
14
16
 
15
17
  unsigned char targetID_[DHT_ID_LENGTH];
16
18
 
17
 
  MockDHTTask(const SharedHandle<DHTNode>& remoteNode):remoteNode_(remoteNode) {}
 
19
  bool finished_;
 
20
 
 
21
  MockDHTTask(const SharedHandle<DHTNode>& remoteNode):
 
22
    remoteNode_(remoteNode),
 
23
    finished_(false) {}
18
24
 
19
25
  virtual ~MockDHTTask() {}
20
26
 
22
28
 
23
29
  virtual bool finished()
24
30
  {
25
 
    return false;
 
31
    return finished_;
26
32
  }
27
33
 
28
34
  void setTargetID(const unsigned char* targetID)
33
39
 
34
40
} // namespace aria2
35
41
 
36
 
#endif // _D_MOCK_DHT_TASK_H_
 
42
#endif // D_MOCK_DHT_TASK_H