r26885 - trunk/freenet/src/freenet/node/fcp

[email protected] Thu, 16 Apr 2009 09:55:45 +0000
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: saces
Date: 2009-04-16 09:55:44 +0000 (Thu, 16 Apr 2009)
New Revision: 26885

Modified:
   trunk/freenet/src/freenet/node/fcp/PluginInfoMessage.java
Log:
Add a field "IsTalkable" to PluginInfo. This field is always present, even if restricted access.
FCP-clients are encouraged to use it, this makes client behavior a bit more future save

Modified: trunk/freenet/src/freenet/node/fcp/PluginInfoMessage.java
===================================================================
--- trunk/freenet/src/freenet/node/fcp/PluginInfoMessage.java	2009-04-16 09:23:19 UTC (rev 26884)
+++ trunk/freenet/src/freenet/node/fcp/PluginInfoMessage.java	2009-04-16 09:55:44 UTC (rev 26885)
@@ -24,6 +24,7 @@
 	private final String classname;
 	private final String originuri;
 	private final long started;
+	private final boolean isTalkable;
 
 	
 	PluginInfoMessage(PluginInfoWrapper pi, String identifier, boolean detail) {
@@ -32,6 +33,7 @@
 		classname = pi.getPluginClassName();
 		originuri = pi.getFilename();
 		started = pi.getStarted();
+		isTalkable = pi.isFCPPlugin();
 	}
 
 	@Override
@@ -40,6 +42,7 @@
 		if(identifier != null) // is optional on these two only
 			sfs.putSingle("Identifier", identifier);
 		sfs.putSingle("PluginName", classname);
+		sfs.put("IsTalkable", isTalkable);
 		
 		if (detailed) {
 			sfs.putSingle("OriginUri", originuri);
@@ -59,6 +62,7 @@
 		throw new MessageInvalidException(ProtocolErrorMessage.INVALID_MESSAGE, NAME + " goes from server to client not the other way around", null, false);
 	}
 
+	@Override
 	public void removeFrom(ObjectContainer container) {
 		container.delete(this);
 	}