diff --git a/src/mconnect/application.vala b/src/mconnect/application.vala index bde4d52..bf696ce 100644 --- a/src/mconnect/application.vala +++ b/src/mconnect/application.vala @@ -38,6 +38,8 @@ namespace Mconn { private Discovery discovery = null; private DeviceManager manager = null; private DeviceManagerDBusProxy bus_manager = null; + private TransferManager transfer = null; + private TransferManagerDBusProxy bus_transfer = null; public Application() { Object(application_id: "org.mconnect"); @@ -45,6 +47,7 @@ namespace Mconn { discovery = new Discovery(); manager = new DeviceManager(); + transfer = new TransferManager(); } protected override void startup() { @@ -62,6 +65,8 @@ namespace Mconn { if (core == null) error("cannot initialize core"); + core.transfer_manager = this.transfer; + if (core.config.is_debug_on() == true) Environment.set_variable("G_MESSAGES_DEBUG", "all", false); @@ -91,6 +96,11 @@ namespace Mconn { this.bus_manager = new DeviceManagerDBusProxy.with_manager(conn, this.manager); this.bus_manager.publish(); + + this.bus_transfer = new TransferManagerDBusProxy.with_manager(conn, + this.transfer); + this.bus_transfer.publish(); + base.dbus_register(conn, object_path); debug("dbus register, path %s", object_path); diff --git a/src/mconnect/core.vala b/src/mconnect/core.vala index 024cbc9..07df9af 100644 --- a/src/mconnect/core.vala +++ b/src/mconnect/core.vala @@ -29,6 +29,8 @@ class Core : Object { public Config config { get; private set; default = null; } + public TransferManager transfer_manager { get; set; default = null; } + private static Core _instance = null; private Core() { @@ -118,5 +120,4 @@ class Core : Object { return config; } - } \ No newline at end of file