private ContextManager manager;
protected Rygel.Plugin plugin { get; protected set; }
+ public string title { construct; protected get; }
+ public PluginCapabilities capabilities { construct; protected get; }
- public MediaDevice () {
+ public override void constructed () {
this.manager = ContextManager.create (0);
this.manager.context_available.connect (this.on_context_available);
this.manager.context_unavailable.connect (this.on_context_unavailable);
* @param title Friendly name of the new UPnP renderer on the network.
*/
public Renderer (string title) {
- base ();
+ Object (title: title);
+ }
+
+ public override void constructed () {
+ base.constructed ();
+
this.plugin = new Plugin ();
- this.prepare_upnp (title);
+ this.prepare_upnp (this.title);
}
/**
* <link linkend="implementing-renderers">Implementing Renderers</link> section.
*/
public class Rygel.MediaRenderer : MediaDevice {
+ public unowned MediaPlayer player { construct; private get; }
/**
* Create a RygelMediaRenderer to render content via a RygelMediaPlayer.
MediaPlayer player,
PluginCapabilities capabilities =
PluginCapabilities.NONE) {
- base ();
- this.plugin = new global::Plugin (player, capabilities);
- this.plugin.title = title;
+ Object (title: title,
+ player: player,
+ capabilities: capabilities);
+ }
+
+ public override void constructed () {
+ base.constructed ();
+
+ this.plugin = new global::Plugin (this.player, this.capabilities);
+ this.plugin.title = this.title;
}
}
* <link linkend="implementing-servers">Implementing Servers</link> section.
*/
public class Rygel.MediaServer : MediaDevice {
+ public unowned MediaContainer root_container { construct; private get; }
/**
* Create a MediaServer to serve the media in the RygelMediaContainer.
MediaContainer root_container,
PluginCapabilities capabilities =
PluginCapabilities.NONE) {
- base ();
- this.plugin = new global::Plugin (root_container, capabilities);
- this.plugin.title = title;
+ Object (title: title,
+ root_container : root_container,
+ capabilities: capabilities);
+ }
+
+ public override void constructed () {
+ base.constructed ();
+
+ this.plugin = new global::Plugin (this.root_container,
+ this.capabilities);
+ this.plugin.title = this.title;
}
}