I'm thinking about replacing the current config file format, which is based on ConfigObj, by an xml file.

Reasons:

  • I'm unhappy with the format for the plugins, too many [[[s, especially as we have to support more than one icon
  • the config file will be created via the html interface anyway in some future
  • we need to instantiate plugins with the same backend, e.g. two backends using the FSStore. That's not possible with the old configuration.
  • another dependency removed

Things I'm uncertain about:

  • how to de-/activate subsystem logging and level override
  • plugin de-/activation, in the old config file one could just comment something in or out, now I need that active attribute, or remove it completely or wrap it into an xml comment
  • same with the global nodes like <interface>

PS: This should have little to none impact to places where Coherence is called as a module and the configuration is passed as a dict.

<config>
    <serverport>30020</serverport>
    <interface active="no">eth0</interface>
    <controlpoint>yes</controlpoint>
    <web-ui>no</web-ui>
    <use_dbus>no</use_dbus>

    <plugin active="yes">
        <name>Coherence Test Content</name>
        <backend>FSStore</backend>
        <content>tests/content</content>
        <icon>
            <mimetype>image/png</mimetype>
            <width>120</width>
            <height>106</height>
            <depth>24</depth>
            <url>.face</url>
        </icon>
    </plugin>

    <plugin active="yes">
        <name>GStreamer Audio Player</name>
        <backend>GStreamerPlayer</backend>
    </plugin>

    <plugin active="no">
        <name>Elisa</name>
        <backend>ElisaPlayer</backend>
        <host>localhost</host>
    </plugin>

    <plugin active="yes">
        <name>iRadio</name>
        <backend>IRadioStore</backend>
    </plugin>

    <plugin active="yes">
        <name>Flickr Images</name>
        <backend>FlickrStore</backend>
        <refresh>60</refresh>
        <proxy>yes</proxy>
        <icon>
            <mimetype>image/png</mimetype>
            <width>98</width>
            <height>26</height>
            <depth>24</depth>
            <url>flickr-icon.png</url>
        </icon>
    </plugin>

    <plugin active="no">
        <name>Coherence MediaStore</name>
        <backend>MediaStore</backend>
        <medialocation>/data/audio/music</medialocation>
        <coverlocation>/data/audio/covers</coverlocation>
        <mediadb>/tmp/media.db</mediadb>
        <icon>
            <mimetype>image/png</mimetype>
            <width>120</width>
            <height>106</height>
            <depth>24</depth>
            <url>coherence-icon.png</url>
        </icon>
    </plugin>

    <plugin active="no">
        <name>Elisa is watching you</name>
        <backend>AxisCamStore</backend>
        <cam>
            <name>Cam 1</name>
            <url>http://192.168.1.222:554/mpeg4/1/media.amp</url>
            <protocol>rtsp-rtp-udp:*:video/MP4V-ES:*</protocol>
        </cam>
        <cam>
            <name>Cam 2</name>
            <url>http://192.168.1.222:554/mpeg4/2/media.amp</url>
            <protocol>rtsp-rtp-udp:*:video/MP4V-ES:*</protocol>
        </cam>
    </plugin>

    <plugin active="no">
        <name>Buzztard Media</name>
        <backend>BuzztardStore</backend>
        <host>localhost</host>
        <port>7654</port>
    </plugin>

    <plugin active="no">
        <name>Buzztard Player</name>
        <backend>BuzztardPlayer</backend>
        <host>localhost</host>
        <port>7654</port>
    </plugin>

    <logging level="warning" >
        <logfile  active="no">coherence.log</logfile>

        <!-- Coherence Core -->
        <subsystem name="coherence" level="info" active="no" />
        <subsystem name="webserver" level="info" active="no" />

        <!-- DBus service -->
        <subsystem name="dbus" level="info" active="no" />

        <!-- WebUI -->
        <subsystem name="webui" level="info" active="no" />
        <subsystem name="webui_menu_fragment" level="info" active="no" />
        <subsystem name="webui_device_fragment" level="info" active="no" />
        <subsystem name="webui_logging_fragment" level="info" active="no" />
           
        <!-- SSDP/MSEARCH - discovery and notification -->
        <subsystem name="ssdp" level="info" active="no" />
        <subsystem name="msearch" level="info" active="no" />
        <!-- device class-->
        <subsystem name="device" level="info" active="no" />
        <!-- service classes for servers and clients -->
        <subsystem name="service_server" level="info" active="no" />
        <subsystem name="service_client" level="info" active="no" />

        <!-- UPnP actions -->
        <subsystem name="action" level="info" active="no" />

        <!-- UPnP StateVariables -->
        <subsystem name="variable" level="info" active="no" />

        <!-- UPnP Eventing -->
        <subsystem name="event_server" level="info" active="no" />
        <subsystem name="event_subscription_server" level="info" active="no" />
        <subsystem name="event_protocol" level="info" active="no" />

        <!-- UPnP Action related SOAP calls -->
        <subsystem name="soap" level="info" active="yes" />
        <!-- UPnP A/V MediaServer -->
        <subsystem name="mediaserver" level="info" active="no" />
        <!-- UPnP A/V MediaRenderer -->
        <subsystem name="mediarenderer" level="info" active="no" />
        <!-- UPnP A/V ControlPoint -->
        <subsystem name="controlpoint" level="info" active="no" />

        <!-- UPnP A/V MediaServer ConnectionManager service-->
        <subsystem name="connection_manager_server" level="info" active="no" />
        <!-- UPnP A/V MediaServer ContentDirectory service-->
        <subsystem name="content_directory_server" level="info" active="no" />

        <!-- client for UPnP A/V MediaServer -->
        <subsystem name="ms_client" level="info" active="no" />
        <!-- client for UPnP A/V MediaRenderer -->
        <subsystem name="mr_client" level="info" active="no" />

        <!-- filesystem based backend -->
        <subsystem name="fs_store" level="info" active="no" />
        <subsystem name="fs_item" level="info" active="no" />

        <!-- Elisa MediaRenderer backend -->
        <subsystem name="elisa_player" level="info" active="no" />
        <!-- GStreamer MediaRenderer backend -->
        <subsystem name="gstreamer_player" level="info" active="no" />

        <!-- Shoutcast Internet Radio MediaServer backend -->
        <subsystem name="iradio_store" level="info" active="no" />
        <subsystem name="iradio_item" level="info" active="no" />

        <!-- Axis Cam MediaServer backend -->
        <subsystem name="axis_cam_store" level="info" active="no" />
        <subsystem name="axis_cam_item" level="info" active="no" />

        <!-- Flickr MediaServer backend -->
        <subsystem name="flickr_storage" level="info" active="no" />

        <!-- Buzztard Controller (MediaServer/MediaRenderer) backend -->
        <subsystem name="buzztard_client" level="info" active="no" />
        <subsystem name="buzztard_factory" level="info" active="no" />
        <subsystem name="buzztard_connection" level="info" active="no" />
        <subsystem name="buzztard_item" level="info" active="no" />
        <subsystem name="buzztard_store" level="info" active="no" />
        <subsystem name="buzztard_player" level="info" active="no" />

    </logging>

</config>