package plugins.CENO;

import freenet.pluginmanager.FredPluginRealVersioned;
import freenet.pluginmanager.FredPluginVersioned;

public class Version implements FredPluginVersioned, FredPluginRealVersioned {

	// Versions of the plugins, in human-readable and "real" format
	public static final String CLIENT_VERSION = "0.3.1";
	public static final int CLIENT_REAL_VERSION = 8;

	public static final String BRIDGE_VERSION = "0.3.1";
	public static final int BRIDGE_REAL_VERSION = 6;

	public static final String BACKBONE_VERSION = "0.1.0";
	public static final int BACKBONE_REAL_VERSION = 1;

	/** Revision number of Version.java as read from CVS */
	public static final String cvsRevision = "@custom@";

	public enum PluginType { CLIENT, BRIDGE, BACKBONE };

	private PluginType pluginType;

	public Version(PluginType pluginType) {
		this.pluginType = pluginType;
	}

	public long getRealVersion() {
		switch(pluginType) {
		case BRIDGE:
			return BRIDGE_REAL_VERSION;
		case CLIENT:
			return CLIENT_REAL_VERSION;
		case BACKBONE:
			return BACKBONE_REAL_VERSION;
		}
		return -1;
	}

	public String getVersion() {
		switch(pluginType) {
		case BRIDGE:
			return BRIDGE_VERSION;
		case CLIENT:
			return CLIENT_VERSION;
		case BACKBONE:
			return BACKBONE_VERSION;
		}
		return "Unknown";
	}

}

@@ -306,35 +306,35 @@
 NT_VERSION = %220.
-3.1
+5.0
 %22;%0A%09public stati
@@ -371,9 +371,9 @@
 N = 
-8
+9
 ;%0A%0A%09
@@ -423,11 +423,11 @@
  %220.
-3.1
+5.0
 %22;%0A%09
@@ -476,9 +476,9 @@
 N = 
-6
+7
 ;%0A%0A%09

Update version of Freenet agents