~jonathanmcdougall/baretorrent/trunk

« back to all changes in this revision

Viewing changes to src/ext/libtorrent/torrent_info.cpp

  • Committer: Jonathan McDougall
  • Date: 2014-07-05 21:51:26 UTC
  • Revision ID: jonathanmcdougall@gmail.com-20140705215126-m15nspug9trmam2g
updated to libtorrent 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
    list files(torrent_info const& ti, bool storage) {
116
116
        list result;
117
117
 
118
 
        typedef torrent_info::file_iterator iter;
119
 
 
120
 
        for (iter i = ti.begin_files(); i != ti.end_files(); ++i)
 
118
        for (int i = 0; i < ti.num_files(); ++i)
121
119
            result.append(ti.files().at(i));
122
120
 
123
121
        return result;
219
217
        .def("piece_length", &torrent_info::piece_length)
220
218
        .def("num_pieces", &torrent_info::num_pieces)
221
219
        .def("info_hash", &torrent_info::info_hash, copy)
 
220
#ifndef TORRENT_NO_DEPRECATE
 
221
        .def("file_at_offset", &torrent_info::file_at_offset)
 
222
#endif
222
223
        .def("hash_for_piece", &hash_for_piece)
223
224
        .def("merkle_tree", get_merkle_tree)
224
225
        .def("set_merkle_tree", set_merkle_tree)
226
227
 
227
228
        .def("num_files", &torrent_info::num_files, (arg("storage")=false))
228
229
        .def("file_at", &torrent_info::file_at) 
229
 
        .def("file_at_offset", &torrent_info::file_at_offset)
230
230
        .def("files", &files, (arg("storage")=false))
231
231
        .def("orig_files", &orig_files, (arg("storage")=false))
232
232
        .def("rename_file", rename_file0)