Commit 07a474b9 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Copyright updates and, unfortunately, removal of SIP/SIMPLE support due to...

Copyright updates and, unfortunately, removal of SIP/SIMPLE support due to lack of license agreement with contributors.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@7522 b35dd754-fafc-0310-a699-88a17e54d16e
parent 2ef81dcf
...@@ -162,7 +162,6 @@ hr { ...@@ -162,7 +162,6 @@ hr {
<h2>Major Known Issues</h2> <h2>Major Known Issues</h2>
<ul> <ul>
<li>Many issues with Yahoo support that I haven't been able to track down (yahoo supported moved to post-1.0)</li> <li>Many issues with Yahoo support that I haven't been able to track down (yahoo supported moved to post-1.0)</li>
<li>I haven't been able to test SIP/SIMPLE support well. Please report if you have success with it.</li>
<li>Some outstanding issues with ICQ as joscar doesn't fully support ICQ yet</li> <li>Some outstanding issues with ICQ as joscar doesn't fully support ICQ yet</li>
</ul> </ul>
...@@ -181,6 +180,11 @@ hr { ...@@ -181,6 +180,11 @@ hr {
<li>[<a href='http://www.igniterealtime.org/issues/browse/GATE-157'>GATE-157</a>] - Yahoo usernames now allow a . (period)</li> <li>[<a href='http://www.igniterealtime.org/issues/browse/GATE-157'>GATE-157</a>] - Yahoo usernames now allow a . (period)</li>
</ul> </ul>
<b>Removals</b>
<ul>
<li>Required to remove SIP/SIMPLE support due to lack of license agreement. =(</li>
</ul>
<h2>1.0 Beta 8 -- <span style="font-weight: normal;">February 26, 2007</span></h2> <h2>1.0 Beta 8 -- <span style="font-weight: normal;">February 26, 2007</span></h2>
<b>Bug Fixes</b> <b>Bug Fixes</b>
......
Name | Version Name | Version
------------------------------------------------------- -------------------------------------------------------
cindy.jar | 2.4.4 (patched [#4]) cindy.jar | 2.4.4 (patched [#4])
concurrent.jar | 1.3.4
dwr.jar | 1.1.1 (patched [#3]) dwr.jar | 1.1.1 (patched [#3])
irclib.jar | 1.10 irclib.jar | 1.10
jainsipapi.jar | 1.2 (nightly 2007-02-13)
jainsipri.jar | 1.2 (nightly 2007-02-13)
jakarta-regexp.jar | 1.3
jml.jar | svn-20070225 jml.jar | svn-20070225
joscar-client.jar | svn-20070204 (patched [#2]) joscar-client.jar | svn-20070204 (patched [#2])
joscar-common.jar | svn-20070204 joscar-common.jar | svn-20070204
joscar-protocol.jar | svn-20070204 (patched [#2]) joscar-protocol.jar | svn-20070204 (patched [#2])
log4j.jar | 1.2.8
picocontainer.jar | 1.2.0 picocontainer.jar | 1.2.0
ymsg_network.jar | 0.61 (patched [#1]) ymsg_network.jar | 0.61 (patched [#1])
ymsg_support.jar | 0.61 (patched [#1]) ymsg_support.jar | 0.61 (patched [#1])
......
...@@ -229,7 +229,6 @@ hr { ...@@ -229,7 +229,6 @@ hr {
<li>ICQ: login.oscar.aol.com 5190</li> <li>ICQ: login.oscar.aol.com 5190</li>
<li>IRC: irc.freenode.net 7000</li> <li>IRC: irc.freenode.net 7000</li>
<li>MSN: messenger.hotmail.com 1863</li> <li>MSN: messenger.hotmail.com 1863</li>
<li>SIP: localhost 5060</li>
<li>Yahoo: scs.msg.yahoo.com 5050</li> <li>Yahoo: scs.msg.yahoo.com 5050</li>
</ul> </ul>
Please be aware that these are only the initial connections made. Many of Please be aware that these are only the initial connections made. Many of
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
...@@ -81,10 +81,6 @@ public class GatewayPlugin implements Plugin { ...@@ -81,10 +81,6 @@ public class GatewayPlugin implements Plugin {
/* Set up MSN transport. */ /* Set up MSN transport. */
transports.put("msn", new TransportInstance(TransportType.msn, LocaleUtils.getLocalizedString("gateway.msn.name", "gateway"), "org.jivesoftware.wildfire.gateway.protocols.msn.MSNTransport", componentManager)); transports.put("msn", new TransportInstance(TransportType.msn, LocaleUtils.getLocalizedString("gateway.msn.name", "gateway"), "org.jivesoftware.wildfire.gateway.protocols.msn.MSNTransport", componentManager));
maybeStartService("msn"); maybeStartService("msn");
/* Set up SIP/SIMPLE transport. */
transports.put("sip", new TransportInstance(TransportType.sip, LocaleUtils.getLocalizedString("gateway.sip.name", "gateway"), "org.jivesoftware.wildfire.gateway.protocols.simple.SimpleTransport", componentManager));
maybeStartService("sip");
} }
public void destroyPlugin() { public void destroyPlugin() {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
*/ */
package org.jivesoftware.wildfire.gateway; package org.jivesoftware.wildfire.gateway;
/** /**
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.simple;
import java.util.Hashtable;
import org.jivesoftware.util.Log;
/**
* This class represents the roster of SIP transport.
* <br><br>
* By now the SIP has no rosters stored so clients got to implement rosters themselves.
* @author Patrick Siu
* @version 0.0.2
*/
public class SimpleRoster {
private SimpleSession mySimpleSession;
private Hashtable<String, SimpleRosterItem> rosterItemList;
private boolean activated = false;
public SimpleRoster(SimpleSession mySimpleSession) {
if (mySimpleSession == null)
throw new NullPointerException("The SIP session provided cannot be null!");
this.mySimpleSession = mySimpleSession;
}
public synchronized void activate() {
this.activated = true;
}
public synchronized void deactivate() {
this.activated = false;
}
public void addEntry(String userid, SimpleRosterItem item) {
rosterItemList.put(userid, item);
}
public void removeEntry(String userid) {
rosterItemList.remove(userid);
}
public SimpleRosterItem getEntry(String userid) {
return rosterItemList.get(userid);
}
/**
* Loads the SIP roster from persistent store.
*/
public void loadRoster() {
// Roster should be loaded in persistent stores.
}
/**
* Stores the SIP roster into persistent store.
*/
public void storeRoster() {
// Roster should be stored in persistent stores.
}
public void finalize() {
Log.debug("SimpleRoster shutting down!");
rosterItemList.clear();
}
}
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.simple;
import javax.sip.Dialog;
/**
* This class represents a roster item of SIP transport.
*/
public class SimpleRosterItem {
private String userid;
private String nickname;
private SimplePresence presence;
private Dialog outgoingDialog;
private long seqNum;
public SimpleRosterItem(String userid, String nickname, long seqNum) {
this.userid = userid;
this.nickname = nickname;
this.seqNum = seqNum;
presence = new SimplePresence();
presence.setTupleStatus(SimplePresence.TupleStatus.CLOSED);
outgoingDialog = null;
}
public void incrementSeqNum() {
seqNum++;
}
public long getSeqNum() {
return seqNum;
}
public void updatePresence(String newPresence) throws Exception {
presence.parse(newPresence);
}
public void setOutgoingDialog(Dialog outgoingDialog) {
this.outgoingDialog = outgoingDialog;
}
public Dialog getOutgoingDialog() {
return outgoingDialog;
}
}
\ No newline at end of file
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.wildfire.gateway.protocols.simple;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
import java.util.TooManyListenersException;
import javax.sip.InvalidArgumentException;
import javax.sip.ListeningPoint;
import javax.sip.ObjectInUseException;
import javax.sip.PeerUnavailableException;
import javax.sip.SipFactory;
import javax.sip.SipProvider;
import javax.sip.SipStack;
import javax.sip.TransportNotSupportedException;
import javax.sip.address.AddressFactory;
import javax.sip.header.HeaderFactory;
import javax.sip.message.MessageFactory;
import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.gateway.BaseTransport;
import org.jivesoftware.wildfire.gateway.PresenceType;
import org.jivesoftware.wildfire.gateway.Registration;
import org.jivesoftware.wildfire.gateway.TransportLoginStatus;
import org.jivesoftware.wildfire.gateway.TransportSession;
import org.xmpp.packet.JID;
import org.xmpp.packet.Presence;
/**
* A transport implementation for SIMPLE protocol.
* @author Patrick Siu
* @version 0.0.1
*/
public class SimpleTransport extends BaseTransport {
SipFactory sipFactory = null;
public SimpleTransport() {
super();
// Initialize the SipFactory
sipFactory = SipFactory.getInstance();
sipFactory.setPathName("gov.nist");
}
public TransportSession registrationLoggedIn(Registration registration, JID jid, PresenceType presenceType, String verboseStatus, Integer priority) {
TransportSession session = new SimpleSession(registration, jid, this, priority);
// Possibly more work here!
((SimpleSession) session).login(presenceType, verboseStatus);
return session;
}
public void registrationLoggedOut(TransportSession session) {
((SimpleSession) session).logout();
((SimpleSession) session).removeStack();
session.sessionDone();
// Just in case.
session.setLoginStatus(TransportLoginStatus.LOGGED_OUT);
}
/**
*/
public String getTerminologyUsername() {
return LocaleUtils.getLocalizedString("gateway.sip.username", "gateway");
}
public String getTerminologyPassword() {
return LocaleUtils.getLocalizedString("gateway.sip.password", "gateway");
}
/**
* @see org.jivesoftware.wildfire.gateway.BaseTransport#getTerminologyNickname()
*/
public String getTerminologyNickname() {
// If this string is needed, then take it. Just put a draft code to ensure integrity.
String result = null;
return result;
}
/**
* @see org.jivesoftware.wildfire.gateway.BaseTransport#getTerminologyRegistration()
*/
public String getTerminologyRegistration() {
return LocaleUtils.getLocalizedString("gateway.sip.registration", "gateway");
}
/**
* @see org.jivesoftware.wildfire.gateway.BaseTransport#isPasswordRequired()
*/
public Boolean isPasswordRequired() {
// Just put a draft code to ensure integrity.
Boolean result = true;
return result;
}
/**
* @see org.jivesoftware.wildfire.gateway.BaseTransport#isNicknameRequired()
*/
public Boolean isNicknameRequired() {
// Just put a draft code to ensure integrity.
Boolean result = false;
return result;
}
/**
* @see org.jivesoftware.wildfire.gateway.BaseTransport#isUsernameValid(String)
*/
public Boolean isUsernameValid(String username) {
// Just put a draft code to ensure integrity.
Log.debug("SimpleTransport.isUsernameValid: Checking '" + username + "'");
// Boolean result = username.matches("\\w+");
Boolean result = username.matches("[^ \\p{Cntrl}()@,;:\\\\\"\\[\\]]+@[^ \\p{Cntrl}()@,;:\\\\\"\\[\\]]+");
return result;
}
// The following code are generic custom classes for SIP-XMPP conversion.
public SimplePresence convertJabStatusToSIP(PresenceType jabStatus) {
SimplePresence simplePresence = new SimplePresence();
switch (jabStatus) {
case available:
// simplePresence.setRpid(SimplePresence.Rpid.UNKNOWN);
simplePresence.setDmNote("Online");
break;
case away:
simplePresence.setRpid(SimplePresence.Rpid.AWAY);
break;
case chat:
simplePresence.setRpid(SimplePresence.Rpid.OTHER);
simplePresence.setDmNote("Free to chat");
break;
case dnd:
simplePresence.setRpid(SimplePresence.Rpid.BUSY);
break;
case unavailable:
simplePresence.setTupleStatus(SimplePresence.TupleStatus.CLOSED);
break;
case unknown:
simplePresence.setRpid(SimplePresence.Rpid.UNKNOWN);
break;
case xa:
simplePresence.setRpid(SimplePresence.Rpid.AWAY);
break;
default:
break;
}
return simplePresence;
}
public void convertSIPStatusToJap(Presence presence, SimplePresence simplePresence) {
if (simplePresence.getTupleStatus().isOpen()) {
switch (simplePresence.getRpid()) {
case APPOINTMENT:
presence.setShow(Presence.Show.dnd);
break;
case AWAY:
presence.setShow(Presence.Show.away);
break;
case BREAKFAST:
presence.setShow(Presence.Show.xa);
break;
case BUSY:
presence.setShow(Presence.Show.dnd);
break;
case DINNER:
presence.setShow(Presence.Show.xa);
break;
case HOLIDAY:
presence.setShow(Presence.Show.xa);
break;
case IN_TRANSIT:
presence.setShow(Presence.Show.xa);
break;
case LOOKING_FOR_WORK:
presence.setShow(Presence.Show.dnd);
break;
case LUNCH:
case MEAL:
presence.setShow(Presence.Show.xa);
break;
case MEETING:
presence.setShow(Presence.Show.dnd);
break;
case ON_THE_PHONE:
presence.setShow(Presence.Show.away);
presence.setStatus("On Phone");
break;
case OTHER:
break;
case PERFORMANCE:
presence.setShow(Presence.Show.dnd);
break;
case PERMANENT_ABSENCE:
presence.setType(Presence.Type.unavailable);
break;
case PLAYING:
presence.setShow(Presence.Show.away);
break;
case PRESENTATION:
presence.setShow(Presence.Show.dnd);
break;
case SHOPPING:
presence.setShow(Presence.Show.xa);
break;
case SLEEPING:
presence.setShow(Presence.Show.xa);
break;
case SPECTATOR:
presence.setShow(Presence.Show.xa);
break;
case STEERING:
presence.setShow(Presence.Show.xa);
break;
case TRAVEL:
presence.setShow(Presence.Show.xa);
break;
case TV:
presence.setShow(Presence.Show.away);
break;
case UNKNOWN:
// presence.setType(Presence.Type.unavailable);
break;
case VACATION:
presence.setShow(Presence.Show.xa);
break;
case WORKING:
presence.setShow(Presence.Show.dnd);
break;
case WORSHIP:
presence.setShow(Presence.Show.dnd);
break;
default:
break;
}
}
else {
presence.setType(Presence.Type.unavailable);
}
}
/**
* An improved method to do the trick.
*/
public String convertJIDToID(JID jid) {
String node = jid.getNode();
while (!JID.unescapeNode(node).equals(node)) {
node = JID.unescapeNode(node);
}
return node;
}
int portOffset = 0;
synchronized int generateListenerPort() {
return (ListeningPoint.PORT_5060 + (++portOffset));
}
}
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
*/ */
package org.jivesoftware.wildfire.gateway.web; package org.jivesoftware.wildfire.gateway.web;
import org.jivesoftware.wildfire.container.PluginManager; import org.jivesoftware.wildfire.container.PluginManager;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
* Copyright (C) 2006 Jive Software. All rights reserved. * Copyright (C) 2006-2007 Jive Software. All rights reserved.
* *
* This software is published under the terms of the GNU Public License (GPL), * This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution. * a copy of which is included in this distribution.
......
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006-2007 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.util; package org.jivesoftware.util;
import org.jivesoftware.wildfire.gateway.PresenceType; import org.jivesoftware.wildfire.gateway.PresenceType;
......
<?xml version="1.0" encoding="UTF-8"?>
<optionsconfig>
<leftpanel></leftpanel>
<rightpanel>
<item type="text" sysprop="plugin.gateway.sip.connecthost" var="host" desckey="gateway.web.settings.host" default="localhost"/>
<item type="text" sysprop="plugin.gateway.sip.connectport" var="port" desckey="gateway.web.settings.port" default="5060"/>
</rightpanel>
</optionsconfig>
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
trEnabled.put("irc", plugin.getTransportInstance("irc").isEnabled()); trEnabled.put("irc", plugin.getTransportInstance("irc").isEnabled());
trEnabled.put("msn", plugin.getTransportInstance("msn").isEnabled()); trEnabled.put("msn", plugin.getTransportInstance("msn").isEnabled());
trEnabled.put("yahoo", plugin.getTransportInstance("yahoo").isEnabled()); trEnabled.put("yahoo", plugin.getTransportInstance("yahoo").isEnabled());
trEnabled.put("sip", plugin.getTransportInstance("sip").isEnabled());
webManager.init(request, response, session, application, out); webManager.init(request, response, session, application, out);
...@@ -66,7 +65,6 @@ ...@@ -66,7 +65,6 @@
if (webManager.getPageProperty("gateway-registrations", "filterYAHOO", 0) != 0) { filteropts.add("yahoo"); } if (webManager.getPageProperty("gateway-registrations", "filterYAHOO", 0) != 0) { filteropts.add("yahoo"); }
if (webManager.getPageProperty("gateway-registrations", "filterIRC", 0) != 0) { filteropts.add("irc"); } if (webManager.getPageProperty("gateway-registrations", "filterIRC", 0) != 0) { filteropts.add("irc"); }
if (webManager.getPageProperty("gateway-registrations", "filterSIGNEDON", 0) != 0) { filteropts.add("signedon"); } if (webManager.getPageProperty("gateway-registrations", "filterSIGNEDON", 0) != 0) { filteropts.add("signedon"); }
if (webManager.getPageProperty("gateway-registrations", "filterSIP", 0) != 0) { filteropts.add("sip"); }
} }
else { else {
filteropts.add("aim"); filteropts.add("aim");
...@@ -74,7 +72,6 @@ ...@@ -74,7 +72,6 @@
filteropts.add("msn"); filteropts.add("msn");
filteropts.add("yahoo"); filteropts.add("yahoo");
filteropts.add("irc"); filteropts.add("irc");
filteropts.add("sip");
} }
webManager.setPageProperty("gateway-registrations", "filterSET", 1); webManager.setPageProperty("gateway-registrations", "filterSET", 1);
...@@ -84,7 +81,6 @@ ...@@ -84,7 +81,6 @@
webManager.setPageProperty("gateway-registrations", "filterYAHOO", filteropts.contains("yahoo") ? 1 : 0); webManager.setPageProperty("gateway-registrations", "filterYAHOO", filteropts.contains("yahoo") ? 1 : 0);
webManager.setPageProperty("gateway-registrations", "filterIRC", filteropts.contains("irc") ? 1 : 0); webManager.setPageProperty("gateway-registrations", "filterIRC", filteropts.contains("irc") ? 1 : 0);
webManager.setPageProperty("gateway-registrations", "filterSIGNEDON", filteropts.contains("signedon") ? 1 : 0); webManager.setPageProperty("gateway-registrations", "filterSIGNEDON", filteropts.contains("signedon") ? 1 : 0);
webManager.setPageProperty("gateway-registrations", "filterSIP", filteropts.contains("sip") ? 1 : 0);
int resCount = 0; int resCount = 0;
for (Registration registration : registrations) { for (Registration registration : registrations) {
...@@ -288,7 +284,6 @@ ...@@ -288,7 +284,6 @@
<% if (trEnabled.get("icq")) { %> <option value="icq"><fmt:message key="gateway.icq.shortservice" /></option> <% } %> <% if (trEnabled.get("icq")) { %> <option value="icq"><fmt:message key="gateway.icq.shortservice" /></option> <% } %>
<% if (trEnabled.get("irc")) { %> <option value="irc"><fmt:message key="gateway.irc.shortservice" /></option> <% } %> <% if (trEnabled.get("irc")) { %> <option value="irc"><fmt:message key="gateway.irc.shortservice" /></option> <% } %>
<% if (trEnabled.get("msn")) { %> <option value="msn"><fmt:message key="gateway.msn.shortservice" /></option> <% } %> <% if (trEnabled.get("msn")) { %> <option value="msn"><fmt:message key="gateway.msn.shortservice" /></option> <% } %>
<% if (trEnabled.get("sip")) { %> <option value="sip"><fmt:message key="gateway.sip.shortservice" /></option> <% } %>
<% if (trEnabled.get("yahoo")) { %> <option value="yahoo"><fmt:message key="gateway.yahoo.shortservice" /></option> <% } %> <% if (trEnabled.get("yahoo")) { %> <option value="yahoo"><fmt:message key="gateway.yahoo.shortservice" /></option> <% } %>
</select><br> </select><br>
<strong><fmt:message key="gateway.web.registrations.gateway" /></strong> <strong><fmt:message key="gateway.web.registrations.gateway" /></strong>
...@@ -398,11 +393,6 @@ ...@@ -398,11 +393,6 @@
<img src="images/msn.gif" border="0" alt="<fmt:message key="gateway.msn.shortservice" />"> <img src="images/msn.gif" border="0" alt="<fmt:message key="gateway.msn.shortservice" />">
<!--<span><fmt:message key="gateway.msn.shortservice" /></span>--> <!--<span><fmt:message key="gateway.msn.shortservice" /></span>-->
</label> </label>
<label for="filterSIPcheckbox">
<input type="checkbox" name="filter[]" value="sip" <%= ((filteropts.contains("sip")) ? "checked" : "") %> id="filterSIPcheckbox">
<img src="images/sipsimple.gif" border="0" alt="<fmt:message key="gateway.sip.shortservice" />">
<!--<span><fmt:message key="gateway.sip.shortservice" /></span>-->
</label>
<label for="filterYAHOOcheckbox"> <label for="filterYAHOOcheckbox">
<input type="checkbox" name="filter[]" value="yahoo" <%= ((filteropts.contains("yahoo")) ? "checked" : "") %> id="filterYAHOOcheckbox"> <input type="checkbox" name="filter[]" value="yahoo" <%= ((filteropts.contains("yahoo")) ? "checked" : "") %> id="filterYAHOOcheckbox">
<img src="images/yahoo.gif" border="0" alt="<fmt:message key="gateway.yahoo.shortservice" />"> <img src="images/yahoo.gif" border="0" alt="<fmt:message key="gateway.yahoo.shortservice" />">
......
...@@ -354,7 +354,6 @@ ...@@ -354,7 +354,6 @@
GatewaySettings icqSettings = new GatewaySettings(out, plugin, TransportType.icq, LocaleUtils.getLocalizedString("gateway.icq.service", "gateway")); GatewaySettings icqSettings = new GatewaySettings(out, plugin, TransportType.icq, LocaleUtils.getLocalizedString("gateway.icq.service", "gateway"));
GatewaySettings ircSettings = new GatewaySettings(out, plugin, TransportType.irc, LocaleUtils.getLocalizedString("gateway.irc.service", "gateway")); GatewaySettings ircSettings = new GatewaySettings(out, plugin, TransportType.irc, LocaleUtils.getLocalizedString("gateway.irc.service", "gateway"));
GatewaySettings msnSettings = new GatewaySettings(out, plugin, TransportType.msn, LocaleUtils.getLocalizedString("gateway.msn.service", "gateway")); GatewaySettings msnSettings = new GatewaySettings(out, plugin, TransportType.msn, LocaleUtils.getLocalizedString("gateway.msn.service", "gateway"));
GatewaySettings sipSettings = new GatewaySettings(out, plugin, TransportType.sip, LocaleUtils.getLocalizedString("gateway.sip.service", "gateway"));
GatewaySettings yahooSettings = new GatewaySettings(out, plugin, TransportType.yahoo, LocaleUtils.getLocalizedString("gateway.yahoo.service", "gateway")); GatewaySettings yahooSettings = new GatewaySettings(out, plugin, TransportType.yahoo, LocaleUtils.getLocalizedString("gateway.yahoo.service", "gateway"));
%> %>
...@@ -616,7 +615,6 @@ ...@@ -616,7 +615,6 @@
<p><fmt:message key="gateway.web.settings.unstable.notice" /></p> <p><fmt:message key="gateway.web.settings.unstable.notice" /></p>
<% icqSettings.printSettingsDialog(); %> <% icqSettings.printSettingsDialog(); %>
<% sipSettings.printSettingsDialog(); %>
<% yahooSettings.printSettingsDialog(); %> <% yahooSettings.printSettingsDialog(); %>
</form> </form>
......
...@@ -344,14 +344,6 @@ a.jive-gatewayButtonOn { ...@@ -344,14 +344,6 @@ a.jive-gatewayButtonOn {
background: url(../images/msn-gray.gif) no-repeat left; background: url(../images/msn-gray.gif) no-repeat left;
background-position: 2px 1px; background-position: 2px 1px;
} }
.jive-gateway-SIPon {
background: url(../images/sip.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-SIPoff {
background: url(../images/sip-gray.gif) no-repeat left;
background-position: 2px 1px;
}
.jive-gateway-YAHOOon { .jive-gateway-YAHOOon {
background: url(../images/yahoo.gif) no-repeat left; background: url(../images/yahoo.gif) no-repeat left;
background-position: 0px 1px; background-position: 0px 1px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment