# Path: lib/xmlrpc.py
# class RTorrentXMLRPC(object):
# 
#     def __init__(self, target):
#         self.info = target
# 
#         if self.info['type'] == CONNECTION_HTTP:
#             self.c = xmlrpc.client.ServerProxy('http://%s:%i%s' % \
#                 (self.info['host'], self.info['port'], \
#                 self.info['url']))
#         else:
#             self.c = xmlrpc2scgi.RTorrentXMLRPCClient(self.info['fd'])
# 
# 
#     def __getattr__(self, attr, **args):
#         return getattr(self.c, attr)


from lib.xmlrpc import RTorrentXMLRPC
        from lib.torrentquery import TorrentQuery
import types
#!/usr/bin/python
"""
.. _torrent-class:

Torrent
=======

The Torrent class defines a single torrent.
It is instantiated with a Torrent specific hash,
and connection information similar to :ref:`rtorrent-class`.
"""


#from lib.peerrequester import PeerRequester

class Torrent(object):
    """
    Torrent class. This class contains most of the methods specific to a
    torrent, such as get_name, get_hash, is_complete, get_download_rate, etc.
    """

    def __init__(self, target, _hash):
        """
        Initialise the Torrent object; pass a target dict (parsed by
        parse_config in pyrotorrentpy) and the torrent hash.
        """
        self.target = target

# Path: lib/xmlrpc.py
# class RTorrentXMLRPC(object):
# 
#     def __init__(self, target):
#         self.info = target
# 
#         if self.info['type'] == CONNECTION_HTTP:
#             self.c = xmlrpc.client.ServerProxy('http://%s:%i%s' % \
#                 (self.info['host'], self.info['port'], \
#                 self.info['url']))
#         else:
#             self.c = xmlrpc2scgi.RTorrentXMLRPCClient(self.info['fd'])
# 
# 
#     def __getattr__(self, attr, **args):
#         return getattr(self.c, attr)


# Path: model/torrent.py
from lib.xmlrpc import RTorrentXMLRPC
        from lib.torrentquery import TorrentQuery
import types

#!/usr/bin/python
"""
.. _torrent-class:

Torrent
=======

The Torrent class defines a single torrent.
It is instantiated with a Torrent specific hash,
and connection information similar to :ref:`rtorrent-class`.
"""


#from lib.peerrequester import PeerRequester

class Torrent(object):
    """
    Torrent class. This class contains most of the methods specific to a
    torrent, such as get_name, get_hash, is_complete, get_download_rate, etc.
    """

    def __init__(self, target, _hash):
        """
        Initialise the Torrent object; pass a target dict (parsed by
        parse_config in pyrotorrentpy) and the torrent hash.
        """
        self.target = target

        self.s = RTorrentXMLRPC(target)