a.atalla - 2011-05-09

Dear Developer
i'm going to start a project with the cli download manager aria2
it has a built in xmlrpc server and i could make calls from python as shown in aria2 wiki like this

>>> import os
>>> os.system('aria2c -D --enable-xml-rpc') #starting as Daemon.
0
>>> import xmlrpclib
>>> from pprint import pprint
>>> s=xmlrpclib.ServerProxy('http://localhost:6800/rpc')
>>> s
<ServerProxy for localhost:6800/rpc>
>>> s.aria2.getVersion()
{'version': '1.6.3', 'enabledFeatures': ['Async DNS', 'BitTorrent', 'Firefox3 Cookie', 'GZip', 'HTTPS', 'Message Digest', 'Metalink', 'XML-RPC']}
>>> s.aria2.addUri(['http://services.netbeans.org/bouncer/index.php?product=netbeans-6.8-ml-javase&os=linux'], {'dir':'/home/xmonader/' } )
'2'
>>> s.aria2.tellActive()
[{'status': 'active', 'numPieces': '47', 'downloadSpeed': '118786', 'pieceLength': '1048576', 'bitfield': '000000000000', 'connections': '5', 'gid': '2', 'completedLength': '393216', 'uploadSpeed': '0', 'uploadLength': '0', 'totalLength': '49047552'}]
>>> s.aria2.tellActive()
[{'status': 'active', 'numPieces': '47', 'downloadSpeed': '121583', 'pieceLength': '1048576', 'bitfield': '000000000000', 'connections': '5', 'gid': '2', 'completedLength': '540672', 'uploadSpeed': '0', 'uploadLength': '0', 'totalLength': '49047552'}]

but i want to work with C++ not python
could u please give me a very basic example how to use your lib as xmlrpclib in python with aria2