|
From: <ls...@us...> - 2007-01-03 20:24:28
|
Revision: 2979
http://jnode.svn.sourceforge.net/jnode/?rev=2979&view=rev
Author: lsantha
Date: 2007-01-03 12:24:27 -0800 (Wed, 03 Jan 2007)
Log Message:
-----------
Undoing last chenge.
Modified Paths:
--------------
trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java
trunk/net/src/net/org/jnode/net/command/ResolverCommand.java
trunk/net/src/net/org/jnode/net/command/RouteCommand.java
trunk/net/src/net/org/jnode/net/command/TftpCommand.java
Added Paths:
-----------
trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java
trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java
Modified: trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java
===================================================================
--- trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java 2007-01-03 20:23:46 UTC (rev 2978)
+++ trunk/net/src/net/org/jnode/net/command/IfconfigCommand.java 2007-01-03 20:24:27 UTC (rev 2979)
@@ -29,7 +29,7 @@
import org.jnode.driver.net.NetDeviceAPI;
import org.jnode.naming.InitialNaming;
import org.jnode.net.ethernet.EthernetConstants;
-import org.jnode.shell.help.argument.HostArgument;
+import org.jnode.net.help.argument.HostArgument;
import org.jnode.net.ipv4.IPv4Address;
import org.jnode.net.ipv4.config.IPv4ConfigurationService;
import org.jnode.shell.Command;
Modified: trunk/net/src/net/org/jnode/net/command/ResolverCommand.java
===================================================================
--- trunk/net/src/net/org/jnode/net/command/ResolverCommand.java 2007-01-03 20:23:46 UTC (rev 2978)
+++ trunk/net/src/net/org/jnode/net/command/ResolverCommand.java 2007-01-03 20:24:27 UTC (rev 2979)
@@ -25,7 +25,7 @@
import java.io.PrintStream;
import java.util.Collection;
-import org.jnode.shell.help.argument.HostArgument;
+import org.jnode.net.help.argument.HostArgument;
import org.jnode.net.ipv4.IPv4Address;
import org.jnode.net.ipv4.util.ResolverImpl;
import org.jnode.shell.Command;
Modified: trunk/net/src/net/org/jnode/net/command/RouteCommand.java
===================================================================
--- trunk/net/src/net/org/jnode/net/command/RouteCommand.java 2007-01-03 20:23:46 UTC (rev 2978)
+++ trunk/net/src/net/org/jnode/net/command/RouteCommand.java 2007-01-03 20:24:27 UTC (rev 2979)
@@ -27,8 +27,8 @@
import org.jnode.driver.Device;
import org.jnode.naming.InitialNaming;
import org.jnode.net.ethernet.EthernetConstants;
-import org.jnode.shell.help.argument.HostArgument;
-import org.jnode.shell.help.argument.NetworkArgument;
+import org.jnode.net.help.argument.HostArgument;
+import org.jnode.net.help.argument.NetworkArgument;
import org.jnode.net.ipv4.IPv4Address;
import org.jnode.net.ipv4.config.IPv4ConfigurationService;
import org.jnode.net.ipv4.layer.IPv4NetworkLayer;
Modified: trunk/net/src/net/org/jnode/net/command/TftpCommand.java
===================================================================
--- trunk/net/src/net/org/jnode/net/command/TftpCommand.java 2007-01-03 20:23:46 UTC (rev 2978)
+++ trunk/net/src/net/org/jnode/net/command/TftpCommand.java 2007-01-03 20:24:27 UTC (rev 2979)
@@ -24,7 +24,7 @@
import java.io.InputStream;
import java.io.PrintStream;
-import org.jnode.shell.help.argument.HostArgument;
+import org.jnode.net.help.argument.HostArgument;
import org.jnode.net.ipv4.tftp.TFTPClient;
import org.jnode.shell.Command;
import org.jnode.shell.CommandLine;
Copied: trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java (from rev 2977, trunk/shell/src/shell/org/jnode/shell/help/argument/HostArgument.java)
===================================================================
--- trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java (rev 0)
+++ trunk/net/src/net/org/jnode/net/help/argument/HostArgument.java 2007-01-03 20:24:27 UTC (rev 2979)
@@ -0,0 +1,49 @@
+/*
+ * $Id: HostArgument.java 2224 2006-01-01 12:49:03Z epr $
+ *
+ * JNode.org
+ * Copyright (C) 2003-2006 JNode.org
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; If not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package org.jnode.net.help.argument;
+
+import org.jnode.net.ipv4.IPv4Address;
+import org.jnode.shell.help.Argument;
+import org.jnode.shell.help.ParsedArguments;
+
+/**
+ * @author qades
+ */
+public class HostArgument extends Argument {
+
+ public HostArgument(String name, String description, boolean multi) {
+ super(name, description, multi);
+ }
+
+ public HostArgument(String name, String description) {
+ super(name, description);
+ }
+
+ // here the specific command line completion would be implemented
+
+ public IPv4Address getAddress(ParsedArguments args) {
+ String value = getValue(args);
+ if( value == null )
+ return null;
+ return new IPv4Address(value);
+ }
+}
Copied: trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java (from rev 2977, trunk/shell/src/shell/org/jnode/shell/help/argument/NetworkArgument.java)
===================================================================
--- trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java (rev 0)
+++ trunk/net/src/net/org/jnode/net/help/argument/NetworkArgument.java 2007-01-03 20:24:27 UTC (rev 2979)
@@ -0,0 +1,49 @@
+/*
+ * $Id: NetworkArgument.java 2224 2006-01-01 12:49:03Z epr $
+ *
+ * JNode.org
+ * Copyright (C) 2003-2006 JNode.org
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; If not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+package org.jnode.net.help.argument;
+
+import org.jnode.net.ipv4.IPv4Address;
+import org.jnode.shell.help.Argument;
+import org.jnode.shell.help.ParsedArguments;
+
+/**
+ * @author qades
+ */
+public class NetworkArgument extends Argument {
+
+ public NetworkArgument(String name, String description, boolean multi) {
+ super(name, description, multi);
+ }
+
+ public NetworkArgument(String name, String description) {
+ super(name, description);
+ }
+
+ // here the specific command line completion would be implemented
+
+ public IPv4Address getAddress(ParsedArguments args) {
+ String value = getValue(args);
+ if( "default".equals(value) )
+ value = "0.0.0.0";
+ return new IPv4Address(value);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|