odeviced: Progress report

Sudharshan S sudharsh at gmail.com
Wed May 28 12:49:06 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Guillaume Chereau wrote:
> 
> - the xml dbus introspection files. They are in the format described by
> the d-bus introspection interface specification. I think those files are
> actually not needed.
> You can use it to generate a C code skeleton, but since you use vala you
> don't need that indeed. The thing I am not sure is if this file is used
> by the dbus daemon (like : all the interface files have to be installed
> on a specific location on the computer and the daemon can check that the
> call you make to a d-bus service are coherent.)
> Those file can be generated from the xml.in file.
>

With dbus-send and the Introspect inteface we can have this xml
representation on the shell. So coming up with the introspection data in
xml format is pretty trivial.

- ----------------------------------------------------------------
sudharsh at loki ~ $ dbus-send --system --print-reply
- --dest=org.freesmartphone.Device  /org/freesmartphone/Device
org.freedesktop.DBus.Introspectable.Introspect

method return sender=:1.1983 -> dest=:1.1990 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object
Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
  <interface name="org.freedesktop.DBus.Introspectable">
    <method name="Introspect">
      <arg name="data" direction="out" type="s"/>
    </method>
  </interface>
  <interface name="org.freedesktop.DBus.Properties">
    <method name="Get">
      <arg name="interface" direction="in" type="s"/>
      <arg name="propname" direction="in" type="s"/>
      <arg name="value" direction="out" type="v"/>
    </method>
    <method name="Set">
      <arg name="interface" direction="in" type="s"/>
      <arg name="propname" direction="in" type="s"/>
      <arg name="value" direction="in" type="v"/>
    </method>
  </interface>
  <interface name="org.freesmartphone.Device">
    <method name="run">
    </method>
    <method name="get_device_name">
      <arg name="result" type="s" direction="out"/>
    </method>
    <method name="load">
      <arg name="plugin_name" type="s" direction="in"/>
      <arg name="result" type="b" direction="out"/>
    </method>
    <property name="conn" type="" access="readwrite"/>
    </property>
  </interface>
  <node name="plugins"/>
</node>
"
- ----------------------------------------------------------------
So we just need to search for the required interface and can build upon
it backwards. (:

> - Then we also have docbook format file (it is also xml.) Those files
> are generated from the xml.in files, using a xsl file :
> The xsl file has some information at the beginning :
> <!--
>      Convert D-Bus Glib xml into DocBook refentries
>      Copyright (C) 2007 William Jon McCann
>                    2008 Harald Welte
>      License: GPL
> -->
> 

Thanks. I need to read a bit about docbook.

Regards
Sudharshan S
Blog : http://www.sudharsh.wordpress.com
IRC  : Sup3rkiddo @ freenode

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg9OKEACgkQSsRjJNRMc4lkxwCghSCERmaOC4El+kB8GQ6VqfAP
cywAn0Tnhg8qrTT6gxr9EEIDOUJOsRmF
=RXhc
-----END PGP SIGNATURE-----



More information about the smartphones-standards mailing list