r26690 - trunk/plugins/UPnP

[email protected]
Newsgroups gmane.network.freenet.cvs
Message-ID <[email protected]>
Author: toad
Date: 2009-04-09 22:19:06 +0000 (Thu, 09 Apr 2009)
New Revision: 26690

Modified:
   trunk/plugins/UPnP/UPnP.java
   trunk/plugins/UPnP/Version.java
Log:
Version UPnP


Modified: trunk/plugins/UPnP/UPnP.java
===================================================================
--- trunk/plugins/UPnP/UPnP.java	2009-04-09 22:16:39 UTC (rev 26689)
+++ trunk/plugins/UPnP/UPnP.java	2009-04-09 22:19:06 UTC (rev 26690)
@@ -31,6 +31,7 @@
 import freenet.pluginmanager.FredPluginHTTP;
 import freenet.pluginmanager.FredPluginIPDetector;
 import freenet.pluginmanager.FredPluginPortForward;
+import freenet.pluginmanager.FredPluginRealVersioned;
 import freenet.pluginmanager.FredPluginThreadless;
 import freenet.pluginmanager.FredPluginVersioned;
 import freenet.pluginmanager.PluginHTTPException;
@@ -55,7 +56,7 @@
  * TODO: Advertise the node like the MDNS plugin does
  * TODO: Implement EventListener and react on ip-change
  */ 
-public class UPnP extends ControlPoint implements FredPluginHTTP, FredPlugin, FredPluginThreadless, FredPluginIPDetector, FredPluginPortForward, FredPluginBandwidthIndicator, FredPluginVersioned, DeviceChangeListener {
+public class UPnP extends ControlPoint implements FredPluginHTTP, FredPlugin, FredPluginThreadless, FredPluginIPDetector, FredPluginPortForward, FredPluginBandwidthIndicator, FredPluginVersioned, FredPluginRealVersioned, DeviceChangeListener {
 	private PluginRespirator pr;
 	
 	/** some schemas */
@@ -604,6 +605,10 @@
 		return Version.getVersion() + " " + Version.getSvnRevision();
 	}
 	
+	public long getRealVersion() {
+		return Version.getRealVersion();
+	}
+	
 	public static void main(String[] args) throws Exception {
 		UPnP upnp = new UPnP();
 		ControlPoint cp = new ControlPoint();

Modified: trunk/plugins/UPnP/Version.java
===================================================================
--- trunk/plugins/UPnP/Version.java	2009-04-09 22:16:39 UTC (rev 26689)
+++ trunk/plugins/UPnP/Version.java	2009-04-09 22:19:06 UTC (rev 26690)
@@ -4,6 +4,7 @@
 package plugins.UPnP;
 
 public class Version {
+	/** SVN revision number. Only set if the plugin is compiled properly e.g. by emu. */
         public static final String svnRevision = "@custom@";
 	public static final short MAJOR = 1;
 	public static final short MINOR = 0;
@@ -12,6 +13,10 @@
 		return (MAJOR + "." + MINOR);
 	}
 	
+	public static long getRealVersion() {
+		return MAJOR * 10000 + MINOR;
+	}
+	
         public static String getSvnRevision() {
                 return svnRevision;
         }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.