From: David ‘Bombe’ Roden Date: Mon, 11 Apr 2011 07:15:50 +0000 (+0200) Subject: Add FCP interface to core. X-Git-Tag: 0.6.5^2~39^2~18 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=61c3cded8e718b52715407251dee146da0452ac9 Add FCP interface to core. --- diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index 75b108b..c5f5564 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -37,6 +37,7 @@ import net.pterodactylus.sone.data.Profile; import net.pterodactylus.sone.data.Profile.Field; import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; +import net.pterodactylus.sone.fcp.FcpInterface; import net.pterodactylus.sone.freenet.wot.Identity; import net.pterodactylus.sone.freenet.wot.IdentityListener; import net.pterodactylus.sone.freenet.wot.IdentityManager; @@ -109,6 +110,9 @@ public class Core implements IdentityListener, UpdateListener { /** The update checker. */ private final UpdateChecker updateChecker; + /** The FCP interface. */ + private volatile FcpInterface fcpInterface; + /** Whether the core has been stopped. */ private volatile boolean stopped; @@ -251,6 +255,16 @@ public class Core implements IdentityListener, UpdateListener { } /** + * Sets the FCP interface to use. + * + * @param fcpInterface + * The FCP interface to use + */ + public void setFcpInterface(FcpInterface fcpInterface) { + this.fcpInterface = fcpInterface; + } + + /** * Returns the status of the given Sone. * * @param sone diff --git a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java index 0a28656..47e6d33 100644 --- a/src/main/java/net/pterodactylus/sone/main/SonePlugin.java +++ b/src/main/java/net/pterodactylus/sone/main/SonePlugin.java @@ -194,6 +194,7 @@ public class SonePlugin implements FredPlugin, FredPluginFCP, FredPluginL10n, Fr /* create FCP interface. */ fcpInterface = new FcpInterface(core); + core.setFcpInterface(fcpInterface); /* create the identity manager. */ identityManager.addIdentityListener(core);