mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-23 04:05:15 +00:00
make current upload/download status objects available from the client
This commit is contained in:
parent
94097affc3
commit
e6af3b845c
@ -280,3 +280,10 @@ class Client(node.Node, testutil.PollMixin):
|
||||
uploader = self.getServiceNamed("uploader")
|
||||
return uploader.upload(uploadable)
|
||||
|
||||
def list_uploads(self):
|
||||
uploader = self.getServiceNamed("uploader")
|
||||
return uploader.list_uploads()
|
||||
|
||||
def list_downloads(self):
|
||||
downloader = self.getServiceNamed("downloader")
|
||||
return downloader.list_downloads()
|
||||
|
@ -871,3 +871,5 @@ class Downloader(service.MultiService):
|
||||
return self.download(uri, FileHandle(filehandle))
|
||||
|
||||
|
||||
def list_downloads(self):
|
||||
return self._all_downloads.keys()
|
||||
|
@ -1374,6 +1374,14 @@ class IClient(Interface):
|
||||
IDirectoryNode-providing instances, like NewDirectoryNode.
|
||||
"""
|
||||
|
||||
class IClientStatus(Interface):
|
||||
def list_uploads():
|
||||
"""Return a list of IUploadStatus objects, one for each
|
||||
upload which is currently running."""
|
||||
def list_downloads():
|
||||
"""Return a list of IDownloadStatus objects, one for each
|
||||
download which is currently running."""
|
||||
|
||||
class IUploadStatus(Interface):
|
||||
def get_storage_index():
|
||||
"""Return a string with the (binary) storage index in use on this
|
||||
|
@ -1167,3 +1167,6 @@ class Uploader(service.MultiService):
|
||||
return res
|
||||
d.addBoth(_done)
|
||||
return d
|
||||
|
||||
def list_uploads(self):
|
||||
return self._all_uploads.keys()
|
||||
|
Loading…
x
Reference in New Issue
Block a user