From aa4c648ca76e84517717a6323fa2d8ddf48c24fc Mon Sep 17 00:00:00 2001 From: Maciek Borzecki Date: Sun, 18 Jan 2015 14:02:52 +0100 Subject: [PATCH] core: add packet handlers store --- src/core.vala | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core.vala b/src/core.vala index 90f6a60..abed94c 100644 --- a/src/core.vala +++ b/src/core.vala @@ -23,11 +23,12 @@ class Core : Object { public Crypt crypt { get; private set; default = null; } + public PacketHandlers handlers {get; private set; default = null; } + private static Core _instance = null; - private Core(Crypt crypt) { + private Core() { debug("init core"); - this.crypt = crypt; } public static Core? instance() { @@ -35,7 +36,13 @@ class Core : Object { { var crypt = new Crypt.for_key_path("private.pem"); - var core = new Core(crypt); + var core = new Core(); + var handlers = new PacketHandlers(); + core.crypt = crypt; + core.handlers = handlers; + + info("supported interfaces: %s", string.joinv(", ", + handlers.interfaces)); Core._instance = core; }