~ubuntu-branches/ubuntu/maverick/libtorrent-rasterbar/maverick

« back to all changes in this revision

Viewing changes to bindings/python/src/fingerprint.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Cristian Greco
  • Date: 2008-07-02 10:46:21 UTC
  • Revision ID: james.westby@ubuntu.com-20080702104621-jzx3pfke9lkcxfxn
Tags: upstream-0.13.1
ImportĀ upstreamĀ versionĀ 0.13.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright Daniel Wallin 2006. Use, modification and distribution is
 
2
// subject to the Boost Software License, Version 1.0. (See accompanying
 
3
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
4
 
 
5
#include <libtorrent/fingerprint.hpp>
 
6
#include <boost/python.hpp>
 
7
 
 
8
void bind_fingerprint()
 
9
{
 
10
    using namespace boost::python;
 
11
    using namespace libtorrent;
 
12
 
 
13
    class_<fingerprint>("fingerprint", no_init)
 
14
        .def(
 
15
            init<char const*,int,int,int,int>(
 
16
                (arg("id"), "major", "minor", "revision", "tag")
 
17
            )
 
18
        )
 
19
        .def("__str__", &fingerprint::to_string)
 
20
        .def_readonly("name", &fingerprint::name)
 
21
        .def_readonly("major_version", &fingerprint::major_version)
 
22
        .def_readonly("minor_version", &fingerprint::minor_version)
 
23
        .def_readonly("revision_version", &fingerprint::revision_version)
 
24
        .def_readonly("tag_version", &fingerprint::tag_version)
 
25
        ;
 
26
}
 
27