I just committed some code to add DBus capabilities to GGet. I came up with the following interface:
Methods:
AddDownload(String uri, String path) -> String id
CancelDownload(String id) -> Boolean
GetDownloadInformation(String id) -> Dict of {String, String}
Hide()
ListDownloads() -> Array of [String id]
PauseDownload(String id) -> Boolean
Present()
Quit()
RemoveCompletedDownloads()
RemoveDownload(String id) -> Boolean
ResumeDownload(String id) -> Boolean
Signals:
DownloadAdded(String id)
DownloadRemoved(String id)
DownloadStatusChanged(String id, String status)
Does this look sane? I was thinking about adding a signal for bitrate changes aswell but I’m afraid it could could be something of a performance hog since it would emit changes constantly. Someone suggested that I could implement a publish/subscribe system to make sure I only emit the signal when there is actually someone listening. I think this will have to wait until if/when its really needed though.
The plan for the coming days is to continue to fix bugs (there are still plenty) and to start working on a Epiphany extension which will use DBus to talk to GGet.