DBus Iface RFC

Currently, the gsmartmix DBus iface are not stabilized/clean/standard at all.

Here is an attempt to define some cleaner interfaces.

There is no more Register/GetSinkList mechanism, GetProperties (beurk), SinkAdded/SinkRemoved signals and so on. This facilities are provided by DBus somehow (list of Queued Owners, Introspection.). The only issue I see is that there is no "Changed" signal to be notified when a property is changed (or when we would like to signal it).

<?xml version="1.0" encoding="UTF-8" ?>

<node name="/org/gnome/GSmartMix/AudioManager">
  <interface name="org.gnome.GSmartMix.AudioManager">
    <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gsmm_audio_manager"/>

    <method name="RequestState">
    <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="state" direction="in"/>
      <arg type="b" name="granted" direction="out"/>
    </method>

    <method name="RequestBackend">
    <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="s" name="backend" direction="out"/>
      <arg type="b" name="granted" direction="out"/>
    </method>

    <method name="RequestVolumeLevel">
    <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
      <arg type="d" name="volume_level" direction="in"/>
      <arg type="b" name="granted" direction="out"/>
    </method>
  </interface>
</node>

<node name="/org/gnome/GSmartMix/AudioSink">
  <interface name="org.gnome.GSmartMix.AudioSink">
    <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="gsmm_audio_sink"/>
    <!-- (would be good to have notify=yes) or annotation?  -->

    <!-- Application properties (should be move somewhere else!) -->
      <!-- uid can be get form the message bus api with name -->
      <property name="Prgname" type="s" access="read" />
      <property name="Version" type="s" access="read" />
      <property name="ApplicationName" type="s" access="read" />
      <property name="HostName" type="s" access="read" />
      <property name="CurrentTime" type="s" access="read" /> <!-- iso8601 -->
      <method name="Quit" />

    <!-- Sound output properties (backend is not simple, survival time is a trick) -->
      <property name="SlideTime" type="u" access="readwrite" />
      <property name="VolumeLevel" type="d" access="readwrite"/>
      <property name="Backend" type="s" access="readwrite"/>
      <property name="ClassName" type="s" access="readwrite"/>
      <property name="SurvivalTime" type="u" access="readwrite"/>

    <!-- playback interface (should be move and conform with the future common media player iface)-->
      <property name="State" type="s" access="readwrite"/>
      <property name="Position" type="u" access="readwrite"/>

  </interface>
</node>

Outreach/SummerOfCode/2006/GSmartMix/DBus (last edited 2013-12-03 23:47:02 by WilliamJonMcCann)