diff options
author | Jens Georg <jensg@openismus.com> | 2012-12-06 23:11:05 +0100 |
---|---|---|
committer | Jens Georg <jensg@openismus.com> | 2013-01-22 15:10:08 +0100 |
commit | 1c229883eb66696c0496a38bdaffbd4eac32f5b4 (patch) | |
tree | 0262aafe10f4727a2ea0e7f3f7531dd6b04d59ec /src/librygel-core | |
parent | 3e7d20bf1f556a81ad58985a3c2c03410ee82908 (diff) | |
download | rygel-1c229883eb66696c0496a38bdaffbd4eac32f5b4.tar.gz |
all: Plugin to GObject-style construct
Diffstat (limited to 'src/librygel-core')
-rw-r--r-- | src/librygel-core/rygel-plugin.vala | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/librygel-core/rygel-plugin.vala b/src/librygel-core/rygel-plugin.vala index 072b1496..94adb31d 100644 --- a/src/librygel-core/rygel-plugin.vala +++ b/src/librygel-core/rygel-plugin.vala @@ -91,14 +91,14 @@ public class Rygel.Plugin : GUPnP.ResourceFactory { private static const int ICON_SMALL_WIDTH = 48; private static const int ICON_SMALL_HEIGHT = 48; - public PluginCapabilities capabilities { get; protected set; } + public PluginCapabilities capabilities { get; construct set; } - public string name { get; private set; } - public string title { get; set; } - public string description { get; private set; } + public string name { get; construct; } + public string title { get; construct set; } + public string description { get; construct; } // Path to description document - public string desc_path { get; private set; } + public string desc_path { get; construct; } public bool active { get; set; } @@ -126,16 +126,20 @@ public class Rygel.Plugin : GUPnP.ResourceFactory { string? title, string? description = null, PluginCapabilities capabilities = PluginCapabilities.NONE) { - this.desc_path = desc_path; - this.name = name; - this.title = title; - this.description = description; - this.capabilities = capabilities; + Object (desc_path : desc_path, + name : name, + title : title, + description : description, + capabilities : capabilities); + } + + public override void constructed () { + base.constructed (); this.active = true; - if (title == null) { - this.title = name; + if (this.title == null) { + this.title = this.name; } this.resource_infos = new ArrayList<ResourceInfo> (); |