diff options
Diffstat (limited to 'src/notifd.vala')
-rw-r--r-- | src/notifd.vala | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/notifd.vala b/src/notifd.vala index f967421..45e5eb0 100644 --- a/src/notifd.vala +++ b/src/notifd.vala @@ -1,10 +1,17 @@ namespace AstalNotifd { -public enum ActiveType { - DAEMON, - PROXY, +public Notifd get_default() { + return Notifd.get_default(); } public class Notifd : Object { + private static Notifd _instance; + public static Notifd get_default() { + if (_instance == null) + _instance = new Notifd(); + + return _instance; + } + private Daemon daemon; private DaemonProxy proxy; @@ -98,4 +105,9 @@ public class Notifd : Object { }); } } + +public enum ActiveType { + DAEMON, + PROXY, +} } |