# 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: lib/multibase.py
# class InvalidTorrentCommandException(Exception):
#     """
#     Thrown on an invalid command.
#     """


from lib.xmlrpc import RTorrentXMLRPC
from lib.multibase import InvalidTorrentCommandException
"""
.. _baserequester-class:

BaseRequester
=============

BaseRequester is a class created to provide an easy way to create classes that
implement a lot of operations over XMLRPC. It is not the same as
:ref:`multibase-class` in the sense that this performs operations on all the
items in the view. (For example, :ref:`torrentrequester-class` implements a
method to get the name of each torrent in a view by simply calling .get_name().
"""



class BaseRequester(object):
    """
    """

    def __init__(self, target, *extra_args):
        """
        """

# 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: lib/multibase.py
# class InvalidTorrentCommandException(Exception):
#     """
#     Thrown on an invalid command.
#     """


# Path: lib/baserequester.py
from lib.xmlrpc import RTorrentXMLRPC
from lib.multibase import InvalidTorrentCommandException

"""
.. _baserequester-class:

BaseRequester
=============

BaseRequester is a class created to provide an easy way to create classes that
implement a lot of operations over XMLRPC. It is not the same as
:ref:`multibase-class` in the sense that this performs operations on all the
items in the view. (For example, :ref:`torrentrequester-class` implements a
method to get the name of each torrent in a view by simply calling .get_name().
"""



class BaseRequester(object):
    """
    """

    def __init__(self, target, *extra_args):
        """
        """

        self.s = RTorrentXMLRPC(target)