1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-23 06:42:05 +01:00
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@10881 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2008-11-13 21:53:18 +00:00 committed by matt
parent 6051940177
commit 0540d2e38a
2 changed files with 3 additions and 8 deletions

View file

@ -139,8 +139,7 @@ public class AdHocCommandManager {
* @param clazz the class of the command, which must extend {@link LocalCommand}. * @param clazz the class of the command, which must extend {@link LocalCommand}.
*/ */
public void registerCommand(String node, final String name, Class clazz) { public void registerCommand(String node, final String name, Class clazz) {
AdHocCommandInfo commandInfo = new AdHocCommandInfo(node, name, AdHocCommandInfo commandInfo = new AdHocCommandInfo(node, name, connection.getUser(), clazz);
connection.getUser(), clazz);
commands.put(node, commandInfo); commands.put(node, commandInfo);
// Set the NodeInformationProvider that will provide information about // Set the NodeInformationProvider that will provide information about
@ -153,7 +152,7 @@ public class AdHocCommandManager {
public List<String> getNodeFeatures() { public List<String> getNodeFeatures() {
List<String> answer = new ArrayList<String>(); List<String> answer = new ArrayList<String>();
answer.add("http://jabber.org/protocol/commands"); answer.add(DISCO_NAMESPACE);
// TODO: check if this service is provided by the // TODO: check if this service is provided by the
// TODO: current connection. // TODO: current connection.
answer.add("jabber:x:data"); answer.add("jabber:x:data");

View file

@ -52,11 +52,7 @@
package org.jivesoftware.smackx.commands; package org.jivesoftware.smackx.commands;
import org.jivesoftware.smack.*;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.test.SmackTestCase; import org.jivesoftware.smack.test.SmackTestCase;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.PacketExtensionFilter;
import org.jivesoftware.smackx.packet.DiscoverItems; import org.jivesoftware.smackx.packet.DiscoverItems;
/** /**
@ -68,7 +64,7 @@ public class AdHocCommandDiscoTest extends SmackTestCase {
/** /**
* Constructor for test. * Constructor for test.
* @param arg0 * @param arg0 argument.
*/ */
public AdHocCommandDiscoTest(String arg0) { public AdHocCommandDiscoTest(String arg0) {
super(arg0); super(arg0);