~ubuntu-branches/debian/experimental/libtorrent/experimental

« back to all changes in this revision

Viewing changes to src/download/download_wrapper.h

  • Committer: Bazaar Package Importer
  • Author(s): Jose Luis Rivas
  • Date: 2007-03-31 10:31:05 UTC
  • mto: (4.1.4 gutsy) (6.2.1 squeeze) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20070331103105-jzpp1rml6ud0ff75
Tags: upstream-0.11.4
ImportĀ upstreamĀ versionĀ 0.11.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include <sigc++/signal.h>
43
43
 
44
44
#include "data/chunk_handle.h"
45
 
#include "torrent/peer.h"
 
45
#include "torrent/peer/peer.h"
46
46
#include "download/download_info.h"
47
47
 
48
48
#include "download_main.h"
81
81
 
82
82
  DownloadMain*       main()                                  { return &m_main; }
83
83
  const DownloadMain* main() const                            { return &m_main; }
84
 
  HashTorrent*        hash_checker()                          { return m_hash; }
 
84
  HashTorrent*        hash_checker()                          { return m_hashChecker; }
85
85
 
86
86
  Object*             bencode()                               { return m_bencode; }
87
87
  void                set_bencode(Object* o)                  { m_bencode = o; }
88
88
 
 
89
  HashQueue*          hash_queue()                            { return m_hashQueue; }
 
90
  void                set_hash_queue(HashQueue* q)            { m_hashQueue = q; }
 
91
 
 
92
  const std::string&  complete_hash()                            { return m_hash; }
 
93
  const char*         chunk_hash(unsigned int index)             { return m_hash.c_str() + 20 * index; }
 
94
  void                set_complete_hash(const std::string& hash) { m_hash = hash; }
 
95
 
89
96
  DownloadInfo*       info()                                  { return m_main.info(); }
90
97
 
91
98
  int                 connection_type() const                 { return m_connectionType; }
92
99
  void                set_connection_type(int t)              { m_connectionType = t; }
93
100
 
94
101
  void                receive_initial_hash();
 
102
  void                receive_hash_done(ChunkHandle handle, const char* hash);
95
103
 
96
104
  void                check_chunk_hash(ChunkHandle handle);
97
 
  void                receive_hash_done(ChunkHandle handle, const char* hash);
98
105
 
99
106
  void                receive_storage_error(const std::string& str);
100
107
  void                receive_tracker_success(AddressList* l);
128
135
 
129
136
  DownloadMain        m_main;
130
137
  Object*             m_bencode;
131
 
  HashTorrent*        m_hash;
 
138
  HashTorrent*        m_hashChecker;
 
139
  HashQueue*          m_hashQueue;
 
140
 
 
141
  std::string         m_hash;
132
142
 
133
143
  int                 m_connectionType;
134
144