<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: GGet DBus interface</title>
	<atom:link href="http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Sun, 31 Aug 2008 21:35:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: reinouts</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-33</link>
		<dc:creator>reinouts</dc:creator>
		<pubDate>Thu, 31 Jul 2008 23:54:54 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-33</guid>
		<description>For some more ideas, google for the (ill-fated) Mathusalem project, from SoC a few years back.</description>
		<content:encoded><![CDATA[<p>For some more ideas, google for the (ill-fated) Mathusalem project, from SoC a few years back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vudentz</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-32</link>
		<dc:creator>Vudentz</dc:creator>
		<pubDate>Thu, 31 Jul 2008 21:00:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-32</guid>
		<description>johans: I meant return a dbus error message with a useful message why it failed, there is no need to return a boolean if you don&#039;t give a reason.</description>
		<content:encoded><![CDATA[<p>johans: I meant return a dbus error message with a useful message why it failed, there is no need to return a boolean if you don&#8217;t give a reason.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoffe</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-31</link>
		<dc:creator>Stoffe</dc:creator>
		<pubDate>Thu, 31 Jul 2008 17:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-31</guid>
		<description>Referer and Cookies should not be that hard to pass along as (optional) extra parameters, it&#039;s a String and a Dict of String,String, and they can be empty if there is no need for them or the app doesn&#039;t have them. Or you could add extra methods.

However, maybe it&#039;s a good idea to be a bit more generic? Some sites need User-Agent (because they suck) and there&#039;s authorization, and more, so instead of Referer, it should probably be a dict of HTTP headers. That would also take care of cookies on the way. 

Oh, and can you deal with POST? Or where is it that you think you want to inject your application in the chain? Will there be double calls somehow or how is it decided that the manager should take over?

I wonder if the best thing still would not be to allow apps to update common task bars instead, that&#039;s the real killer, not that it downloads things... that could on the other hand be a great library? Common download lib?

Ah well, time will tell. :)</description>
		<content:encoded><![CDATA[<p>Referer and Cookies should not be that hard to pass along as (optional) extra parameters, it&#8217;s a String and a Dict of String,String, and they can be empty if there is no need for them or the app doesn&#8217;t have them. Or you could add extra methods.</p>
<p>However, maybe it&#8217;s a good idea to be a bit more generic? Some sites need User-Agent (because they suck) and there&#8217;s authorization, and more, so instead of Referer, it should probably be a dict of HTTP headers. That would also take care of cookies on the way. </p>
<p>Oh, and can you deal with POST? Or where is it that you think you want to inject your application in the chain? Will there be double calls somehow or how is it decided that the manager should take over?</p>
<p>I wonder if the best thing still would not be to allow apps to update common task bars instead, that&#8217;s the real killer, not that it downloads things&#8230; that could on the other hand be a great library? Common download lib?</p>
<p>Ah well, time will tell. <img src='http://blogs.gnome.org/johans/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: diegoe</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-30</link>
		<dc:creator>diegoe</dc:creator>
		<pubDate>Wed, 30 Jul 2008 23:33:24 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-30</guid>
		<description>As for epiphany, you&#039;ll find some limitations due to gecko, I think the best bet you can do is to hack the download manager of epiphany to hook to gget if it&#039;s available/configured.
For example:
 - click on a link
 - &quot;where do you want to save this?&quot;
 + hook here and check if &quot;Use gget to manage downloads&quot; is checked in ephy config, if it is then run gget, otherwise just continue the normal code.

The trick would be with cookies and sessions, some downloads won&#039;t work I think, I&#039;m not really sure if you can fix that somehow. For example, the online-desktop uses firefox&#039;s cookies, I think they have a mini python service for that, I can&#039;t recall where it is though, but it&#039;s a python script of like 100 lines, quite a hack. You could use it or take the idea from there.

Let me know when you want to start integrating with ephy and will try to sort out something, you are doing great work so far! :)</description>
		<content:encoded><![CDATA[<p>As for epiphany, you&#8217;ll find some limitations due to gecko, I think the best bet you can do is to hack the download manager of epiphany to hook to gget if it&#8217;s available/configured.<br />
For example:<br />
 &#8211; click on a link<br />
 &#8211; &#8220;where do you want to save this?&#8221;<br />
 + hook here and check if &#8220;Use gget to manage downloads&#8221; is checked in ephy config, if it is then run gget, otherwise just continue the normal code.</p>
<p>The trick would be with cookies and sessions, some downloads won&#8217;t work I think, I&#8217;m not really sure if you can fix that somehow. For example, the online-desktop uses firefox&#8217;s cookies, I think they have a mini python service for that, I can&#8217;t recall where it is though, but it&#8217;s a python script of like 100 lines, quite a hack. You could use it or take the idea from there.</p>
<p>Let me know when you want to start integrating with ephy and will try to sort out something, you are doing great work so far! <img src='http://blogs.gnome.org/johans/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: johans</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-29</link>
		<dc:creator>johans</dc:creator>
		<pubDate>Wed, 30 Jul 2008 22:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-29</guid>
		<description>Vudentz: Ah, that is much nicer indeed, thanks! One question though, what do you mean with &quot;return an error if fail&quot;, print something? Any reason not to use a Boolean there?</description>
		<content:encoded><![CDATA[<p>Vudentz: Ah, that is much nicer indeed, thanks! One question though, what do you mean with &#8220;return an error if fail&#8221;, print something? Any reason not to use a Boolean there?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anders Feder</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-28</link>
		<dc:creator>Anders Feder</dc:creator>
		<pubDate>Wed, 30 Jul 2008 22:29:23 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-28</guid>
		<description>David has a good point.

Another idea, which is probably beyond the scope of your GSoC work on the project, could be some of means of controlling the download (i.e. which portions of the file to download) as to allowing &#039;streaming&#039;. E.g. PDF have specific provisions to allow the reader to retrieve only the parts of a document which the user scrolls to. I&#039;m not familiar with the exact provisions, but it would be neat if e.g. Evince would open immediately when a PDF download is added to GGet and fetch only the necessary bits of the document through the GGet API.</description>
		<content:encoded><![CDATA[<p>David has a good point.</p>
<p>Another idea, which is probably beyond the scope of your GSoC work on the project, could be some of means of controlling the download (i.e. which portions of the file to download) as to allowing &#8217;streaming&#8217;. E.g. PDF have specific provisions to allow the reader to retrieve only the parts of a document which the user scrolls to. I&#8217;m not familiar with the exact provisions, but it would be neat if e.g. Evince would open immediately when a PDF download is added to GGet and fetch only the necessary bits of the document through the GGet API.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vudentz</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-27</link>
		<dc:creator>Vudentz</dc:creator>
		<pubDate>Wed, 30 Jul 2008 21:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-27</guid>
		<description>Please don&#039;t use any handle mechanism instead create object for each download, something like this:

[interface ???.DownloadManager]
Methods:
 - AddDownload(String uri, String path) -&gt; Download Object Path (generate the path based on the uri)
 - RemoveDonwload(String obj_path) -&gt; Void (return an error if it fails, it should automatically cancel the download if not completed yet)
 - ListDownloads() -&gt; Array of [Object paths]
Signals:
 - DownloadAdded(String obj_path)
 - DownloadRemoved(String obj_path)

[interface ???.Download]
Methods:
 - GetProperties() -&gt; dict of {String, Variant} (or even better use dbus interface for properties)
 - Pause() -&gt; Void (return an error if it fail)
 - Resume() -&gt; Void (return an error if it fail)
 - Cancel() -&gt; Void (return an error if it fail, do not destroy the object instead give it a status cancelated so one can call Resume and restart the download)
Signals:
 - PropertyChanged(String propname, Variant propvalue) (again dbus properties interface might be a good option here)

Another advice is not going with gobject+dbus-glib to develop the daemon, it is too much for too little, libgdbus should be enough (see obex-data-server X obexd).</description>
		<content:encoded><![CDATA[<p>Please don&#8217;t use any handle mechanism instead create object for each download, something like this:</p>
<p>[interface ???.DownloadManager]<br />
Methods:<br />
 &#8211; AddDownload(String uri, String path) -&gt; Download Object Path (generate the path based on the uri)<br />
 &#8211; RemoveDonwload(String obj_path) -&gt; Void (return an error if it fails, it should automatically cancel the download if not completed yet)<br />
 &#8211; ListDownloads() -&gt; Array of [Object paths]<br />
Signals:<br />
 &#8211; DownloadAdded(String obj_path)<br />
 &#8211; DownloadRemoved(String obj_path)</p>
<p>[interface ???.Download]<br />
Methods:<br />
 &#8211; GetProperties() -&gt; dict of {String, Variant} (or even better use dbus interface for properties)<br />
 &#8211; Pause() -&gt; Void (return an error if it fail)<br />
 &#8211; Resume() -&gt; Void (return an error if it fail)<br />
 &#8211; Cancel() -&gt; Void (return an error if it fail, do not destroy the object instead give it a status cancelated so one can call Resume and restart the download)<br />
Signals:<br />
 &#8211; PropertyChanged(String propname, Variant propvalue) (again dbus properties interface might be a good option here)</p>
<p>Another advice is not going with gobject+dbus-glib to develop the daemon, it is too much for too little, libgdbus should be enough (see obex-data-server X obexd).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/comment-page-1/#comment-26</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 30 Jul 2008 20:47:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/johans/2008/07/30/gget-dbus-interface/#comment-26</guid>
		<description>If it doesn&#039;t already get this from epiphany, it would probably be a good idea to give it some sort of mechanism for passing referrer URLs and cookies. Otherwise a fair sized chunk of downloads won&#039;t work :(</description>
		<content:encoded><![CDATA[<p>If it doesn&#8217;t already get this from epiphany, it would probably be a good idea to give it some sort of mechanism for passing referrer URLs and cookies. Otherwise a fair sized chunk of downloads won&#8217;t work <img src='http://blogs.gnome.org/johans/wp-content/mu-plugins/tango-smilies/tango/face-sad.png' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
