Browse Source

core: add packet handlers store

bboozzoo/device-cache
Maciek Borzecki 10 years ago
parent
commit
aa4c648ca7
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      src/core.vala

+ 10
- 3
src/core.vala View File

@ -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;
}


Loading…
Cancel
Save