<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Christophe Nowicki &#187; D-BUS</title>
	<atom:link href="http://www.csquad.org/tag/d-bus/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.csquad.org</link>
	<description>Just for fun</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:42:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Introspection support for DBuzilla</title>
		<link>http://www.csquad.org/2006/08/29/introspection-support-for-dbuzilla/</link>
		<comments>http://www.csquad.org/2006/08/29/introspection-support-for-dbuzilla/#comments</comments>
		<pubDate>Tue, 29 Aug 2006 17:14:50 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[Mozilla Firefox]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=46</guid>
		<description><![CDATA[




I&#8217;ve added methods for parsing D-BUS Introspection Data. 
Now you can get informations about available  interfaces, methods, signals and properties with the nsIDBusInterface object.
In order to test my methods I wrote an dbus-viwer clone in XUL :  http://trac.csquad.org/browser/trunk/examples/dbus-viewer
Here is a screencast (1 Mo) where you can see dbus-viewer in action.




]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td><img src='/wp-content/dbus_viewer_xul.jpg' alt='' /></td>
<td valign="top">
<p>
I&#8217;ve added methods for parsing <a href="http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format">D-BUS Introspection Data</a>. </p>
<p>Now you can get informations about available  interfaces, methods, signals and properties with the nsIDBusInterface object.</p>
<p>In order to test my methods I wrote an dbus-viwer clone in XUL :  <a href="http://trac.csquad.org/browser/trunk/examples/dbus-viewer">http://trac.csquad.org/browser/trunk/examples/dbus-viewer</a></p>
<p><a href="/wp-content/screencast-dbus-viewer.gif">Here</a> is a screencast (1 Mo) where you can see dbus-viewer in action.
</p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/08/29/introspection-support-for-dbuzilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>D-BUS for Mozilla project progress #4</title>
		<link>http://www.csquad.org/2006/08/21/d-bus-for-mozilla-project-progress-4/</link>
		<comments>http://www.csquad.org/2006/08/21/d-bus-for-mozilla-project-progress-4/#comments</comments>
		<pubDate>Mon, 21 Aug 2006 05:54:47 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=44</guid>
		<description><![CDATA[Sorry, I did not update my progress since one month.
Here is my current progress on that project :

Signals are supported, you can send en receive signals
Introspection XML data is now parsed by my component
I&#8217;ve wrote an dbus-viewer clone in XUL
I&#8217;ve integrated Threads

But I did not release a 0.1 version because my wrapper produce  a [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry, I did not update my progress since one month.</p>
<p>Here is my current progress on that project :</p>
<ul>
<li>Signals are supported, you can send en receive signals</li>
<li>Introspection XML data is now parsed by my component</li>
<li>I&#8217;ve wrote an dbus-viewer clone in XUL</li>
<li>I&#8217;ve integrated Threads</li>
</ul>
<p>But I did not release a 0.1 version because my wrapper produce  a dead lock :<br />
If you listen for a signal and call a remote method, you program get locked.<br />
This is a common usage of D-BUS and I think that I can&#8217;t release my work without it.</p>
<p>This problem is caused by libdbus witch is not threads &#8220;aware&#8221; and because I don&#8217;t have a shared<br />
lock between my threads.</p>
<p>Havoc Pennington explained me howto solve this issue : integrate libdbus inside my mainloop as glib as done :</p>
<p><a href="http://webcvs.freedesktop.org/dbus/dbus/dbus/dbus-mainloop.c?content-type=text%2Fplain&#038;view=co">GLIB Mainloop integration</a></p>
<p>This integration is hard because D-BUS is using UNIX file handle and NSPR does not provide functions to handle it.</p>
<p>I did not expect so many technical difficulties, but I stay motivated.<br />
I continue to work on my project (after the end of the summer of code) and I will release version 0.1 as soon as the dead lock issue is solved.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/08/21/d-bus-for-mozilla-project-progress-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>D-BUS for Mozilla : version 0.1 is comming &#8230;  soon!</title>
		<link>http://www.csquad.org/2006/07/18/d-bus-for-mozilla-version-01-is-comming-soon/</link>
		<comments>http://www.csquad.org/2006/07/18/d-bus-for-mozilla-version-01-is-comming-soon/#comments</comments>
		<pubDate>Tue, 18 Jul 2006 10:00:39 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=42</guid>
		<description><![CDATA[Ok, boys and girls, version 0.1 is comming! ;0)
This week I was focused on documentation :

I&#8217;ve started the initial draft of the DBuzilla Tutorial, the goal of this document is to quickly explain howto use the API. I&#8217;am inspred by  Matthew Johnson&#8217;s &#8220;Using the DBUS C API&#8221; article,  which I found  very [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, boys and girls, version 0.1 is comming! ;0)</p>
<p>This week I was focused on documentation :</p>
<ul>
<li>I&#8217;ve started the initial draft of the <a href="http://svn.csquad.org/dbuzilla/trunk/doc/tutorial.html">DBuzilla Tutorial</a>, the goal of this document is to quickly explain howto use the API. I&#8217;am inspred by  <a href="http://www.matthew.ath.cx/misc/dbus">Matthew Johnson&#8217;s &#8220;Using the DBUS C API&#8221;</a> article,  which I found  very clear. </li>
<li>Updated the <a href="http://trac.csquad.org/file/trunk/doc/class%20diagram.png">API Class diagram</a>.</li>
<li>Setup <a href="http://trac.csquad.org/lxr">LXR</a>  for API reference.</li>
<li>Update the <a href="http://trac.csquad.org/wiki">Wiki</a>.
</li>
</ul>
<p>I&#8217;ve made progress in the wrapper code :</p>
<ul>
<li>Mixed array are now supported :  Array(1, &#8217;string&#8217;, 2.3)</li>
<li>Threads are now wrapped.</li>
<li>Callback are now handled, but not fully : It&#8217;s working for the XPCOM part but D-BUS does not call my handle back.</li>
</ul>
<p>I will release version 0.1 when I find an issue to the callback problems. (I&#8217;d like to see asynchronous call and signals managed by 0.1).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/07/18/d-bus-for-mozilla-version-01-is-comming-soon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>D-BUS for Mozilla project progress #3</title>
		<link>http://www.csquad.org/2006/07/10/d-bus-for-mozilla-project-progress-3/</link>
		<comments>http://www.csquad.org/2006/07/10/d-bus-for-mozilla-project-progress-3/#comments</comments>
		<pubDate>Mon, 10 Jul 2006 07:51:25 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=41</guid>
		<description><![CDATA[






Here is my current progress on my project :


All basic arguments are supported, you can call a method with as many arguments as you want :

    ret = iface.callWithArguments("MethodName", ['arg1', 42, 43.1], 3)


Array support is limited to basic array (without mixed type)

// var arg = new Array(1, 'string', 2.3) // does not [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>
<img src='/wp-content/20060710dbus_moz.jpg' alt='' />
</td>
<td valign="top">
<p>
Here is my current progress on my project :</p>
<ul>
</ul>
<li>All basic arguments are supported, you can call a method with as many arguments as you want :
<pre>
    ret = iface.callWithArguments("MethodName", ['arg1', 42, 43.1], 3)
</pre>
</li>
<li>Array support is limited to basic array (without mixed type)
<pre>
// var arg = new Array(1, 'string', 2.3) // does not work yet
var arg = new Array(1, 2, 3)
ret = iface.callWithArguments("MethodName", [arg], 1)
</pre>
</li>
<li>I&#8217;ve started working on callback fonctions for asynchronous call and signals, but without sucess.</li>
<li>Exception are now supported
<pre>
try {
   ret = iface.call("SomethingGoesWrong")
} catch (e) {
   e.name // error name, ex: org.freedesktop.DBus.Python.dbus.exceptions.UnknownMethodException
   e.message // error details, ex: SomethingGoesWrong is not a valid method of interface...
}
</pre>
<p>It&#8217;s working, but I thing that a more precise exception handling system is needed.
</li>
</p>
<p>
I continue to work on : </p>
<ul>
<li>callback and signals</li>
<li>documentation</li>
</ul>
<p>I will release version 0.1 next week.
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/07/10/d-bus-for-mozilla-project-progress-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>D-BUS for Mozilla project progress #2</title>
		<link>http://www.csquad.org/2006/07/02/d-bus-for-mozilla-project-progress-2/</link>
		<comments>http://www.csquad.org/2006/07/02/d-bus-for-mozilla-project-progress-2/#comments</comments>
		<pubDate>Sun, 02 Jul 2006 19:17:09 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=40</guid>
		<description><![CDATA[






Another point on my progress on the D-BUS for Mozilla projet.
Now I&#8217;am able to return any basic type form D-BUS method call and I&#8217;ve started to work on returning Arrays and Dictionaries.
The next step before the release of version 0.1 (full featured D-BUS client) will be :

Method Arguments handling
Error handling with exception

I&#8217;ve planned this release [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>
<img src='/wp-content/dbus_moz_progress.jpg' alt='' />
</td>
<td valign="top">
<p>
Another point on my progress on the D-BUS for Mozilla projet.<br />
Now I&#8217;am able to return any basic type form D-BUS method call and I&#8217;ve started to work on returning Arrays and Dictionaries.<br />
The next step before the release of version 0.1 (full featured D-BUS client) will be :</p>
<ul>
<li>Method Arguments handling</li>
<li>Error handling with exception</li>
</ul>
<p>I&#8217;ve planned this release in two weeks, soon ! ;0)
</p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/07/02/d-bus-for-mozilla-project-progress-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>D-BUS for Mozilla project progress</title>
		<link>http://www.csquad.org/2006/06/28/d-bus-for-mozilla-project-progress/</link>
		<comments>http://www.csquad.org/2006/06/28/d-bus-for-mozilla-project-progress/#comments</comments>
		<pubDate>Wed, 28 Jun 2006 08:23:56 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=39</guid>
		<description><![CDATA[My current progress on the project  is  disappointing, I am blocked on the value returned by an method call.
I can make a basic D-BUS method call from Javascript, but I&#8217;am unable to get his return value.
Here is the sample of code :

var comp = Components.classes[nsDBUSContactID];
var dbus = comp.createInstance();
var session = dbus.SessionBus();
var iface = [...]]]></description>
			<content:encoded><![CDATA[<p>My current progress on the project  is  disappointing, I am blocked on the value returned by an method call.<br />
I can make a basic D-BUS method call from Javascript, but I&#8217;am unable to get his return value.<br />
Here is the sample of code :</p>
<pre>
var comp = Components.classes[nsDBUSContactID];
var dbus = comp.createInstance();
var session = dbus.SessionBus();
var iface = session.FindInterface('org.mozilla.TestService', '/',  'org.mozilla.TestInterface')
var ret = iface.Call('Hello')
dump('return value = ' . ret )
</pre>
<p>The &#8216;ret&#8217; value can be of any kind of type (string, int, array, object, etc&#8230;).<br />
I&#8217;ve found the javascript code for managing any type of return value from an XPCOM method, in the mozilla xml-rpc extension :</p>
<pre>
/* Create an instance of the given ContractID, with given interface */
function createInstance(contractId, intf) {
    return Components.classes[contractId].createInstance(Components.interfaces[intf])
}

/* return type */
function testReturn(type) {
    const SUPPORTSID = '@mozilla.org/supports-';
    var ret
    switch(type) {
        case 'INT32':
            ret = createInstance(SUPPORTSID + 'PRInt32;1',
                'nsISupportsPRInt32')
            ret.data = 65
            break
        case 'STRING':
            ret = createInstance(SUPPORTSID + 'cstring;1',
                'nsISupportsCString')
            ret.data = 'arf'
            break
        case 'DOUBLE':
            ret = createInstance(SUPPORTSID + 'double;1',
                'nsISupportsDouble')
            ret.data = 2.4
            break
       ....
    }
    return ret;
}
</pre>
<p>I&#8217;ve wrote the C++ version of this code, but It does not work :<br />
XPIDL prototype of my method :</p>
<pre>nsISupports Test();</pre>
<p>The C++ implementation :</p>
<pre>
NS_IMETHODIMP
nsDBusImpl::TestSupports(nsISupports **_retval) {
    nsresult rv;
    nsCOMPtr<nsisupportsprint32> ret =
        do_CreateInstance("@mozilla.org/supports-PRInt32;1", &#038;rv);
    if (NS_FAILED(rv)) {
        return rv;
    }
    ret->SetData(42);
    // _retval = (nsISupports **) &ret; // Does not work
    // *_retval = ret;  // Segfault

    return NS_OK;
}
</nsisupportsprint32></pre>
<p>I&#8217;am stopped by this problem &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/06/28/d-bus-for-mozilla-project-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dbus-daemon, how to listen on TCP/IP socket?</title>
		<link>http://www.csquad.org/2006/05/26/dbus-daemon-how-to-listen-on-tcpip-socket/</link>
		<comments>http://www.csquad.org/2006/05/26/dbus-daemon-how-to-listen-on-tcpip-socket/#comments</comments>
		<pubDate>Fri, 26 May 2006 10:18:21 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Network]]></category>
		<category><![CDATA[D-BUS]]></category>

		<guid isPermaLink="false">http://www.csquad.org/?p=37</guid>
		<description><![CDATA[This feature is not well documented, so there is the configuration ligne to add in your /etc/dbus-1/system.conf file :

&#60;listen&#62;tcp:host=localhost,port=12434&#60;/listen&#62;

]]></description>
			<content:encoded><![CDATA[<p>This feature is not well documented, so there is the configuration ligne to add in your <em>/etc/dbus-1/system.conf</em> file :<br />
<quote><br />
&lt;listen&gt;tcp:host=localhost,port=12434&lt;/listen&gt;<br />
</quote></p>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/05/26/dbus-daemon-how-to-listen-on-tcpip-socket/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>D-BUS for Mozilla project started</title>
		<link>http://www.csquad.org/2006/05/24/d-bus-for-mozilla-project-started/</link>
		<comments>http://www.csquad.org/2006/05/24/d-bus-for-mozilla-project-started/#comments</comments>
		<pubDate>Wed, 24 May 2006 19:37:54 +0000</pubDate>
		<dc:creator>cscm</dc:creator>
				<category><![CDATA[Google Summer of Code]]></category>
		<category><![CDATA[Mozilla Firefox]]></category>
		<category><![CDATA[D-BUS]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.csquad.org/2006/05/24/d-bus-for-mozilla-project-started/</guid>
		<description><![CDATA[





I&#8217;ve setup an software developement platform with Trac for the D-BUS for Mozilla project :

Trac &#8211; http://trac.csquad.org/
Subversion Repository &#8211;  http://svn.csquad.org/dbuzilla/




]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>
<img src='/wp-content/dbuzilla.png' alt='D-BUS for Mozilla' />
</td>
<td valign='top'>
I&#8217;ve setup an software developement platform with <a href="http://www.edgewall.com/trac/">Trac</a> for the D-BUS for Mozilla project :</p>
<ul>
<li>Trac &#8211; <a href="http://trac.csquad.org/">http://trac.csquad.org/</a></li>
<li>Subversion Repository &#8211;  <a href="http://svn.csquad.org/dbuzilla/">http://svn.csquad.org/dbuzilla/</a></li>
</ul>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.csquad.org/2006/05/24/d-bus-for-mozilla-project-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
