From: David ‘Bombe’ Roden Date: Wed, 22 Jul 2009 06:11:10 +0000 (+0200) Subject: Implement the “ReceivedBookmarkFeed” message. X-Git-Tag: v0.1.1~18 X-Git-Url: https://git.pterodactylus.net/?p=jFCPlib.git;a=commitdiff_plain;h=4d849ec50a85129aa5259be84f4ffb3dbdd579e4 Implement the “ReceivedBookmarkFeed” message. --- diff --git a/src/net/pterodactylus/fcp/FcpAdapter.java b/src/net/pterodactylus/fcp/FcpAdapter.java index ae32e62..09ff696 100644 --- a/src/net/pterodactylus/fcp/FcpAdapter.java +++ b/src/net/pterodactylus/fcp/FcpAdapter.java @@ -278,6 +278,13 @@ public class FcpAdapter implements FcpListener { /** * {@inheritDoc} */ + public void receivedBookmarkFeed(FcpConnection fcpConnection, ReceivedBookmarkFeed receivedBookmarkFeed) { + /* empty. */ + } + + /** + * {@inheritDoc} + */ public void receivedMessage(FcpConnection fcpConnection, FcpMessage fcpMessage) { /* empty. */ } diff --git a/src/net/pterodactylus/fcp/FcpConnection.java b/src/net/pterodactylus/fcp/FcpConnection.java index 3329063..d4271a5 100644 --- a/src/net/pterodactylus/fcp/FcpConnection.java +++ b/src/net/pterodactylus/fcp/FcpConnection.java @@ -309,6 +309,8 @@ public class FcpConnection implements Closeable { fcpListenerManager.fireReceivedNodeHello(new NodeHello(fcpMessage)); } else if ("CloseConnectionDuplicateClientName".equals(messageName)) { fcpListenerManager.fireReceivedCloseConnectionDuplicateClientName(new CloseConnectionDuplicateClientName(fcpMessage)); + } else if ("ReceivedBookmarkFeed".equals(messageName)) { + fcpListenerManager.fireReceivedBookmarkFeed(new ReceivedBookmarkFeed(fcpMessage)); } else { fcpListenerManager.fireMessageReceived(fcpMessage); } diff --git a/src/net/pterodactylus/fcp/FcpListener.java b/src/net/pterodactylus/fcp/FcpListener.java index 20b4d9b..151fcfe 100644 --- a/src/net/pterodactylus/fcp/FcpListener.java +++ b/src/net/pterodactylus/fcp/FcpListener.java @@ -372,6 +372,16 @@ public interface FcpListener extends EventListener { public void receivedPutFetchable(FcpConnection fcpConnection, PutFetchable putFetchable); /** + * Notifies a listener that a bookmark was updated. + * + * @param fcpConnection + * The connection that received the message + * @param receivedBookmarkFeed + * The “ReceivedBookmarkFeed” message + */ + public void receivedBookmarkFeed(FcpConnection fcpConnection, ReceivedBookmarkFeed receivedBookmarkFeed); + + /** * Notifies a listener that a “ProtocolError” was received. * * @param fcpConnection diff --git a/src/net/pterodactylus/fcp/FcpListenerManager.java b/src/net/pterodactylus/fcp/FcpListenerManager.java index 1a8a13c..f2d8133 100644 --- a/src/net/pterodactylus/fcp/FcpListenerManager.java +++ b/src/net/pterodactylus/fcp/FcpListenerManager.java @@ -512,6 +512,21 @@ public class FcpListenerManager extends AbstractListenerManager