Index: org/igniterealtime/xiff/auth/Anonymous.as
===================================================================
--- org/igniterealtime/xiff/auth/Anonymous.as	(revision 11020)
+++ org/igniterealtime/xiff/auth/Anonymous.as	(working copy)
@@ -18,11 +18,11 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.auth
+package org.igniterealtime.xiff.auth
 {
   import flash.xml.XMLNode;
 
-  import org.jivesoftware.xiff.core.XMPPConnection;
+  import org.igniterealtime.xiff.core.XMPPConnection;
 
   /**
    * This class provides SASL authentication using the ANONYMOUS mechanism.
Index: org/igniterealtime/xiff/auth/External.as
===================================================================
--- org/igniterealtime/xiff/auth/External.as	(revision 11020)
+++ org/igniterealtime/xiff/auth/External.as	(working copy)
@@ -18,14 +18,14 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.auth
+package org.igniterealtime.xiff.auth
 {
   import flash.xml.XMLNode;
 
   import mx.utils.Base64Encoder;
 
-  import org.jivesoftware.xiff.core.UnescapedJID;
-  import org.jivesoftware.xiff.core.XMPPConnection;
+  import org.igniterealtime.xiff.core.UnescapedJID;
+  import org.igniterealtime.xiff.core.XMPPConnection;
 
   /**
    * This class provides SASL authentication using the EXTERNAL mechanism.
Index: org/igniterealtime/xiff/auth/Plain.as
===================================================================
--- org/igniterealtime/xiff/auth/Plain.as	(revision 11020)
+++ org/igniterealtime/xiff/auth/Plain.as	(working copy)
@@ -18,15 +18,15 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.auth
+package org.igniterealtime.xiff.auth
 {
   import flash.utils.ByteArray;
   import flash.xml.XMLNode;
 
   import mx.utils.Base64Encoder;
 
-  import org.jivesoftware.xiff.core.UnescapedJID;
-  import org.jivesoftware.xiff.core.XMPPConnection;
+  import org.igniterealtime.xiff.core.UnescapedJID;
+  import org.igniterealtime.xiff.core.XMPPConnection;
 
   /**
    * This class provides SASL authentication using the PLAIN mechanism.
Index: org/igniterealtime/xiff/auth/SASLAuth.as
===================================================================
--- org/igniterealtime/xiff/auth/SASLAuth.as	(revision 11020)
+++ org/igniterealtime/xiff/auth/SASLAuth.as	(working copy)
@@ -18,7 +18,7 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.auth
+package org.igniterealtime.xiff.auth
 {
 	import flash.xml.XMLNode;
 	
Index: org/igniterealtime/xiff/bookmark/BookmarkManager.as
===================================================================
--- org/igniterealtime/xiff/bookmark/BookmarkManager.as	(revision 11020)
+++ org/igniterealtime/xiff/bookmark/BookmarkManager.as	(working copy)
@@ -1,16 +1,16 @@
-package org.jivesoftware.xiff.bookmark
+package org.igniterealtime.xiff.bookmark
 {
 	import flash.events.EventDispatcher;
 	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.privatedata.PrivateDataExtension;
-	import org.jivesoftware.xiff.events.BookmarkChangedEvent;
-	import org.jivesoftware.xiff.events.BookmarkRetrievedEvent;
-	import org.jivesoftware.xiff.privatedata.PrivateDataManager;
-	import org.jivesoftware.xiff.util.Callback;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMPPStanza;
+	import org.igniterealtime.xiff.data.privatedata.PrivateDataExtension;
+	import org.igniterealtime.xiff.events.BookmarkChangedEvent;
+	import org.igniterealtime.xiff.events.BookmarkRetrievedEvent;
+	import org.igniterealtime.xiff.privatedata.PrivateDataManager;
+	import org.igniterealtime.xiff.util.Callback;
 
 	[Event("GroupChatBookmarkChanged")]
 	
Index: org/igniterealtime/xiff/bookmark/BookmarkPrivatePayload.as
===================================================================
--- org/igniterealtime/xiff/bookmark/BookmarkPrivatePayload.as	(revision 11020)
+++ org/igniterealtime/xiff/bookmark/BookmarkPrivatePayload.as	(working copy)
@@ -1,10 +1,10 @@
-package org.jivesoftware.xiff.bookmark
+package org.igniterealtime.xiff.bookmark
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.privatedata.IPrivatePayload;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.privatedata.IPrivatePayload;
 
 	public class BookmarkPrivatePayload implements IPrivatePayload {
 		
Index: org/igniterealtime/xiff/bookmark/GroupChatBookmark.as
===================================================================
--- org/igniterealtime/xiff/bookmark/GroupChatBookmark.as	(revision 11020)
+++ org/igniterealtime/xiff/bookmark/GroupChatBookmark.as	(working copy)
@@ -1,9 +1,9 @@
-package org.jivesoftware.xiff.bookmark
+package org.igniterealtime.xiff.bookmark
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.ISerializable;
 
 	public class GroupChatBookmark implements ISerializable
 	{
Index: org/igniterealtime/xiff/bookmark/UrlBookmark.as
===================================================================
--- org/igniterealtime/xiff/bookmark/UrlBookmark.as	(revision 11020)
+++ org/igniterealtime/xiff/bookmark/UrlBookmark.as	(working copy)
@@ -1,9 +1,9 @@
-package org.jivesoftware.xiff.bookmark
+package org.igniterealtime.xiff.bookmark
 {
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.ISerializable;
 
 	public class UrlBookmark implements ISerializable
 	{
Index: org/igniterealtime/xiff/conference/InviteListener.as
===================================================================
--- org/igniterealtime/xiff/conference/InviteListener.as	(revision 11020)
+++ org/igniterealtime/xiff/conference/InviteListener.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-20077
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,24 +21,24 @@
  *
  */
 	 
-package org.jivesoftware.xiff.conference
+package org.igniterealtime.xiff.conference
 {	
 	import flash.events.EventDispatcher;
 	
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.Message;
-	import org.jivesoftware.xiff.data.muc.MUCUserExtension;
-	import org.jivesoftware.xiff.events.InviteEvent;
-	import org.jivesoftware.xiff.events.MessageEvent;
+	import org.igniterealtime.xiff.core.XMPPConnection;
+	import org.igniterealtime.xiff.data.Message;
+	import org.igniterealtime.xiff.data.muc.MUCUserExtension;
+	import org.igniterealtime.xiff.events.InviteEvent;
+	import org.igniterealtime.xiff.events.MessageEvent;
 	
 	/**
 	 * Dispatched when an invitations has been received.
 	 * 
-	 * @eventType org.jivesoftware.xiff.InviteEvent.INVITED
-	 * @see org.jivesoftware.xiff.conference.Room
-	 * @see org.jivesoftware.xiff.conference.Room.#invite
+	 * @eventType org.igniterealtime.xiff.InviteEvent.INVITED
+	 * @see org.igniterealtime.xiff.conference.Room
+	 * @see org.igniterealtime.xiff.conference.Room.#invite
 	 */
-	[Event( name="invited", type="org.jivesoftware.xiff.events.InviteEvent" )]
+	[Event( name="invited", type="org.igniterealtime.xiff.events.InviteEvent" )]
 	
 	/**
 	 * Manages the dispatching of events during invitations.  Add event
@@ -65,7 +65,7 @@
 		 * Sets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
 		 *
 		 * @param connection The XMPPConnection instance to use.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
+		 * @see org.igniterealtime.xiff.core.XMPPConnection
 		 */
 		public function setConnection( connection:XMPPConnection ):void
 		{
@@ -80,7 +80,7 @@
 		 * Gets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
 		 *
 		 * @returns The XMPPConnection used
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
+		 * @see org.igniterealtime.xiff.core.XMPPConnection
 		 */
 		public function getConnection():XMPPConnection
 		{
Index: org/igniterealtime/xiff/conference/Room.as
===================================================================
--- org/igniterealtime/xiff/conference/Room.as	(revision 11020)
+++ org/igniterealtime/xiff/conference/Room.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,63 +21,63 @@
  *
  */
  
-package org.jivesoftware.xiff.conference
+package org.igniterealtime.xiff.conference
 {
 	import flash.events.Event;
 	
 	import mx.collections.ArrayCollection;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.*;
-	import org.jivesoftware.xiff.data.forms.FormExtension;
-	import org.jivesoftware.xiff.data.muc.*;
-	import org.jivesoftware.xiff.events.DisconnectionEvent;
-	import org.jivesoftware.xiff.events.MessageEvent;
-	import org.jivesoftware.xiff.events.PresenceEvent;
-	import org.jivesoftware.xiff.events.RoomEvent;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.core.XMPPConnection;
+	import org.igniterealtime.xiff.data.*;
+	import org.igniterealtime.xiff.data.forms.FormExtension;
+	import org.igniterealtime.xiff.data.muc.*;
+	import org.igniterealtime.xiff.events.DisconnectionEvent;
+	import org.igniterealtime.xiff.events.MessageEvent;
+	import org.igniterealtime.xiff.events.PresenceEvent;
+	import org.igniterealtime.xiff.events.RoomEvent;
 	
 	/**
 	 * Dispatched when the room subject changes.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent.SUBJECT_CHANGE
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.SUBJECT_CHANGE
 	 */
-	[Event( name="subjectChange", type="org.jivesoftware.xiff.events.RoomEvent" )]
+	[Event( name="subjectChange", type="org.igniterealtime.xiff.events.RoomEvent" )]
 	
 	/**
 	 * Dispatched whenever a new message intented for all room occupants is received. The 
 	 * <code>RoomEvent</code> class will contain an attribute <code>data</code> with the 
 	 * group message as an instance of the <code>Message</code> class.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event( name="groupMessage", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event( name="groupMessage", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched whenever a new private message is received. The <code>RoomEvent</code> class
 	 * contains an attribute <code>data</code> with the private message as an instance of the 
 	 * <code>Message</code> class.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="privateMessage", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="privateMessage", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when you have entered the room and messages that are sent
 	 * will be displayed to other users. The room's role and affiliation will
 	 * be visible from this point forward.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="roomJoin", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="roomJoin", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when the server acknoledges that you have the left the room.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="roomLeave", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="roomLeave", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when an affiliation list has been requested. The event object contains an 
@@ -86,94 +86,94 @@
 	 * <p>To grant or revoke permissions based on this list, only send the changes you wish to 
 	 * make, calling grant/revoke with the new affiliation and existing JID.</p>
 	 * 
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="affiliations", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="affiliations", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when an administration action failed.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 * @see org.jivesoftware.xiff.core.XMPPConnection.error
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
+	 * @see org.igniterealtime.xiff.core.XMPPConnection.error
 	 */
-	[Event(name="adminError", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="adminError", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when the room requires a password and the user did not supply one (or
 	 * the password provided is incorrect).
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="passwordError", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="passwordError", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when the room is members-only and the user is not on the member list.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="registrationReqError", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="registrationReqError", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched if the user attempted to join the room but was not allowed to do so because
 	 * they are banned (i.e., has an affiliation of "outcast").
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="bannedError", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="bannedError", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched if the room has reached its maximum number of occupants.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="maxUsersError", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="maxUsersError", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched if a user attempts to enter a room while it is "locked" (i.e., before the room
 	 * creator provides an initial configuration and therefore before the room officially exists).
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="lockedError", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="lockedError", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched whenever an occupant joins the room. The <code>RoomEvent</code> instance will 
 	 * contain an attribute <code>nickname</code> with the nickname of the occupant who joined.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="userJoin", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="userJoin", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched whenever an occpant leaves the room. The <code>RoomEvent</code> instance will
 	 * contain an attribute <code>nickname</code> with the nickname of the occupant who left.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="userDeparture", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="userDeparture", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when a user is kicked from the room.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="userKicked", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="userKicked", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when a user is banned from the room.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="userBanned", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="userBanned", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when the user's preferred nickname already exists in the room.  The 
 	 * <code>RoomEvent</code> will contain an attribute <code>nickname</code> with the nickname 
 	 * already existing in the room.
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="nickConflict", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="nickConflict", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when a room configuration form is required.  This can occur during the 
@@ -189,12 +189,12 @@
 	 * <code>type</code>: The type of the field to be displayed. Type will be a constant
 	 * from the <code>FormField</code> class.</p>
 	 * 
-	 * @see org.jivesoftware.xiff.data.forms.FormExtension
-	 * @see org.jivesoftware.xiff.data.forms.FormField
+	 * @see org.igniterealtime.xiff.data.forms.FormExtension
+	 * @see org.igniterealtime.xiff.data.forms.FormField
 	 * @see #configure
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="configureForm", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="configureForm", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Dispatched when an invite to this room has been declined by the invitee. The <code>RoomEvent</code>
@@ -204,9 +204,9 @@
 	 * <code>reason</code>: A string containing the reason to join the room<br />
 	 * <code>data</code>: The original message containing the decline</p>
 	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent
 	 */
-	[Event(name="declined", type="org.jivesoftware.xiff.events.RoomEvent")]
+	[Event(name="declined", type="org.igniterealtime.xiff.events.RoomEvent")]
 	
 	/**
 	 * Manages incoming and outgoing data from a conference room as part of multi-user conferencing (JEP-0045).
@@ -269,7 +269,7 @@
 		 * Sets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
 		 *
 		 * @param connection The XMPPConnection instance to use.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
+		 * @see org.igniterealtime.xiff.core.XMPPConnection
 		 */
 		public function set connection( connection:XMPPConnection ):void
 		{
@@ -294,7 +294,7 @@
 		 * Gets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
 		 *
 		 * @returns The XMPPConnection used
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
+		 * @see org.igniterealtime.xiff.core.XMPPConnection
 		 */
 		public function get connection():XMPPConnection
 		{
Index: org/igniterealtime/xiff/conference/RoomFile.as
===================================================================
--- org/igniterealtime/xiff/conference/RoomFile.as	(revision 11020)
+++ org/igniterealtime/xiff/conference/RoomFile.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.conference
+package org.igniterealtime.xiff.conference
 {
 	public class RoomFile
 	{
Index: org/igniterealtime/xiff/conference/RoomFileRepository.as
===================================================================
--- org/igniterealtime/xiff/conference/RoomFileRepository.as	(revision 11020)
+++ org/igniterealtime/xiff/conference/RoomFileRepository.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.conference
+package org.igniterealtime.xiff.conference
 {
 	import mx.collections.ArrayCollection;
 	
Index: org/igniterealtime/xiff/conference/RoomOccupant.as
===================================================================
--- org/igniterealtime/xiff/conference/RoomOccupant.as	(revision 11020)
+++ org/igniterealtime/xiff/conference/RoomOccupant.as	(working copy)
@@ -1,10 +1,10 @@
-package org.jivesoftware.xiff.conference
+package org.igniterealtime.xiff.conference
 {
 	import flash.events.EventDispatcher;
 	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.im.Contact;
-	import org.jivesoftware.xiff.data.im.RosterItemVO;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.data.im.Contact;
+	import org.igniterealtime.xiff.data.im.RosterItemVO;
 
 	public class RoomOccupant extends EventDispatcher implements Contact
 	{
Index: org/igniterealtime/xiff/core/AbstractJID.as
===================================================================
--- org/igniterealtime/xiff/core/AbstractJID.as	(revision 11020)
+++ org/igniterealtime/xiff/core/AbstractJID.as	(working copy)
@@ -18,7 +18,7 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {
   /**
    * This is a base class for the JID (Jabber ID) classes. It provides
Index: org/igniterealtime/xiff/core/Browser.as
===================================================================
--- org/igniterealtime/xiff/core/Browser.as	(revision 11020)
+++ org/igniterealtime/xiff/core/Browser.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright 2003-2009
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -18,13 +18,13 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.browse.BrowseExtension;
-	import org.jivesoftware.xiff.data.disco.InfoDiscoExtension;
-	import org.jivesoftware.xiff.data.disco.ItemDiscoExtension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IQ;
+	import org.igniterealtime.xiff.data.browse.BrowseExtension;
+	import org.igniterealtime.xiff.data.disco.InfoDiscoExtension;
+	import org.igniterealtime.xiff.data.disco.ItemDiscoExtension;
 	
 	/**
 	 * This class provides a means of querying for available services on an XMPP
Index: org/igniterealtime/xiff/core/EscapedJID.as
===================================================================
--- org/igniterealtime/xiff/core/EscapedJID.as	(revision 11020)
+++ org/igniterealtime/xiff/core/EscapedJID.as	(working copy)
@@ -18,7 +18,7 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {
   /**
    * This class provides access to a JID (Jabber ID) in escaped form.
Index: org/igniterealtime/xiff/core/UnescapedJID.as
===================================================================
--- org/igniterealtime/xiff/core/UnescapedJID.as	(revision 11020)
+++ org/igniterealtime/xiff/core/UnescapedJID.as	(working copy)
@@ -18,7 +18,7 @@
  * limitations under the License. 
  */
 
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {
   /**
    * This class provides access to a JID (Jabber ID) in unescaped form.
Index: org/igniterealtime/xiff/core/XMPPBOSHConnection.as
===================================================================
--- org/igniterealtime/xiff/core/XMPPBOSHConnection.as	(revision 11020)
+++ org/igniterealtime/xiff/core/XMPPBOSHConnection.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {
 	import flash.events.TimerEvent;
 	import flash.utils.Timer;
@@ -10,17 +10,17 @@
 	import mx.rpc.events.ResultEvent;
 	import mx.rpc.http.HTTPService;
 	
-	import org.jivesoftware.xiff.events.ConnectionSuccessEvent;
-	import org.jivesoftware.xiff.events.DisconnectionEvent;
-	import org.jivesoftware.xiff.events.IncomingDataEvent;
-	import org.jivesoftware.xiff.events.LoginEvent;
-	import org.jivesoftware.xiff.events.OutgoingDataEvent;
-	import org.jivesoftware.xiff.logging.LoggerFactory;
-	import org.jivesoftware.xiff.util.Callback;
+	import org.igniterealtime.xiff.events.ConnectionSuccessEvent;
+	import org.igniterealtime.xiff.events.DisconnectionEvent;
+	import org.igniterealtime.xiff.events.IncomingDataEvent;
+	import org.igniterealtime.xiff.events.LoginEvent;
+	import org.igniterealtime.xiff.events.OutgoingDataEvent;
+	import org.igniterealtime.xiff.logging.LoggerFactory;
+	import org.igniterealtime.xiff.util.Callback;
 	
 	public class XMPPBOSHConnection extends XMPPConnection
 	{
-		private static const logger:ILogger = LoggerFactory.getLogger("org.jivesoftware.xiff.core.XMPPBOSHConnection");
+		private static const logger:ILogger = LoggerFactory.getLogger("org.igniterealtime.xiff.core.XMPPBOSHConnection");
 		
 		private static const HTTP_PORT:int = 7070;
 		private static const HTTPS_PORT:int = 7443;
Index: org/igniterealtime/xiff/core/XMPPConnection.as
===================================================================
--- org/igniterealtime/xiff/core/XMPPConnection.as	(revision 11020)
+++ org/igniterealtime/xiff/core/XMPPConnection.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {	 
 	import flash.events.DataEvent;
 	import flash.events.Event;
@@ -36,94 +36,94 @@
 	
 	import mx.logging.ILogger;
 	
-	import org.jivesoftware.xiff.auth.Anonymous;
-	import org.jivesoftware.xiff.auth.External;
-	import org.jivesoftware.xiff.auth.Plain;
-	import org.jivesoftware.xiff.auth.SASLAuth;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.Message;
-	import org.jivesoftware.xiff.data.Presence;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.auth.AuthExtension;
-	import org.jivesoftware.xiff.data.bind.BindExtension;
-	import org.jivesoftware.xiff.data.forms.FormExtension;
-	import org.jivesoftware.xiff.data.register.RegisterExtension;
-	import org.jivesoftware.xiff.data.session.SessionExtension;
-	import org.jivesoftware.xiff.events.*;
-	import org.jivesoftware.xiff.exception.SerializationException;
-	import org.jivesoftware.xiff.logging.LoggerFactory;
+	import org.igniterealtime.xiff.auth.Anonymous;
+	import org.igniterealtime.xiff.auth.External;
+	import org.igniterealtime.xiff.auth.Plain;
+	import org.igniterealtime.xiff.auth.SASLAuth;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.IQ;
+	import org.igniterealtime.xiff.data.Message;
+	import org.igniterealtime.xiff.data.Presence;
+	import org.igniterealtime.xiff.data.XMPPStanza;
+	import org.igniterealtime.xiff.data.auth.AuthExtension;
+	import org.igniterealtime.xiff.data.bind.BindExtension;
+	import org.igniterealtime.xiff.data.forms.FormExtension;
+	import org.igniterealtime.xiff.data.register.RegisterExtension;
+	import org.igniterealtime.xiff.data.session.SessionExtension;
+	import org.igniterealtime.xiff.events.*;
+	import org.igniterealtime.xiff.exception.SerializationException;
+	import org.igniterealtime.xiff.logging.LoggerFactory;
 
 	/**
 	 * Dispatched when a password change is successful.
 	 * 
-	 * @eventType org.jivesoftware.xiff.events.ChangePasswordSuccessEvent.PASSWORD_SUCCESS
+	 * @eventType org.igniterealtime.xiff.events.ChangePasswordSuccessEvent.PASSWORD_SUCCESS
 	 */
-    [Event(name="changePasswordSuccess", type="org.jivesoftware.xiff.events.ChangePasswordSuccessEvent")]
+    [Event(name="changePasswordSuccess", type="org.igniterealtime.xiff.events.ChangePasswordSuccessEvent")]
     
     /**
      * Dispatched when the connection is successfully made to the server.
      * 
-     * @eventType org.jivesoftware.xiff.events.ConnectionSuccessEvent.CONNECT_SUCCESS
+     * @eventType org.igniterealtime.xiff.events.ConnectionSuccessEvent.CONNECT_SUCCESS
      */
-    [Event(name="connection", type="org.jivesoftware.xiff.events.ConnectionSuccessEvent")]
+    [Event(name="connection", type="org.igniterealtime.xiff.events.ConnectionSuccessEvent")]
     
     /**
      * Dispatched when there is a disconnection from the server.
      * 
-     * @eventType org.jivesoftware.xiff.events.DisconnectionEvent.DISCONNECT
+     * @eventType org.igniterealtime.xiff.events.DisconnectionEvent.DISCONNECT
      */
-    [Event(name="disconnection", type="org.jivesoftware.xiff.events.DisconnectionEvent")]
+    [Event(name="disconnection", type="org.igniterealtime.xiff.events.DisconnectionEvent")]
     
     /**
      * Dispatched when there is some type of XMPP error.
      * 
-     * @eventType org.jivesoftware.xiff.events.XIFFErrorEvent.XIFF_ERROR
+     * @eventType org.igniterealtime.xiff.events.XIFFErrorEvent.XIFF_ERROR
      */
-    [Event(name="error", type="org.jivesoftware.xiff.events.XIFFErrorEvent")]
+    [Event(name="error", type="org.igniterealtime.xiff.events.XIFFErrorEvent")]
     
     /**
      * Dispatched whenever there is incoming XML data.
      * 
-     * @eventType org.jivesoftware.xiff.events.IncomingDataEvent.INCOMING_DATA
+     * @eventType org.igniterealtime.xiff.events.IncomingDataEvent.INCOMING_DATA
      */
-    [Event(name="incomingData", type="org.jivesoftware.xiff.events.IncomingDataEvent")]
+    [Event(name="incomingData", type="org.igniterealtime.xiff.events.IncomingDataEvent")]
     
     /**
      * Dispatched on successful authentication (login) with the server.
      * 
-     * @eventType org.jivesoftware.xiff.events.LoginEvent.LOGIN
+     * @eventType org.igniterealtime.xiff.events.LoginEvent.LOGIN
      */
-    [Event(name="login", type="org.jivesoftware.xiff.events.LoginEvent")]
+    [Event(name="login", type="org.igniterealtime.xiff.events.LoginEvent")]
     
     /**
      * Dispatched on incoming messages.
      * 
-     * @eventType org.jivesoftware.xiff.events.MessageEvent.MESSAGE
+     * @eventType org.igniterealtime.xiff.events.MessageEvent.MESSAGE
      */
-    [Event(name="message", type="org.jivesoftware.xiff.events.MessageEvent")]
+    [Event(name="message", type="org.igniterealtime.xiff.events.MessageEvent")]
     
     /**
      * Dispatched whenever data is sent to the server.
      * 
-     * @eventType org.jivesoftware.xiff.events.OutgoingDataEvent.OUTGOING_DATA
+     * @eventType org.igniterealtime.xiff.events.OutgoingDataEvent.OUTGOING_DATA
      */
-    [Event(name="outgoingData", type="org.jivesoftware.xiff.events.OutgoingDataEvent")]
+    [Event(name="outgoingData", type="org.igniterealtime.xiff.events.OutgoingDataEvent")]
     
     /**
      * Dispatched on incoming presence data.
      * 
-     * @eventType org.jivesoftware.xiff.events.PresenceEvent.PRESENCE
+     * @eventType org.igniterealtime.xiff.events.PresenceEvent.PRESENCE
      */
-    [Event(name="presence", type="org.jivesoftware.xiff.events.PresenceEvent")]
+    [Event(name="presence", type="org.igniterealtime.xiff.events.PresenceEvent")]
     
     /**
      * Dispatched on when new user account registration is successful.
      * 
-     * @eventType org.jivesoftware.xiff.events.RegistrationSuccessEvent.REGISTRATION_SUCCESS
+     * @eventType org.igniterealtime.xiff.events.RegistrationSuccessEvent.REGISTRATION_SUCCESS
      */
-    [Event(name="registrationSuccess", type="org.jivesoftware.xiff.events.RegistrationSuccessEvent")]
+    [Event(name="registrationSuccess", type="org.igniterealtime.xiff.events.RegistrationSuccessEvent")]
     
     /**
      * This class is used to connect to and manage data coming from an XMPP server. Use one instance
@@ -131,7 +131,7 @@
      */ 
 	public class XMPPConnection extends EventDispatcher
 	{
-		private static const logger:ILogger = LoggerFactory.getLogger("org.jivesoftware.xiff.core.XMPPConnection");
+		private static const logger:ILogger = LoggerFactory.getLogger("org.igniterealtime.xiff.core.XMPPConnection");
 		
 		/**
 		 * @private
@@ -323,7 +323,7 @@
 		 * Sends data to the server. If the data to send cannot be serialized properly, this method throws a <code>SerializeException</code>.
 		 *
 		 * @param o The data to send. This must be an instance of a class that implements the ISerializable interface.
-		 * @see org.jivesoftware.xiff.data.ISerializable
+		 * @see org.igniterealtime.xiff.data.ISerializable
 		 * @example The following example sends a basic chat message to the user with the JID "sideshowbob@springfieldpenitentiary.gov".<br />
 		 * <pre>var msg:Message = new Message( "sideshowbob@springfieldpenitentiary.gov", null, "Hi Bob.", "<b>Hi Bob.</b>", Message.CHAT_TYPE );
 		 * myXMPPConnection.send( msg );</pre>
@@ -363,7 +363,7 @@
 		 * For login status, use the <code>isLoggedIn()</code> method.)
 		 * 
 		 * @return A boolean indicating whether the connection is active.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection#isLoggedIn
+		 * @see org.igniterealtime.xiff.core.XMPPConnection#isLoggedIn
 		 */
 		public function isActive():Boolean
 		{
@@ -374,7 +374,7 @@
 		 * Determines whether the user is connected and logged into the server.
 		 * 
 		 * @return A boolean indicating whether the user is logged in.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection#isActive
+		 * @see org.igniterealtime.xiff.core.XMPPConnection#isActive
 		 */
 		public function isLoggedIn():Boolean
 		{
Index: org/igniterealtime/xiff/core/XMPPSocketConnection.as
===================================================================
--- org/igniterealtime/xiff/core/XMPPSocketConnection.as	(revision 11020)
+++ org/igniterealtime/xiff/core/XMPPSocketConnection.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.core
+package org.igniterealtime.xiff.core
 {	 
 	import flash.events.Event;
 	import flash.events.IOErrorEvent;
@@ -31,10 +31,10 @@
 	
 	import mx.logging.ILogger;
 	
-	import org.jivesoftware.xiff.events.*;
-	import org.jivesoftware.xiff.logging.LoggerFactory;
-	import org.jivesoftware.xiff.util.SocketConn;
-	import org.jivesoftware.xiff.util.SocketDataEvent;
+	import org.igniterealtime.xiff.events.*;
+	import org.igniterealtime.xiff.logging.LoggerFactory;
+	import org.igniterealtime.xiff.util.SocketConn;
+	import org.igniterealtime.xiff.util.SocketDataEvent;
 	
 	/**
 	 * A child of <code>XMPPConnection</code>, this class makes use of the
@@ -42,11 +42,11 @@
 	 * This gets rid of issues related to the <code>XMLSocket</code>'s appending
 	 * of a null-byte to all outgoing data.
 	 * 
-	 * @see org.jivesoftware.xiff.core.XMPPConnection
+	 * @see org.igniterealtime.xiff.core.XMPPConnection
 	 */
 	public class XMPPSocketConnection extends XMPPConnection
 	{
-		private static const logger:ILogger = LoggerFactory.getLogger("org.jivesoftware.xiff.core.XMPPSocketConnection");
+		private static const logger:ILogger = LoggerFactory.getLogger("org.igniterealtime.xiff.core.XMPPSocketConnection");
 		
 		private var _incompleteRawXML: String = '';
 		
Index: org/igniterealtime/xiff/data/AbstractExtension.as
===================================================================
--- org/igniterealtime/xiff/data/AbstractExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/AbstractExtension.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.data
+package org.igniterealtime.xiff.data
 {
 	import flash.xml.XMLNode;
 
Index: org/igniterealtime/xiff/data/auth/AuthExtension.as
===================================================================
--- org/igniterealtime/xiff/data/auth/AuthExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/auth/AuthExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,17 +19,17 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.auth
+package org.igniterealtime.xiff.data.auth
 {	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.auth.SHA1;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.auth.SHA1;
 	
 	import flash.xml.XMLNode;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	/**
 	 * Implements <a href="http://www.jabber.org/jeps/jep-0078.html">JEP-0078<a> 
@@ -221,7 +221,7 @@
 		/**
 		 * The resource to use for authentication.
 		 *
-		 * @see org.jivesoftware.xiff.core.XMPPConnection#resource
+		 * @see org.igniterealtime.xiff.core.XMPPConnection#resource
 		 */
 		public function get resource():String
 		{
Index: org/igniterealtime/xiff/data/auth/SHA1.as
===================================================================
--- org/igniterealtime/xiff/data/auth/SHA1.as	(revision 11020)
+++ org/igniterealtime/xiff/data/auth/SHA1.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,7 +19,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.auth
+package org.igniterealtime.xiff.data.auth
 {
 	/**
 	 * A static class for SHA1 hash creation. Original ActionScript 1.0 version 
Index: org/igniterealtime/xiff/data/bind/BindExtension.as
===================================================================
--- org/igniterealtime/xiff/data/bind/BindExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/bind/BindExtension.as	(working copy)
@@ -1,13 +1,13 @@
-package org.jivesoftware.xiff.data.bind
+package org.igniterealtime.xiff.data.bind
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 
 	public class BindExtension extends Extension implements IExtension, ISerializable
 	{
Index: org/igniterealtime/xiff/data/browse/BrowseExtension.as
===================================================================
--- org/igniterealtime/xiff/data/browse/BrowseExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/browse/BrowseExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,14 +19,14 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.browse
+package org.igniterealtime.xiff.data.browse
 {
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
 	/**
 	 * Implements jabber:iq:browse namespace.  Use this extension to request the items
@@ -89,7 +89,7 @@
 		 * @param item BrowseItem which contains the info related to the browsed resource
 		 * @availability Flash Player 7
 		 * @returns the item added
-		 * @see org.jivesoftware.xiff.data.browse.BrowseItem
+		 * @see org.igniterealtime.xiff.data.browse.BrowseItem
 		 */
 		public function addItem(item:BrowseItem):BrowseItem
 		{
@@ -102,7 +102,7 @@
 		 *
 		 * @availability Flash Player 7
 		 * @returns array of BrowseItems
-		 * @see org.jivesoftware.xiff.data.browse.BrowseItem
+		 * @see org.igniterealtime.xiff.data.browse.BrowseItem
 		 */
 		public function get items():Array
 		{
@@ -113,7 +113,7 @@
 		 * ISerializable implementation which loads this extension from XML
 		 *
 		 * @availability Flash Player 7
-		 * @see org.jivesoftware.xiff.data.ISerializable
+		 * @see org.igniterealtime.xiff.data.ISerializable
 		 */
 		override public function serialize(parentNode:XMLNode):Boolean
 		{
@@ -133,7 +133,7 @@
 		 * ISerializable implementation which saves this extension to XML
 		 *
 		 * @availability Flash Player 7
-		 * @see org.jivesoftware.xiff.data.ISerializable
+		 * @see org.igniterealtime.xiff.data.ISerializable
 		 */
 		override public function deserialize(node:XMLNode):Boolean
 		{
Index: org/igniterealtime/xiff/data/browse/BrowseItem.as
===================================================================
--- org/igniterealtime/xiff/data/browse/BrowseItem.as	(revision 11020)
+++ org/igniterealtime/xiff/data/browse/BrowseItem.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,13 +19,13 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.browse
+package org.igniterealtime.xiff.data.browse
 {
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	/**
 	 * Class that representes a child resource of a browsed resource.
Index: org/igniterealtime/xiff/data/disco/DiscoExtension.as
===================================================================
--- org/igniterealtime/xiff/data/disco/DiscoExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/disco/DiscoExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,14 +19,14 @@
  *
  */
 	
-package org.jivesoftware.xiff.data.disco
+package org.igniterealtime.xiff.data.disco
 {
 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
 	/**
 	 * Base class for service discovery extensions.
Index: org/igniterealtime/xiff/data/disco/InfoDiscoExtension.as
===================================================================
--- org/igniterealtime/xiff/data/disco/InfoDiscoExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/disco/InfoDiscoExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,13 +19,13 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.disco
+package org.igniterealtime.xiff.data.disco
 {
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
 	
 	/**
 	 * Implements <a href="http://www.jabber.org/jeps/jep-0030.html">JEP-0030<a> for service info discovery.
Index: org/igniterealtime/xiff/data/disco/ItemDiscoExtension.as
===================================================================
--- org/igniterealtime/xiff/data/disco/ItemDiscoExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/disco/ItemDiscoExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -19,13 +19,13 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.disco
+package org.igniterealtime.xiff.data.disco
 {
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
 	
 	/**
 	 * Implements <a href="http://www.jabber.org/jeps/jep-0030.html">JEP-0030<a> 
Index: org/igniterealtime/xiff/data/events/MessageEventExtension.as
===================================================================
--- org/igniterealtime/xiff/data/events/MessageEventExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/events/MessageEventExtension.as	(working copy)
@@ -1,7 +1,7 @@
-package org.jivesoftware.xiff.data.events
+package org.igniterealtime.xiff.data.events
 {
-import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	import flash.xml.XMLNode;
 	
 	public class MessageEventExtension implements IExtension, ISerializable {
Index: org/igniterealtime/xiff/data/Extension.as
===================================================================
--- org/igniterealtime/xiff/data/Extension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/Extension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,11 +21,11 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data
+package org.igniterealtime.xiff.data
 {
 	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	import flash.xml.XMLNode;
 	
 	/**
Index: org/igniterealtime/xiff/data/ExtensionClassRegistry.as
===================================================================
--- org/igniterealtime/xiff/data/ExtensionClassRegistry.as	(revision 11020)
+++ org/igniterealtime/xiff/data/ExtensionClassRegistry.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -22,7 +22,7 @@
 	 *
 	 */
 	 
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.IExtension;
 	import flash.xml.XMLDocument;
 	
 	/**
Index: org/igniterealtime/xiff/data/ExtensionContainer.as
===================================================================
--- org/igniterealtime/xiff/data/ExtensionContainer.as	(revision 11020)
+++ org/igniterealtime/xiff/data/ExtensionContainer.as	(working copy)
@@ -1,5 +1,5 @@
-﻿
-package org.jivesoftware.xiff.data{
+
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -23,8 +23,8 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.IExtendable;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.IExtendable;
 	 
 	/**
 	 * Contains the implementation for a generic extension container.  Use the static method "decorate" to implement the IExtendable interface on a class.
Index: org/igniterealtime/xiff/data/forms/FormExtension.as
===================================================================
--- org/igniterealtime/xiff/data/forms/FormExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/forms/FormExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.forms{
+package org.igniterealtime.xiff.data.forms{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -23,11 +23,11 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	/**
 	 * Implements the base functionality shared by all MUC extensions
Index: org/igniterealtime/xiff/data/forms/FormField.as
===================================================================
--- org/igniterealtime/xiff/data/forms/FormField.as	(revision 11020)
+++ org/igniterealtime/xiff/data/forms/FormField.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.forms{
+package org.igniterealtime.xiff.data.forms{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -23,8 +23,8 @@
 	 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	/**
 	 * This class is used by the FormExtension class for managing fields
@@ -35,7 +35,7 @@
 	 * @author Sean Treadway
 	 * @since 2.0.0
 	 * @availability Flash Player 7
-	 * @see org.jivesoftware.xiff.data.forms.FormExtension
+	 * @see org.igniterealtime.xiff.data.forms.FormExtension
 	 * @see http://www.jabber.org/jeps/jep-0004.html
 	 * @param parent The parent XMLNode
 	 * @toc-path Extensions/Instant Messaging
Index: org/igniterealtime/xiff/data/id/IIDGenerator.as
===================================================================
--- org/igniterealtime/xiff/data/id/IIDGenerator.as	(revision 11020)
+++ org/igniterealtime/xiff/data/id/IIDGenerator.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -20,14 +20,14 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.id
+package org.igniterealtime.xiff.data.id
 {	
 	/**
 	 * To use custom ID generators call the static function on the
 	 * XMPPStanza class with an instance that implements IIDGenerator.
 	 * 
 	 * @example <code>XMPPStanza.setIDGenerator( 
-	 * 	new org.jivesoftware.xiff.data.id.SharedObjectGenerator() );</code>
+	 * 	new org.igniterealtime.xiff.data.id.SharedObjectGenerator() );</code>
 	 */
 	public interface IIDGenerator
 	{
Index: org/igniterealtime/xiff/data/id/IncrementalGenerator.as
===================================================================
--- org/igniterealtime/xiff/data/id/IncrementalGenerator.as	(revision 11020)
+++ org/igniterealtime/xiff/data/id/IncrementalGenerator.as	(working copy)
@@ -20,9 +20,9 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.id
+package org.igniterealtime.xiff.data.id
 {
-	import org.jivesoftware.xiff.data.id.IIDGenerator;
+	import org.igniterealtime.xiff.data.id.IIDGenerator;
 	
 	/**
 	 * Uses a simple incrementation of a static variable to generate new IDs.
Index: org/igniterealtime/xiff/data/id/SharedObjectGenerator.as
===================================================================
--- org/igniterealtime/xiff/data/id/SharedObjectGenerator.as	(revision 11020)
+++ org/igniterealtime/xiff/data/id/SharedObjectGenerator.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Sean Voisen <sean@voisen.org>
  * Sean Treadway <seant@oncotype.dk>
@@ -20,10 +20,10 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data.id
+package org.igniterealtime.xiff.data.id
 {
 	
-	import org.jivesoftware.xiff.data.id.IIDGenerator;
+	import org.igniterealtime.xiff.data.id.IIDGenerator;
 	import flash.net.SharedObject;
 	
 	/**
Index: org/igniterealtime/xiff/data/IExtendable.as
===================================================================
--- org/igniterealtime/xiff/data/IExtendable.as	(revision 11020)
+++ org/igniterealtime/xiff/data/IExtendable.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -22,7 +22,7 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.IExtension;
 	
 	/**
 	 * This interface provides access to contained extensions and methods to modify the contained extensions.  
@@ -30,8 +30,8 @@
 	 *
 	 * @author Sean Voisen
 	 * @since 2.0.0
-	 * @see org.jivesoftware.xiff.data.ExtensionContainer
-	 * @see org.jivesoftware.xiff.data.IExtension
+	 * @see org.igniterealtime.xiff.data.ExtensionContainer
+	 * @see org.igniterealtime.xiff.data.IExtension
 	 * @availability Flash Player 7
 	 * @toc-path Interfaces
 	 * @toc-sort 1
Index: org/igniterealtime/xiff/data/IExtension.as
===================================================================
--- org/igniterealtime/xiff/data/IExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/IExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
Index: org/igniterealtime/xiff/data/im/Contact.as
===================================================================
--- org/igniterealtime/xiff/data/im/Contact.as	(revision 11020)
+++ org/igniterealtime/xiff/data/im/Contact.as	(working copy)
@@ -1,8 +1,8 @@
-package org.jivesoftware.xiff.data.im
+package org.igniterealtime.xiff.data.im
 {
 	import mx.core.IPropertyChangeNotifier;
 	
-	import org.jivesoftware.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.core.UnescapedJID;
 	
 	public interface Contact extends IPropertyChangeNotifier
 	{
Index: org/igniterealtime/xiff/data/im/RosterExtension.as
===================================================================
--- org/igniterealtime/xiff/data/im/RosterExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/im/RosterExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.im{
+package org.igniterealtime.xiff.data.im{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,11 +24,11 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	 
 	/**
 	 * An IQ extension for roster data. Roster data is typically any data
Index: org/igniterealtime/xiff/data/im/RosterGroup.as
===================================================================
--- org/igniterealtime/xiff/data/im/RosterGroup.as	(revision 11020)
+++ org/igniterealtime/xiff/data/im/RosterGroup.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.data.im
+package org.igniterealtime.xiff.data.im
 {
 	/*
 	 * Copyright (C) 2008
Index: org/igniterealtime/xiff/data/im/RosterItem.as
===================================================================
--- org/igniterealtime/xiff/data/im/RosterItem.as	(revision 11020)
+++ org/igniterealtime/xiff/data/im/RosterItem.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.im{
+package org.igniterealtime.xiff.data.im{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,9 +24,9 @@
 	 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	/**
 	 * This class is used internally by the RosterExtension class for managing items
@@ -37,7 +37,7 @@
 	 * @author Sean Voisen
 	 * @since 2.0.0
 	 * @availability Flash Player 7
-	 * @see org.jivesoftware.xiff.data.im.RosterExtension
+	 * @see org.igniterealtime.xiff.data.im.RosterExtension
 	 * @param parent The parent XMLNode
 	 * @toc-path Extensions/Instant Messaging
 	 * @toc-sort 1/2
Index: org/igniterealtime/xiff/data/im/RosterItemVO.as
===================================================================
--- org/igniterealtime/xiff/data/im/RosterItemVO.as	(revision 11020)
+++ org/igniterealtime/xiff/data/im/RosterItemVO.as	(working copy)
@@ -1,11 +1,11 @@
-package org.jivesoftware.xiff.data.im
+package org.igniterealtime.xiff.data.im
 {
   import flash.events.Event;
   import flash.events.EventDispatcher;
 
   import mx.events.PropertyChangeEvent;
 
-  import org.jivesoftware.xiff.core.UnescapedJID;
+  import org.igniterealtime.xiff.core.UnescapedJID;
 
   public class RosterItemVO extends EventDispatcher implements Contact
   {
Index: org/igniterealtime/xiff/data/INodeProxy.as
===================================================================
--- org/igniterealtime/xiff/data/INodeProxy.as	(revision 11020)
+++ org/igniterealtime/xiff/data/INodeProxy.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
Index: org/igniterealtime/xiff/data/IQ.as
===================================================================
--- org/igniterealtime/xiff/data/IQ.as	(revision 11020)
+++ org/igniterealtime/xiff/data/IQ.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,11 +21,11 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data
+package org.igniterealtime.xiff.data
 {
 	
 	import flash.xml.XMLNode;
-	import org.jivesoftware.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.core.EscapedJID;
 	
 	/**
 	 * A class for abstraction and encapsulation of IQ (info-query) data.
Index: org/igniterealtime/xiff/data/ISerializable.as
===================================================================
--- org/igniterealtime/xiff/data/ISerializable.as	(revision 11020)
+++ org/igniterealtime/xiff/data/ISerializable.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
Index: org/igniterealtime/xiff/data/Message.as
===================================================================
--- org/igniterealtime/xiff/data/Message.as	(revision 11020)
+++ org/igniterealtime/xiff/data/Message.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,14 +21,14 @@
  *
  */
 	 
-package org.jivesoftware.xiff.data
+package org.igniterealtime.xiff.data
 {
 	 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.muc.MUCUserExtension;
-	import org.jivesoftware.xiff.data.xhtml.XHTMLExtension;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.muc.MUCUserExtension;
+	import org.igniterealtime.xiff.data.xhtml.XHTMLExtension;
 	
 	/**
 	 * A class for abstraction and encapsulation of message data.
@@ -166,7 +166,7 @@
 		/**
 		 * The message body in XHTML format. Internally, this uses the XHTML data extension.
 		 *
-		 * @see org.jivesoftware.xiff.data.xhtml.XHTMLExtension
+		 * @see org.igniterealtime.xiff.data.xhtml.XHTMLExtension
 		 */
 		public function get htmlBody():String
 		{
Index: org/igniterealtime/xiff/data/muc/MUC.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUC.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUC.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -49,11 +49,11 @@
 	 * @toc-sort 1/2
 	 */
 	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.muc.MUCExtension;
-	import org.jivesoftware.xiff.data.muc.MUCUserExtension;
-	import org.jivesoftware.xiff.data.muc.MUCOwnerExtension;
-	import org.jivesoftware.xiff.data.muc.MUCAdminExtension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.muc.MUCExtension;
+	import org.igniterealtime.xiff.data.muc.MUCUserExtension;
+	import org.igniterealtime.xiff.data.muc.MUCOwnerExtension;
+	import org.igniterealtime.xiff.data.muc.MUCAdminExtension;
 	
 	public class MUC
 	{
Index: org/igniterealtime/xiff/data/muc/MUCAdminExtension.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCAdminExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCAdminExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -22,10 +22,10 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
-	import org.jivesoftware.xiff.data.muc.MUCBaseExtension;
+	import org.igniterealtime.xiff.data.muc.MUCBaseExtension;
 	import flash.xml.XMLNode;
 	
 	/**
Index: org/igniterealtime/xiff/data/muc/MUCBaseExtension.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCBaseExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCBaseExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,12 +24,12 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtendable;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtendable;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
 	/**
 	 * Implements the base functionality shared by all MUC extensions
Index: org/igniterealtime/xiff/data/muc/MUCExtension.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,9 +24,9 @@
 	 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
 	/**
 	 * Implements the base MUC protocol schema from <a href="http://www.xmpp.org/extensions/xep-0045.html">XEP-0045<a> for multi-user chat.
Index: org/igniterealtime/xiff/data/muc/MUCItem.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCItem.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCItem.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,9 +24,9 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	/**
 	 * This class is used by the MUCExtension for internal representation of
Index: org/igniterealtime/xiff/data/muc/MUCOwnerExtension.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCOwnerExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCOwnerExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,8 +24,8 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.IExtension;
 	
 	/**
 	 * Implements the administration command data model in <a href="http://www.jabber.org/jeps/jep-0045.html">JEP-0045<a> for multi-user chat.
Index: org/igniterealtime/xiff/data/muc/MUCStatus.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCStatus.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCStatus.as	(working copy)
@@ -1,8 +1,8 @@
-package org.jivesoftware.xiff.data.muc
+package org.igniterealtime.xiff.data.muc
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
 	public class MUCStatus
 	{
Index: org/igniterealtime/xiff/data/muc/MUCUserExtension.as
===================================================================
--- org/igniterealtime/xiff/data/muc/MUCUserExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/muc/MUCUserExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.muc{
+package org.igniterealtime.xiff.data.muc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,8 +24,8 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.IExtension;
 	
 	/**
 	 * Implements the base MUC user protocol schema from <a href="http://www.xmpp.org/extensions/xep-0045.html">XEP-0045<a> for multi-user chat.
Index: org/igniterealtime/xiff/data/Presence.as
===================================================================
--- org/igniterealtime/xiff/data/Presence.as	(revision 11020)
+++ org/igniterealtime/xiff/data/Presence.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,7 +24,7 @@
 	 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.core.EscapedJID;
 	
 	/**
 	 * This class provides encapsulation for manipulation of presence data for sending and receiving.
Index: org/igniterealtime/xiff/data/privatedata/PrivateDataExtension.as
===================================================================
--- org/igniterealtime/xiff/data/privatedata/PrivateDataExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/privatedata/PrivateDataExtension.as	(working copy)
@@ -1,11 +1,11 @@
-package org.jivesoftware.xiff.data.privatedata
+package org.igniterealtime.xiff.data.privatedata
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.privatedata.IPrivatePayload;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.privatedata.IPrivatePayload;
 
 	public class PrivateDataExtension implements IExtension, ISerializable
 	{
Index: org/igniterealtime/xiff/data/register/RegisterExtension.as
===================================================================
--- org/igniterealtime/xiff/data/register/RegisterExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/register/RegisterExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.register{
+package org.igniterealtime.xiff.data.register{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,10 +24,10 @@
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 		
 	/**
 	 * Implements jabber:iq:register namespace.  Use this to create new accounts on the jabber server.
Index: org/igniterealtime/xiff/data/rpc/RPCExtension.as
===================================================================
--- org/igniterealtime/xiff/data/rpc/RPCExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/rpc/RPCExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.rpc{
+package org.igniterealtime.xiff.data.rpc{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -21,11 +21,11 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.rpc.XMLRPC;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.rpc.XMLRPC;
 	import flash.xml.XMLNode;
 	
 	/**
@@ -121,7 +121,7 @@
 		/**
 		 * Interface method, returning the namespace for this extension
 		 *
-		 * @see org.jivesoftware.xiff.data.IExtension
+		 * @see org.igniterealtime.xiff.data.IExtension
 		 * @availability Flash Player 7
 		 */
 		public function getNS():String
@@ -132,7 +132,7 @@
 		/**
 		 * Interface method, returning the namespace for this extension
 		 *
-		 * @see org.jivesoftware.xiff.data.IExtension
+		 * @see org.igniterealtime.xiff.data.IExtension
 		 * @availability Flash Player 7
 		 */
 		public function getElementName():String
@@ -153,7 +153,7 @@
 		/**
 		 * Interface method, returning the namespace for this extension
 		 *
-		 * @see org.jivesoftware.xiff.data.ISerializable
+		 * @see org.igniterealtime.xiff.data.ISerializable
 		 * @availability Flash Player 7
 		 */
 		public function serialize( parent:XMLNode ):Boolean
@@ -167,7 +167,7 @@
 		/**
 		 * Interface method, returning the namespace for this extension
 		 *
-		 * @see org.jivesoftware.xiff.data.ISerializable
+		 * @see org.igniterealtime.xiff.data.ISerializable
 		 * @availability Flash Player 7
 		 */
 		public function deserialize( node:XMLNode ):Boolean
Index: org/igniterealtime/xiff/data/rpc/XMLRPC.as
===================================================================
--- org/igniterealtime/xiff/data/rpc/XMLRPC.as	(revision 11020)
+++ org/igniterealtime/xiff/data/rpc/XMLRPC.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.rpc{
+package org.igniterealtime.xiff.data.rpc{
 	import flash.xml.XMLDocument;
 	import flash.xml.XMLNode;
 	
Index: org/igniterealtime/xiff/data/search/SearchExtension.as
===================================================================
--- org/igniterealtime/xiff/data/search/SearchExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/search/SearchExtension.as	(working copy)
@@ -1,12 +1,12 @@
-package org.jivesoftware.xiff.data.search{
+package org.igniterealtime.xiff.data.search{
 	
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.forms.FormExtension;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.forms.FormExtension;
 		
 	/**
 	 * Implements jabber:iq:search namespace.  Use this to perform user searches.
Index: org/igniterealtime/xiff/data/search/SearchItem.as
===================================================================
--- org/igniterealtime/xiff/data/search/SearchItem.as	(revision 11020)
+++ org/igniterealtime/xiff/data/search/SearchItem.as	(working copy)
@@ -1,7 +1,7 @@
-package org.jivesoftware.xiff.data.search{
+package org.igniterealtime.xiff.data.search{
 	
-	import org.jivesoftware.xiff.data.XMLStanza;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.ISerializable;
 	import flash.xml.XMLNode;
 	
 	/**
Index: org/igniterealtime/xiff/data/session/SessionExtension.as
===================================================================
--- org/igniterealtime/xiff/data/session/SessionExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/session/SessionExtension.as	(working copy)
@@ -1,12 +1,12 @@
-package org.jivesoftware.xiff.data.session
+package org.igniterealtime.xiff.data.session
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 
 	public class SessionExtension extends Extension implements IExtension, ISerializable
 	{
Index: org/igniterealtime/xiff/data/sharedgroups/SharedGroupsExtension.as
===================================================================
--- org/igniterealtime/xiff/data/sharedgroups/SharedGroupsExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/sharedgroups/SharedGroupsExtension.as	(working copy)
@@ -1,8 +1,8 @@
-package org.jivesoftware.xiff.data.sharedgroups
+package org.igniterealtime.xiff.data.sharedgroups
 {
 	import flash.xml.XMLNode;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.IExtension;
 
 	public class SharedGroupsExtension implements IExtension, ISerializable
 	{
Index: org/igniterealtime/xiff/data/vcard/VCardExtension.as
===================================================================
--- org/igniterealtime/xiff/data/vcard/VCardExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/vcard/VCardExtension.as	(working copy)
@@ -1,10 +1,10 @@
-package org.jivesoftware.xiff.data.vcard
+package org.igniterealtime.xiff.data.vcard
 {
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
 	public class VCardExtension extends Extension implements IExtension, ISerializable {
 		
Index: org/igniterealtime/xiff/data/whiteboard/Fill.as
===================================================================
--- org/igniterealtime/xiff/data/whiteboard/Fill.as	(revision 11020)
+++ org/igniterealtime/xiff/data/whiteboard/Fill.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.data.whiteboard{
+package org.igniterealtime.xiff.data.whiteboard{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -21,7 +21,7 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.ISerializable;
 	import flash.xml.XMLNode;
 	
 	/**
Index: org/igniterealtime/xiff/data/whiteboard/Path.as
===================================================================
--- org/igniterealtime/xiff/data/whiteboard/Path.as	(revision 11020)
+++ org/igniterealtime/xiff/data/whiteboard/Path.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.data.whiteboard{
+package org.igniterealtime.xiff.data.whiteboard{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -21,12 +21,12 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.XMLStanza;
 	
-	import org.jivesoftware.xiff.data.whiteboard.WhiteboardExtension;
-	import org.jivesoftware.xiff.data.whiteboard.Stroke;
-	import org.jivesoftware.xiff.data.whiteboard.Fill;
+	import org.igniterealtime.xiff.data.whiteboard.WhiteboardExtension;
+	import org.igniterealtime.xiff.data.whiteboard.Stroke;
+	import org.igniterealtime.xiff.data.whiteboard.Fill;
 	import flash.xml.XMLNode;
 	 
 	/**
@@ -194,7 +194,7 @@
 	     * The Stroke object that contains the properties describing the stroke of this
 	     * path
 	     *
-	     * @see org.jivesoftware.xiff.data.whiteboard.Stroke
+	     * @see org.igniterealtime.xiff.data.whiteboard.Stroke
 		 * @availability Flash Player 7
 	     */
 	    public function get stroke():Stroke { return myStroke; }
@@ -203,7 +203,7 @@
 	     * The Fill object that contains the properties describing the fill of this
 	     * path
 	     *
-	     * @see org.jivesoftware.xiff.data.whiteboard.Fill
+	     * @see org.igniterealtime.xiff.data.whiteboard.Fill
 		 * @availability Flash Player 7
 	     */
 	    public function get fill():Fill { return myFill; }
Index: org/igniterealtime/xiff/data/whiteboard/Stroke.as
===================================================================
--- org/igniterealtime/xiff/data/whiteboard/Stroke.as	(revision 11020)
+++ org/igniterealtime/xiff/data/whiteboard/Stroke.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.data.whiteboard{
+package org.igniterealtime.xiff.data.whiteboard{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -21,7 +21,7 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.ISerializable;
 	import flash.xml.XMLNode;
 	
 	/**
Index: org/igniterealtime/xiff/data/whiteboard/WhiteboardExtension.as
===================================================================
--- org/igniterealtime/xiff/data/whiteboard/WhiteboardExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/whiteboard/WhiteboardExtension.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.data.whiteboard{
+package org.igniterealtime.xiff.data.whiteboard{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Sean Voisen <sean@voisen.org>
@@ -21,13 +21,13 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
 	
-	import org.jivesoftware.xiff.data.whiteboard.Path;
+	import org.igniterealtime.xiff.data.whiteboard.Path;
 	import flash.xml.XMLNode;
 	
 	 
Index: org/igniterealtime/xiff/data/xhtml/XHTMLExtension.as
===================================================================
--- org/igniterealtime/xiff/data/xhtml/XHTMLExtension.as	(revision 11020)
+++ org/igniterealtime/xiff/data/xhtml/XHTMLExtension.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data.xhtml{
+package org.igniterealtime.xiff.data.xhtml{
 	
 	/*
 	 * Copyright (C) 2003-2007 
@@ -26,10 +26,10 @@
 	import flash.xml.XMLDocument;
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 	
 	/**
 	 * This class provides an extension for XHTML body text in messages.
Index: org/igniterealtime/xiff/data/XMLStanza.as
===================================================================
--- org/igniterealtime/xiff/data/XMLStanza.as	(revision 11020)
+++ org/igniterealtime/xiff/data/XMLStanza.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -22,7 +22,7 @@
 	 *
 	 */
 	
-	import org.jivesoftware.xiff.data.INodeProxy;
+	import org.igniterealtime.xiff.data.INodeProxy;
 	import flash.xml.XMLNode;
 	import flash.xml.XMLDocument;
 	
Index: org/igniterealtime/xiff/data/XMPPStanza.as
===================================================================
--- org/igniterealtime/xiff/data/XMPPStanza.as	(revision 11020)
+++ org/igniterealtime/xiff/data/XMPPStanza.as	(working copy)
@@ -1,4 +1,4 @@
-﻿package org.jivesoftware.xiff.data{
+package org.igniterealtime.xiff.data{
 	/*
 	 * Copyright (C) 2003-2007 
 	 * Nick Velloff <nick.velloff@gmail.com>
@@ -24,9 +24,9 @@
 	 
 	import flash.xml.XMLNode;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.id.IIDGenerator;
-	import org.jivesoftware.xiff.data.id.IncrementalGenerator;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.data.id.IIDGenerator;
+	import org.igniterealtime.xiff.data.id.IncrementalGenerator;
 	
 	/**
 	 * The base class for all XMPP stanza data classes.
@@ -69,7 +69,7 @@
 		 * (Static method) Generates a unique ID for the stanza. ID generation is handled using
 		 * a variety of mechanisms, but the default for the library uses the IncrementalGenerator.
 		 *
-		 * @see org.jivesoftware.xiff.data.id.IncrementalGenerator
+		 * @see org.igniterealtime.xiff.data.id.IncrementalGenerator
 		 * @availability Flash Player 7
 		 * @param prefix The prefix for the ID to be generated
 		 * @return The generated ID
@@ -83,7 +83,7 @@
 		/**
 	 	 * (Static method) Sets the ID generator for this stanza type. ID generators must implement
 		 * the IIDGenerator interface. The XIFF library comes with a few default
-		 * ID generators that have already been implemented (see org.jivesoftware.xiff.data.id.*).
+		 * ID generators that have already been implemented (see org.igniterealtime.xiff.data.id.*).
 		 * 
 		 * Setting the ID generator by stanza type is useful if you'd like to use
 		 * different ID generation schemes for each type. For instance, messages could
@@ -93,8 +93,8 @@
 		 * @availability Flash Player 7
 		 * @param generator The ID generator class
 		 * @example The following sets the ID generator for the Message stanza type to the IncrementalGenerator
-		 * class found in org.jivesoftware.xiff.data.id.IncrementalGenerator:
-		 * <pre>Message.setIDGenerator( org.jivesoftware.xiff.data.id.IncrementalGenerator );</pre>
+		 * class found in org.igniterealtime.xiff.data.id.IncrementalGenerator:
+		 * <pre>Message.setIDGenerator( org.igniterealtime.xiff.data.id.IncrementalGenerator );</pre>
 		 */
 		public static function setIDGenerator( generator:IIDGenerator ):void
 		{
Index: org/igniterealtime/xiff/events/BookmarkChangedEvent.as
===================================================================
--- org/igniterealtime/xiff/events/BookmarkChangedEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/BookmarkChangedEvent.as	(working copy)
@@ -1,9 +1,9 @@
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	
-	import org.jivesoftware.xiff.bookmark.GroupChatBookmark;
-	import org.jivesoftware.xiff.bookmark.UrlBookmark;
+	import org.igniterealtime.xiff.bookmark.GroupChatBookmark;
+	import org.igniterealtime.xiff.bookmark.UrlBookmark;
 
 	public class BookmarkChangedEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/BookmarkRetrievedEvent.as
===================================================================
--- org/igniterealtime/xiff/events/BookmarkRetrievedEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/BookmarkRetrievedEvent.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 
Index: org/igniterealtime/xiff/events/ChangePasswordSuccessEvent.as
===================================================================
--- org/igniterealtime/xiff/events/ChangePasswordSuccessEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/ChangePasswordSuccessEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {	 
 	import flash.events.Event;
 	public class ChangePasswordSuccessEvent extends Event
Index: org/igniterealtime/xiff/events/ConnectionSuccessEvent.as
===================================================================
--- org/igniterealtime/xiff/events/ConnectionSuccessEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/ConnectionSuccessEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 
Index: org/igniterealtime/xiff/events/DisconnectionEvent.as
===================================================================
--- org/igniterealtime/xiff/events/DisconnectionEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/DisconnectionEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	
Index: org/igniterealtime/xiff/events/IncomingDataEvent.as
===================================================================
--- org/igniterealtime/xiff/events/IncomingDataEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/IncomingDataEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	import flash.xml.XMLDocument;
Index: org/igniterealtime/xiff/events/InviteEvent.as
===================================================================
--- org/igniterealtime/xiff/events/InviteEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/InviteEvent.as	(working copy)
@@ -21,13 +21,13 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	
-	import org.jivesoftware.xiff.conference.Room;
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.Message;
+	import org.igniterealtime.xiff.conference.Room;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.data.Message;
 
 	public class InviteEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/IQEvent.as
===================================================================
--- org/igniterealtime/xiff/events/IQEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/IQEvent.as	(working copy)
@@ -21,11 +21,11 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.IQ;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.IQ;
 	
 	public class IQEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/LoginEvent.as
===================================================================
--- org/igniterealtime/xiff/events/LoginEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/LoginEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 
Index: org/igniterealtime/xiff/events/MessageEvent.as
===================================================================
--- org/igniterealtime/xiff/events/MessageEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/MessageEvent.as	(working copy)
@@ -21,10 +21,10 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
-	import org.jivesoftware.xiff.data.Message;
+	import org.igniterealtime.xiff.data.Message;
 	
 	public class MessageEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/ModelChangedEvent.as
===================================================================
--- org/igniterealtime/xiff/events/ModelChangedEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/ModelChangedEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 
Index: org/igniterealtime/xiff/events/OutgoingDataEvent.as
===================================================================
--- org/igniterealtime/xiff/events/OutgoingDataEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/OutgoingDataEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	import flash.xml.XMLDocument;
Index: org/igniterealtime/xiff/events/PresenceEvent.as
===================================================================
--- org/igniterealtime/xiff/events/PresenceEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/PresenceEvent.as	(working copy)
@@ -21,10 +21,10 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
-	import org.jivesoftware.xiff.data.Presence;
+	import org.igniterealtime.xiff.data.Presence;
 
 	public class PresenceEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/RegistrationFieldsEvent.as
===================================================================
--- org/igniterealtime/xiff/events/RegistrationFieldsEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/RegistrationFieldsEvent.as	(working copy)
@@ -21,10 +21,10 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
-	import org.jivesoftware.xiff.data.register.RegisterExtension;
+	import org.igniterealtime.xiff.data.register.RegisterExtension;
 
 	public class RegistrationFieldsEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/RegistrationSuccessEvent.as
===================================================================
--- org/igniterealtime/xiff/events/RegistrationSuccessEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/RegistrationSuccessEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 
Index: org/igniterealtime/xiff/events/RoomEvent.as
===================================================================
--- org/igniterealtime/xiff/events/RoomEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/RoomEvent.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 
Index: org/igniterealtime/xiff/events/RosterEvent.as
===================================================================
--- org/igniterealtime/xiff/events/RosterEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/RosterEvent.as	(working copy)
@@ -21,11 +21,11 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	
-	import org.jivesoftware.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.core.UnescapedJID;
 
 	public class RosterEvent extends Event
 	{
Index: org/igniterealtime/xiff/events/SearchPrepEvent.as
===================================================================
--- org/igniterealtime/xiff/events/SearchPrepEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/SearchPrepEvent.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	
Index: org/igniterealtime/xiff/events/VCardEvent.as
===================================================================
--- org/igniterealtime/xiff/events/VCardEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/VCardEvent.as	(working copy)
@@ -1,8 +1,8 @@
-package org.jivesoftware.xiff.events {
+package org.igniterealtime.xiff.events {
 	
 import flash.events.*;
 
-import org.jivesoftware.xiff.vcard.VCard;
+import org.igniterealtime.xiff.vcard.VCard;
 	
 public class VCardEvent extends Event {
  
Index: org/igniterealtime/xiff/events/XIFFErrorEvent.as
===================================================================
--- org/igniterealtime/xiff/events/XIFFErrorEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/events/XIFFErrorEvent.as	(working copy)
@@ -21,11 +21,11 @@
  *
  */
 	 
-package org.jivesoftware.xiff.events
+package org.igniterealtime.xiff.events
 {
 	import flash.events.Event;
 	
-	import org.jivesoftware.xiff.data.Extension;
+	import org.igniterealtime.xiff.data.Extension;
 
 	public class XIFFErrorEvent extends Event
 	{
Index: org/igniterealtime/xiff/exception/SerializationException.as
===================================================================
--- org/igniterealtime/xiff/exception/SerializationException.as	(revision 11020)
+++ org/igniterealtime/xiff/exception/SerializationException.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.exception
+package org.igniterealtime.xiff.exception
 {	
 	/**
 	 * This exception is thrown whenever there is a problem serializing or 
Index: org/igniterealtime/xiff/filter/CallbackPacketFilter.as
===================================================================
--- org/igniterealtime/xiff/filter/CallbackPacketFilter.as	(revision 11020)
+++ org/igniterealtime/xiff/filter/CallbackPacketFilter.as	(working copy)
@@ -1,7 +1,7 @@
-package org.jivesoftware.xiff.filter
+package org.igniterealtime.xiff.filter
 {
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.util.Callback;
+	import org.igniterealtime.xiff.data.XMPPStanza;
+	import org.igniterealtime.xiff.util.Callback;
 
 	public class CallbackPacketFilter implements IPacketFilter
 	{
Index: org/igniterealtime/xiff/filter/IPacketFilter.as
===================================================================
--- org/igniterealtime/xiff/filter/IPacketFilter.as	(revision 11020)
+++ org/igniterealtime/xiff/filter/IPacketFilter.as	(working copy)
@@ -1,6 +1,6 @@
-package org.jivesoftware.xiff.filter
+package org.igniterealtime.xiff.filter
 {
-	import org.jivesoftware.xiff.data.XMPPStanza;
+	import org.igniterealtime.xiff.data.XMPPStanza;
 	
 	public interface IPacketFilter
 	{
Index: org/igniterealtime/xiff/im/Roster.as
===================================================================
--- org/igniterealtime/xiff/im/Roster.as	(revision 11020)
+++ org/igniterealtime/xiff/im/Roster.as	(working copy)
@@ -1,4 +1,4 @@
-﻿/*
+/*
  * Copyright (C) 2003-2007 
  * Nick Velloff <nick.velloff@gmail.com>
  * Derrick Grigg <dgrigg@rogers.com>
@@ -21,24 +21,24 @@
  *
  */
 	 
-package org.jivesoftware.xiff.im
+package org.igniterealtime.xiff.im
 {	
 	import mx.collections.ArrayCollection;
 	import mx.collections.Sort;
 	import mx.collections.SortField;
 	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.Presence;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.im.RosterExtension;
-	import org.jivesoftware.xiff.data.im.RosterGroup;
-	import org.jivesoftware.xiff.data.im.RosterItemVO;
-	import org.jivesoftware.xiff.events.*;
+	import org.igniterealtime.xiff.core.EscapedJID;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.core.XMPPConnection;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IQ;
+	import org.igniterealtime.xiff.data.Presence;
+	import org.igniterealtime.xiff.data.XMLStanza;
+	import org.igniterealtime.xiff.data.XMPPStanza;
+	import org.igniterealtime.xiff.data.im.RosterExtension;
+	import org.igniterealtime.xiff.data.im.RosterGroup;
+	import org.igniterealtime.xiff.data.im.RosterItemVO;
+	import org.igniterealtime.xiff.events.*;
 	
 	/**
 	 * Broadcast whenever someone revokes your presence subscription. This is not
@@ -369,7 +369,7 @@
 		 * you are offline, online, away, etc.
 		 * @param status The status message associated with the show value
 		 * @param priority (Optional) A priority number for the presence
-		 * @see org.jivesoftware.xiff.data.Presence
+		 * @see org.igniterealtime.xiff.data.Presence
 		 */
 		public function setPresence( show:String, status:String, priority:Number ):void
 		{
Index: org/igniterealtime/xiff/logging/LoggerFactory.as
===================================================================
--- org/igniterealtime/xiff/logging/LoggerFactory.as	(revision 11020)
+++ org/igniterealtime/xiff/logging/LoggerFactory.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.logging
+package org.igniterealtime.xiff.logging
 {
 	import mx.logging.ILogger;
 	import mx.logging.Log;
Index: org/igniterealtime/xiff/logging/TextAreaTarget.as
===================================================================
--- org/igniterealtime/xiff/logging/TextAreaTarget.as	(revision 11020)
+++ org/igniterealtime/xiff/logging/TextAreaTarget.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.logging
+package org.igniterealtime.xiff.logging
 {
   import mx.controls.TextArea;
   import mx.core.mx_internal;
Index: org/igniterealtime/xiff/privatedata/IPrivatePayload.as
===================================================================
--- org/igniterealtime/xiff/privatedata/IPrivatePayload.as	(revision 11020)
+++ org/igniterealtime/xiff/privatedata/IPrivatePayload.as	(working copy)
@@ -1,7 +1,7 @@
-package org.jivesoftware.xiff.privatedata
+package org.igniterealtime.xiff.privatedata
 {
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
+	import org.igniterealtime.xiff.data.IExtension;
+	import org.igniterealtime.xiff.data.ISerializable;
 
 	public interface IPrivatePayload extends ISerializable, IExtension
 	{
Index: org/igniterealtime/xiff/privatedata/PrivateDataManager.as
===================================================================
--- org/igniterealtime/xiff/privatedata/PrivateDataManager.as	(revision 11020)
+++ org/igniterealtime/xiff/privatedata/PrivateDataManager.as	(working copy)
@@ -1,14 +1,14 @@
-package org.jivesoftware.xiff.privatedata
+package org.igniterealtime.xiff.privatedata
 {
 	import flash.events.EventDispatcher;
 	
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.privatedata.PrivateDataExtension;
-	import org.jivesoftware.xiff.filter.CallbackPacketFilter;
-	import org.jivesoftware.xiff.filter.IPacketFilter;
-	import org.jivesoftware.xiff.util.Callback;
+	import org.igniterealtime.xiff.core.XMPPConnection;
+	import org.igniterealtime.xiff.data.ExtensionClassRegistry;
+	import org.igniterealtime.xiff.data.IQ;
+	import org.igniterealtime.xiff.data.privatedata.PrivateDataExtension;
+	import org.igniterealtime.xiff.filter.CallbackPacketFilter;
+	import org.igniterealtime.xiff.filter.IPacketFilter;
+	import org.igniterealtime.xiff.util.Callback;
 
 	public class PrivateDataManager extends EventDispatcher
 	{
Index: org/igniterealtime/xiff/util/Callback.as
===================================================================
--- org/igniterealtime/xiff/util/Callback.as	(revision 11020)
+++ org/igniterealtime/xiff/util/Callback.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.util
+package org.igniterealtime.xiff.util
 {
 	public class Callback
 	{
Index: org/igniterealtime/xiff/util/SocketConn.as
===================================================================
--- org/igniterealtime/xiff/util/SocketConn.as	(revision 11020)
+++ org/igniterealtime/xiff/util/SocketConn.as	(working copy)
@@ -21,7 +21,7 @@
  *
  */
 	 
-package org.jivesoftware.xiff.util
+package org.igniterealtime.xiff.util
 {
 	import flash.net.Socket;
 	import flash.events.ProgressEvent;
Index: org/igniterealtime/xiff/util/SocketDataEvent.as
===================================================================
--- org/igniterealtime/xiff/util/SocketDataEvent.as	(revision 11020)
+++ org/igniterealtime/xiff/util/SocketDataEvent.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.util
+package org.igniterealtime.xiff.util
 {
 	/*
 	 * Copyright (C) 2003-2007 
Index: org/igniterealtime/xiff/vcard/VCard.as
===================================================================
--- org/igniterealtime/xiff/vcard/VCard.as	(revision 11020)
+++ org/igniterealtime/xiff/vcard/VCard.as	(working copy)
@@ -1,4 +1,4 @@
-package org.jivesoftware.xiff.vcard
+package org.igniterealtime.xiff.vcard
 {
 	import flash.display.*;
 	import flash.events.*;
@@ -8,13 +8,13 @@
 	
 	import mx.utils.Base64Decoder;
 	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.im.RosterItemVO;
-	import org.jivesoftware.xiff.data.vcard.VCardExtension;
-	import org.jivesoftware.xiff.events.VCardEvent;
+	import org.igniterealtime.xiff.core.UnescapedJID;
+	import org.igniterealtime.xiff.core.XMPPConnection;
+	import org.igniterealtime.xiff.data.IQ;
+	import org.igniterealtime.xiff.data.XMPPStanza;
+	import org.igniterealtime.xiff.data.im.RosterItemVO;
+	import org.igniterealtime.xiff.data.vcard.VCardExtension;
+	import org.igniterealtime.xiff.events.VCardEvent;
 	
 	[Bindable]
 	public class VCard extends EventDispatcher {
Index: org/jivesoftware/xiff/auth/Anonymous.as
===================================================================
--- org/jivesoftware/xiff/auth/Anonymous.as	(revision 11020)
+++ org/jivesoftware/xiff/auth/Anonymous.as	(working copy)
@@ -1,68 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.auth
-{
-  import flash.xml.XMLNode;
-
-  import org.jivesoftware.xiff.core.XMPPConnection;
-
-  /**
-   * This class provides SASL authentication using the ANONYMOUS mechanism.
-   */
-  public class Anonymous extends SASLAuth
-  {
-    /**
-     * Creates a new Anonymous authentication object.
-     *
-     * @param connection A reference to the XMPPConnection instance to use.
-     */
-    public function Anonymous(connection:XMPPConnection)
-    {
-      var attrs:Object = {
-        mechanism: "ANONYMOUS",
-        xmlns: "urn:ietf:params:xml:ns:xmpp-sasl"
-      };
-
-      req = new XMLNode(1, "auth");
-      req.attributes = attrs;
-
-      stage = 0;
-    }
-
-    /**
-     * Called when a response to this authentication is received.
-     * 
-     * @param stage The current stage in the authentication process.
-     * @param response The XML of the actual authentication response.
-     *
-     * @return An object specifying the current state of the authentication.
-     */
-    public override function handleResponse(stage:int, response:XMLNode):Object 
-    {
-      var success:Boolean = response.nodeName == "success";
-      return {
-        authComplete: true,
-        authSuccess: success,
-        authStage: stage++
-      };
-    }
-  }
-}
Index: org/jivesoftware/xiff/auth/External.as
===================================================================
--- org/jivesoftware/xiff/auth/External.as	(revision 11020)
+++ org/jivesoftware/xiff/auth/External.as	(working copy)
@@ -1,81 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.auth
-{
-  import flash.xml.XMLNode;
-
-  import mx.utils.Base64Encoder;
-
-  import org.jivesoftware.xiff.core.UnescapedJID;
-  import org.jivesoftware.xiff.core.XMPPConnection;
-
-  /**
-   * This class provides SASL authentication using the EXTERNAL mechanism.
-   * This is particularly useful when TLS authentication is required.
-   */
-  public class External extends SASLAuth
-  {
-    /**
-     * Creates a new External authentication object.
-     *
-     * @param connection A reference to the XMPPConnection instance in use.
-     */
-    public function External(connection:XMPPConnection)
-    {
-      var jid:UnescapedJID = connection.jid;
-      var authContent:String = jid.node;
-
-      var b64coder:Base64Encoder = new Base64Encoder();
-      b64coder.insertNewLines = false;
-      b64coder.encode(authContent);
-      authContent = b64coder.flush();
-
-      var attrs:Object = {
-        mechanism: "EXTERNAL",
-        xmlns: "urn:ietf:params:xml:ns:xmpp-sasl"
-      };
-
-      req = new XMLNode(1, "auth");
-      req.appendChild(new XMLNode(3, authContent));
-      req.attributes = attrs;
-
-      stage = 0;
-    }
-
-    /**
-     * Called when a response to this authentication is received.
-     * 
-     * @param stage The current stage in the authentication process.
-     * @param response The XML of the actual authentication response.
-     *
-     * @return An object specifying the current state of the authentication.
-     */
-    public override function handleResponse(stage:int, response:XMLNode):Object 
-    {
-      var success:Boolean = response.nodeName == "success";
-      return {
-        authComplete: true,
-        authSuccess: success,
-        authStage: stage++
-      };
-    }
-  }
-}
Index: org/jivesoftware/xiff/auth/Plain.as
===================================================================
--- org/jivesoftware/xiff/auth/Plain.as	(revision 11020)
+++ org/jivesoftware/xiff/auth/Plain.as	(working copy)
@@ -1,88 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.auth
-{
-  import flash.utils.ByteArray;
-  import flash.xml.XMLNode;
-
-  import mx.utils.Base64Encoder;
-
-  import org.jivesoftware.xiff.core.UnescapedJID;
-  import org.jivesoftware.xiff.core.XMPPConnection;
-
-  /**
-   * This class provides SASL authentication using the PLAIN mechanism.
-   * This is used for plain text password authentication with an XMPP
-   * server.
-   */
-  public class Plain extends SASLAuth
-  {
-    /**
-     * Creates a new Plain authentication object.
-     *
-     * @param connection A reference to the XMPPConnection instance in use.
-     */
-    public function Plain(connection:XMPPConnection)
-    {
-      //should probably use the escaped form, but flex/as handles \\ weirdly for unknown reasons
-      var jid:UnescapedJID = connection.jid;
-      var authContent:String = jid.bareJID;
-      authContent += '\u0000';
-      authContent += jid.node;
-      authContent += '\u0000';
-      authContent += connection.password;
-
-      var b64coder:Base64Encoder = new Base64Encoder();
-      b64coder.insertNewLines = false;
-      b64coder.encodeUTFBytes(authContent);
-      authContent = b64coder.flush();
-
-      var attrs:Object = {
-        mechanism: "PLAIN",
-        xmlns: "urn:ietf:params:xml:ns:xmpp-sasl"
-      };
-
-      req = new XMLNode(1, "auth");
-      req.appendChild(new XMLNode(3, authContent));
-      req.attributes = attrs;
-
-      stage = 0;
-    }
-
-    /**
-     * Called when a response to this authentication is received.
-     * 
-     * @param stage The current stage in the authentication process.
-     * @param response The XML of the actual authentication response.
-     *
-     * @return An object specifying the current state of the authentication.
-     */
-    public override function handleResponse(stage:int, response:XMLNode):Object 
-    {
-      var success:Boolean = response.nodeName == "success";
-      return {
-        authComplete: true,
-        authSuccess: success,
-        authStage: stage++
-      };
-    }
-  }
-}
Index: org/jivesoftware/xiff/auth/SASLAuth.as
===================================================================
--- org/jivesoftware/xiff/auth/SASLAuth.as	(revision 11020)
+++ org/jivesoftware/xiff/auth/SASLAuth.as	(working copy)
@@ -1,62 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.auth
-{
-	import flash.xml.XMLNode;
-	
-  /**
-   * This is a base class for use with Simple Authentication and Security Layer
-   * (SASL) mechanisms. Sub-class this class when creating new SASL mechanisms.
-   */
-	public class SASLAuth
-	{
-    /**
-     * The current response stage.
-     */
-		protected var stage:int;
-
-    /**
-     * The XML of the authentication request.
-     */
-		protected var req:XMLNode;
-		
-    /**
-     * The XML for the authentication request.
-     */
-		public function get request():XMLNode
-		{
-			return req;
-		}
-
-    /**
-     * Called when a response to this authentication is received.
-     * 
-     * @param stage The current stage in the authentication process.
-     * @param response The XML of the actual authentication response.
-     *
-     * @return An object specifying the current state of the authentication.
-     */
-    public function handleResponse(stage:int, response:XMLNode):Object
-		{
-			throw new Error("Don't call this method on SASLAuth; use a subclass");
-		}
-	}
-}
Index: org/jivesoftware/xiff/bookmark/BookmarkManager.as
===================================================================
--- org/jivesoftware/xiff/bookmark/BookmarkManager.as	(revision 11020)
+++ org/jivesoftware/xiff/bookmark/BookmarkManager.as	(working copy)
@@ -1,154 +0,0 @@
-package org.jivesoftware.xiff.bookmark
-{
-	import flash.events.EventDispatcher;
-	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.privatedata.PrivateDataExtension;
-	import org.jivesoftware.xiff.events.BookmarkChangedEvent;
-	import org.jivesoftware.xiff.events.BookmarkRetrievedEvent;
-	import org.jivesoftware.xiff.privatedata.PrivateDataManager;
-	import org.jivesoftware.xiff.util.Callback;
-
-	[Event("GroupChatBookmarkChanged")]
-	
-	public class BookmarkManager extends EventDispatcher
-	{
-		private static var bookmarkManagerConstructed:Boolean = bookmarkManagerStaticConstructor();
-		
-		private static function bookmarkManagerStaticConstructor():Boolean
-		{	
-			ExtensionClassRegistry.register( BookmarkPrivatePayload );
-			return true;
-		}
-		
-		private var _privateDataManager:PrivateDataManager;
-		private var _bookmarks:BookmarkPrivatePayload;
-		
-		public function BookmarkManager(privateDataManager:PrivateDataManager) {
-			this._privateDataManager = privateDataManager;
-		}
-		
-		public function fetchBookmarks():void {
-			if(!this._bookmarks) {
-				this._privateDataManager.getPrivateData("storage", "storage:bookmarks", new Callback(this, this["_processBookmarks"]));
-			}
-			else {
-				dispatchEvent(new BookmarkRetrievedEvent());
-			}
-		}
-		
-		public function addGroupChatBookmark(serverBookmark:GroupChatBookmark):void {
-			if(!this._bookmarks) {
-				this._privateDataManager.getPrivateData("storage", "storage:bookmarks", new Callback(this, this["_processBookmarksAdd"], serverBookmark));
-			}
-			else {
-				this._addBookmark(serverBookmark);
-			}
-		}
-		
-		public function isGroupChatBookmarked(jid:UnescapedJID):Boolean {
-			for each (var bookmark:GroupChatBookmark in _bookmarks.groupChatBookmarks) {
-				if (bookmark.jid.unescaped.equals(jid, false)) {
-					return true;
-				}
-			}
-			return false;
-		}
-		
-		public function getGroupChatBookmark(jid:UnescapedJID):GroupChatBookmark {
-			for each (var bookmark:GroupChatBookmark in _bookmarks.groupChatBookmarks) {
-				if (bookmark.jid.unescaped.equals(jid, false)) {
-					return bookmark;
-				}
-			}	
-			return null;		
-		}
-		
-		public function removeGroupChatBookmark(jid:UnescapedJID):void {
-			if(!this._bookmarks) {
-				this._privateDataManager.getPrivateData("storage", "storage:bookmarks", new Callback(this, this["_processBookmarksRemove"], jid));
-			}
-			else {
-				this._removeBookmark(jid);				
-			}
-		}
-		
-		public function setAutoJoin(jid:UnescapedJID, state:Boolean):void {
-			if(!this._bookmarks) {
-				this._privateDataManager.getPrivateData("storage", "storage:bookmarks", new Callback(this, this["_processBookmarksSetAuto"], jid, state));
-			}		
-			else {
-				this._setAutoJoin(jid, state);
-			}	
-		}
-		
-		public function get bookmarks():BookmarkPrivatePayload {
-			return _bookmarks;
-		}
-		
-		private function _processBookmarks(bookmarksIq:XMPPStanza):void {
-			var privateData:PrivateDataExtension = bookmarksIq.getAllExtensionsByNS("jabber:iq:private")[0];
-			_bookmarks = BookmarkPrivatePayload(privateData.payload);
-			dispatchEvent(new BookmarkRetrievedEvent());
-		}
-		
-		private function _processBookmarksAdd(bookmark:ISerializable, bookmarksIq:XMPPStanza):void {
-			this._processBookmarks(bookmarksIq);
-			this._addBookmark(bookmark);
-		}
-		
-		private function _processBookmarksRemove(jid:UnescapedJID, bookmarksIq:XMPPStanza):void {
-			this._processBookmarks(bookmarksIq);
-			this._removeBookmark(jid);
-		}
-		
-		private function _processBookmarksSetAuto(jid:UnescapedJID, state:Boolean, bookmarksIq:XMPPStanza):void {
-			this._processBookmarks(bookmarksIq);
-			this._setAutoJoin(jid, state);
-		}
-		
-		private function _addBookmark(bookmark:ISerializable):void 
-		{
-			var groupChats:Array = _bookmarks.groupChatBookmarks;
-			var urls:Array = _bookmarks.urlBookmarks;
-			
-			if(bookmark is GroupChatBookmark) {
-				groupChats.push(bookmark);
-			}
-			else if(bookmark is UrlBookmark) {
-				urls.push(bookmark);
-			}
-			
-			var payload:BookmarkPrivatePayload = new BookmarkPrivatePayload(groupChats, urls);
-			_privateDataManager.setPrivateData("storage", "storage:bookmarks", payload);
-			_bookmarks = payload;
-			dispatchEvent(new BookmarkChangedEvent(BookmarkChangedEvent.GROUPCHAT_BOOKMARK_ADDED, bookmark));
-		}
-		
-		private function _removeBookmark(jid:UnescapedJID):void {
-			var removedBookmark:GroupChatBookmark = _bookmarks.removeGroupChatBookmark(jid);
-			this._updateBookmarks();
-			dispatchEvent(new BookmarkChangedEvent(BookmarkChangedEvent.GROUPCHAT_BOOKMARK_REMOVED, removedBookmark));		
-		}
-		
-		private function _setAutoJoin(jid:UnescapedJID, state:Boolean):void {
-			for each (var bookmark:GroupChatBookmark in _bookmarks.groupChatBookmarks) {
-				if (bookmark.jid.unescaped.equals(jid, false)) {
-					bookmark.autoJoin = state;
-				}
-			}	
-			this._updateBookmarks();						
-		}
-		
-		private function _updateBookmarks():void {
-			var groupChats:Array = _bookmarks.groupChatBookmarks;
-			var urls:Array = _bookmarks.urlBookmarks;
-			
-			var payload:BookmarkPrivatePayload = new BookmarkPrivatePayload(groupChats, urls);
-			_privateDataManager.setPrivateData("storage", "storage:bookmarks", payload);			
-		}
-	}
-}
Index: org/jivesoftware/xiff/bookmark/BookmarkPrivatePayload.as
===================================================================
--- org/jivesoftware/xiff/bookmark/BookmarkPrivatePayload.as	(revision 11020)
+++ org/jivesoftware/xiff/bookmark/BookmarkPrivatePayload.as	(working copy)
@@ -1,99 +0,0 @@
-package org.jivesoftware.xiff.bookmark
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.privatedata.IPrivatePayload;
-
-	public class BookmarkPrivatePayload implements IPrivatePayload {
-		
-		private var _groupChatBookmarks:Array = [];
-		private var _urlBookmarks:Array = new Array();
-		private var _others:Array = new Array();
-		
-		public function BookmarkPrivatePayload(groupChatBookmarks:Array = null, urlBookmarks:Array = null) {
-			if(groupChatBookmarks) {
-				for each(var bookmark:GroupChatBookmark in groupChatBookmarks) {
-					if(_groupChatBookmarks.every(function(testGroupChatBookmark:GroupChatBookmark, index:int, array:Array):Boolean { return testGroupChatBookmark.jid != bookmark.jid; }))
-						_groupChatBookmarks.push(bookmark);
-				}
-			}
-			if(urlBookmarks) {
-				for each(var urlBookmark:UrlBookmark in urlBookmarks) {
-					if(_urlBookmarks.every(function(testURLBookmark:UrlBookmark, index:int, array:Array):Boolean { return testURLBookmark.url != urlBookmark.url; }))
-						_urlBookmarks.push(urlBookmark);
-				}
-			}
-		}
-		
-		public function getNS():String {
-			return "storage:bookmarks";
-		}
-		
-		public function getElementName():String {
-			return "storage";
-		}
-		
-		public function get groupChatBookmarks():Array {
-			return _groupChatBookmarks.slice();
-		}
-		
-		public function get urlBookmarks():Array {
-			return _urlBookmarks.slice();
-		}
-		
-		//removes the bookmark from the list, and returns it
-		public function removeGroupChatBookmark(jid:UnescapedJID):GroupChatBookmark {
-			var removedItem:GroupChatBookmark = null;
-			var newBookmarks:Array = [];
-			for each(var bookmark:GroupChatBookmark in _groupChatBookmarks) {
-				if (!bookmark.jid.unescaped.equals(jid, false))
-					newBookmarks.push(bookmark);
-				else
-					removedItem = bookmark;			
-			}
-			_groupChatBookmarks = newBookmarks;
-			return removedItem;
-		}
-		
-		public function serialize(parentNode:XMLNode):Boolean {
-			var node:XMLNode = new XMLNode(1, getElementName());
-			node.attributes.xmlns = getNS();
-			var serializer:Function = function(element:ISerializable, index:int, arr:Array):void {
-				element.serialize(parentNode);
-			};
-			_groupChatBookmarks.forEach(serializer);
-			_urlBookmarks.forEach(serializer);
-			return true;
-		}
-		
-		public function deserialize(bookmarks:XMLNode):Boolean 
-		{
-			for each(var child:XMLNode in bookmarks.childNodes) 
-			{
-				if(child.nodeName == "conference") 
-				{
-					var groupChatBookmark:GroupChatBookmark = new GroupChatBookmark();
-					groupChatBookmark.deserialize(child);
-					//don't add it if it's a duplicate
-					if(_groupChatBookmarks.every(function(testGroupChatBookmark:GroupChatBookmark, index:int, array:Array):Boolean { return testGroupChatBookmark.jid != groupChatBookmark.jid; }))
-						_groupChatBookmarks.push(groupChatBookmark);
-				}
-				else if(child.nodeName == "url") 
-				{
-					var urlBookmark:UrlBookmark = new UrlBookmark();
-					urlBookmark.deserialize(child);
-					//don't add it if it's a duplicate
-					if(_urlBookmarks.every(function(testURLBookmark:UrlBookmark, index:int, array:Array):Boolean { return testURLBookmark.url != urlBookmark.url; }))
-						_urlBookmarks.push(urlBookmark);
-				}
-				else {
-					_others.push(child);
-				}
-			}
-			return true;
-		}
-		
-	}
-}
Index: org/jivesoftware/xiff/bookmark/GroupChatBookmark.as
===================================================================
--- org/jivesoftware/xiff/bookmark/GroupChatBookmark.as	(revision 11020)
+++ org/jivesoftware/xiff/bookmark/GroupChatBookmark.as	(working copy)
@@ -1,100 +0,0 @@
-package org.jivesoftware.xiff.bookmark
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-
-	public class GroupChatBookmark implements ISerializable
-	{
-		private var _groupChatNode:XMLNode;
-		private var _nickNode:XMLNode;
-		private var _passwordNode:XMLNode;
-		
-		public function GroupChatBookmark(name:String = null, jid:EscapedJID = null, autoJoin:Boolean = false, nickname:String = null, password:String = null) {
-			if(!name && !jid) {
-				return;
-			}
-			else if(!name || !jid) {
-				throw new Error("Name and jid cannot be null, they must either both be null or an Object");
-			}
-			var groupChatNode:XMLNode = new XMLNode(1, "conference");
-			groupChatNode.attributes.name = name;
-			groupChatNode.attributes.jid = jid.toString();
-			if(autoJoin) {
-				groupChatNode.attributes.autojoin = "true";
-			}
-			if(nickname) {
-				var nicknameNode:XMLNode = new XMLNode(1, "nick");
-				nicknameNode.appendChild(new XMLNode(3, nickname));
-				groupChatNode.appendChild(nicknameNode);
-			}
-			if(password) {
-				var passwordNode:XMLNode = new XMLNode(1, "password");
-				passwordNode.appendChild(new XMLNode(3, password));
-				groupChatNode.appendChild(passwordNode);
-			}
-			this._groupChatNode = groupChatNode;
-		}
-		
-		public function get name():String {
-			return _groupChatNode.attributes.name;
-		}
-		
-		public function get jid():EscapedJID {
-			return new EscapedJID(_groupChatNode.attributes.jid);
-		}
-		
-		public function get autoJoin():Boolean {
-			return _groupChatNode.attributes.autojoin == "true";
-		}
-		
-		public function set autoJoin(state:Boolean):void {
-			_groupChatNode.attributes.autojoin = state.toString();
-		}
-		
-		public function get nickname():String {
-			return _nickNode.firstChild.nodeValue;
-		}
-		
-		public function get password():String {
-			return _passwordNode.firstChild.nodeValue;
-		}
-		
-		public function serialize(parentNode:XMLNode):Boolean
-		{
-			var groupChatNode:XMLNode = this._groupChatNode.cloneNode(true);
-			var nickNode:XMLNode = (_nickNode != null ? _nickNode.cloneNode(true) : null);
-			var passwordNode:XMLNode = (_passwordNode != null ? _passwordNode.cloneNode(true) : null);
-			
-			if(nickNode != null) {
-				groupChatNode.appendChild(nickNode);
-			}
-			if(passwordNode != null) {
-				groupChatNode.appendChild(passwordNode);
-			}
-			
-			parentNode.appendChild(groupChatNode);
-						
-			return true;
-		}
-		
-		public function deserialize(node:XMLNode):Boolean
-		{
-			this._groupChatNode = node.cloneNode(false);
-			
-			var children:Array = node.childNodes;
-			for each(var child:XMLNode in children) {
-				if(child.nodeName == "nick") {
-					_nickNode = child.cloneNode(true);
-				}
-				else if(child.nodeName == "password") {
-					_passwordNode = child.cloneNode(true);
-				}
-			}
-			
-			return true;
-		}
-		
-	}
-}
Index: org/jivesoftware/xiff/bookmark/UrlBookmark.as
===================================================================
--- org/jivesoftware/xiff/bookmark/UrlBookmark.as	(revision 11020)
+++ org/jivesoftware/xiff/bookmark/UrlBookmark.as	(working copy)
@@ -1,44 +0,0 @@
-package org.jivesoftware.xiff.bookmark
-{
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ISerializable;
-
-	public class UrlBookmark implements ISerializable
-	{
-		private var node:XMLNode;
-		
-		public function UrlBookmark(name:String = null, url:String = null) {
-			if(!name && !url) {
-				return;
-			}
-			else if(!name || !url) {
-				throw new Error("Name and url cannot be null, they must either both be null or an Object");
-			}
-			
-			node = new XMLNode(1, "url");
-			node.attributes.name = name;
-			node.attributes.url = url;
-		}
-		
-		public function get name():String {
-			return node.attributes.name;
-		}
-		
-		public function get url():String {
-			return node.attributes.uri;
-		}
-		
-		public function serialize(parentNode:XMLNode):Boolean {
-			parentNode.appendChild(node.cloneNode(true));
-			return true;
-		}
-		
-		public function deserialize(node:XMLNode):Boolean {
-			this.node = node.cloneNode(true);
-			return true;
-		}
-		
-	}
-}
Index: org/jivesoftware/xiff/conference/InviteListener.as
===================================================================
--- org/jivesoftware/xiff/conference/InviteListener.as	(revision 11020)
+++ org/jivesoftware/xiff/conference/InviteListener.as	(working copy)
@@ -1,125 +0,0 @@
-﻿/*
- * Copyright (C) 2003-20077
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.conference
-{	
-	import flash.events.EventDispatcher;
-	
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.Message;
-	import org.jivesoftware.xiff.data.muc.MUCUserExtension;
-	import org.jivesoftware.xiff.events.InviteEvent;
-	import org.jivesoftware.xiff.events.MessageEvent;
-	
-	/**
-	 * Dispatched when an invitations has been received.
-	 * 
-	 * @eventType org.jivesoftware.xiff.InviteEvent.INVITED
-	 * @see org.jivesoftware.xiff.conference.Room
-	 * @see org.jivesoftware.xiff.conference.Room.#invite
-	 */
-	[Event( name="invited", type="org.jivesoftware.xiff.events.InviteEvent" )]
-	
-	/**
-	 * Manages the dispatching of events during invitations.  Add event
-	 * listeners to an instance of this class to monitor invite and decline
-	 * events.
-	 *
-	 * <p>You only need a single instance of this class to listen for all invite
-	 * or decline events.</p>
-	 *
-	 * @param connection An XMPPConnection instance that is providing the primary server 
-	 * connection.
-	 */
-	public class InviteListener extends EventDispatcher
-	{
-		private var myConnection:XMPPConnection;
-		
-		public function InviteListener( aConnection:XMPPConnection=null )
-		{
-			if (aConnection != null)
-				setConnection( aConnection );	
-		}
-		
-		/**
-		 * Sets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
-		 *
-		 * @param connection The XMPPConnection instance to use.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
-		 */
-		public function setConnection( connection:XMPPConnection ):void
-		{
-			if (myConnection != null){
-				myConnection.removeEventListener(MessageEvent.MESSAGE, handleEvent);
-			}
-			myConnection = connection;
-			myConnection.addEventListener(MessageEvent.MESSAGE, handleEvent);
-		}
-	
-		/**
-		 * Gets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
-		 *
-		 * @returns The XMPPConnection used
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
-		 */
-		public function getConnection():XMPPConnection
-		{
-			return myConnection;
-		}
-		 
-		private function handleEvent( eventObj:Object ):void
-		{
-			switch( eventObj.type )
-			{
-				case MessageEvent.MESSAGE:
-				
-					try
-					{
-						var msg:Message = eventObj.data as Message;
-						var exts:Array = msg.getAllExtensionsByNS(MUCUserExtension.NS);
-						if(!exts || exts.length < 0) {
-							return;
-						}
-						var muc:MUCUserExtension =  exts[0];
-	                    if (muc.type == MUCUserExtension.INVITE_TYPE) {
-	                        var room:Room = new Room(myConnection);
-	                        room.roomJID = msg.from.unescaped;
-	                        room.password = muc.password;
-							var e:InviteEvent = new InviteEvent();
-							e.from = muc.from.unescaped;
-							e.reason = muc.reason;
-							e.room = room;
-							e.data = msg;
-							dispatchEvent(e);
-	                    }
-    				 }
-    				 catch (e:Error)
-    				 {
-    				 	trace(e.getStackTrace());
-    				 }
-                    
-					break;
-			}
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/conference/Room.as
===================================================================
--- org/jivesoftware/xiff/conference/Room.as	(revision 11020)
+++ org/jivesoftware/xiff/conference/Room.as	(working copy)
@@ -1,1292 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
- 
-package org.jivesoftware.xiff.conference
-{
-	import flash.events.Event;
-	
-	import mx.collections.ArrayCollection;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.*;
-	import org.jivesoftware.xiff.data.forms.FormExtension;
-	import org.jivesoftware.xiff.data.muc.*;
-	import org.jivesoftware.xiff.events.DisconnectionEvent;
-	import org.jivesoftware.xiff.events.MessageEvent;
-	import org.jivesoftware.xiff.events.PresenceEvent;
-	import org.jivesoftware.xiff.events.RoomEvent;
-	
-	/**
-	 * Dispatched when the room subject changes.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent.SUBJECT_CHANGE
-	 */
-	[Event( name="subjectChange", type="org.jivesoftware.xiff.events.RoomEvent" )]
-	
-	/**
-	 * Dispatched whenever a new message intented for all room occupants is received. The 
-	 * <code>RoomEvent</code> class will contain an attribute <code>data</code> with the 
-	 * group message as an instance of the <code>Message</code> class.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event( name="groupMessage", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched whenever a new private message is received. The <code>RoomEvent</code> class
-	 * contains an attribute <code>data</code> with the private message as an instance of the 
-	 * <code>Message</code> class.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="privateMessage", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when you have entered the room and messages that are sent
-	 * will be displayed to other users. The room's role and affiliation will
-	 * be visible from this point forward.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="roomJoin", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when the server acknoledges that you have the left the room.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="roomLeave", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when an affiliation list has been requested. The event object contains an 
-	 * array of <code>MUCItems</code> containing the JID and affiliation properties.
-	 *
-	 * <p>To grant or revoke permissions based on this list, only send the changes you wish to 
-	 * make, calling grant/revoke with the new affiliation and existing JID.</p>
-	 * 
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="affiliations", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when an administration action failed.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 * @see org.jivesoftware.xiff.core.XMPPConnection.error
-	 */
-	[Event(name="adminError", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when the room requires a password and the user did not supply one (or
-	 * the password provided is incorrect).
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="passwordError", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when the room is members-only and the user is not on the member list.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="registrationReqError", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched if the user attempted to join the room but was not allowed to do so because
-	 * they are banned (i.e., has an affiliation of "outcast").
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="bannedError", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched if the room has reached its maximum number of occupants.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="maxUsersError", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched if a user attempts to enter a room while it is "locked" (i.e., before the room
-	 * creator provides an initial configuration and therefore before the room officially exists).
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="lockedError", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched whenever an occupant joins the room. The <code>RoomEvent</code> instance will 
-	 * contain an attribute <code>nickname</code> with the nickname of the occupant who joined.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="userJoin", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched whenever an occpant leaves the room. The <code>RoomEvent</code> instance will
-	 * contain an attribute <code>nickname</code> with the nickname of the occupant who left.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="userDeparture", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when a user is kicked from the room.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="userKicked", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when a user is banned from the room.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="userBanned", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when the user's preferred nickname already exists in the room.  The 
-	 * <code>RoomEvent</code> will contain an attribute <code>nickname</code> with the nickname 
-	 * already existing in the room.
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="nickConflict", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when a room configuration form is required.  This can occur during the 
-	 * creation of a room, or if a room configuration is requested.  The <code>RoomEvent</code>
-	 * instance will contain an attribute <code>data</code> that is an instance of an object 
-	 * with the following attributes:
-	 * 
-	 * <p><code>instructions</code>: Instructions for the use of form<br />
-	 * <code>title</code>: Title of the configuration form<br />
-	 * <code>label</code>: A friendly name for the field<br />
-	 * <code>name</code>: A computer readable identifier for the field used to identify 
-	 * this field in the result passed to <code>configure()</code><br />
-	 * <code>type</code>: The type of the field to be displayed. Type will be a constant
-	 * from the <code>FormField</code> class.</p>
-	 * 
-	 * @see org.jivesoftware.xiff.data.forms.FormExtension
-	 * @see org.jivesoftware.xiff.data.forms.FormField
-	 * @see #configure
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="configureForm", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Dispatched when an invite to this room has been declined by the invitee. The <code>RoomEvent</code>
-	 * <code>data</code> property that has the following attributes:
-	 *
-	 * <p><code>from</code>: The JID of the user initiating the invite<br />
-	 * <code>reason</code>: A string containing the reason to join the room<br />
-	 * <code>data</code>: The original message containing the decline</p>
-	 *
-	 * @eventType org.jivesoftware.xiff.events.RoomEvent
-	 */
-	[Event(name="declined", type="org.jivesoftware.xiff.events.RoomEvent")]
-	
-	/**
-	 * Manages incoming and outgoing data from a conference room as part of multi-user conferencing (JEP-0045).
-	 * You will need an instance of this class for each room that the user joins.
-	 *
-	 * @param connection An XMPPConnection instance that is providing the primary server connection
-	 */
-	public class Room extends ArrayCollection
-	{
-		public static const NO_AFFILIATION:String = MUC.NO_AFFILIATION;
-		public static const MEMBER_AFFILIATION:String = MUC.MEMBER_AFFILIATION;
-		public static const ADMIN_AFFILIATION:String = MUC.ADMIN_AFFILIATION;
-		public static const OWNER_AFFILIATION:String = MUC.OWNER_AFFILIATION;
-		public static const OUTCAST_AFFILIATION:String = MUC.OUTCAST_AFFILIATION;
-		
-		public static const NO_ROLE:String = MUC.NO_ROLE;
-		public static const MODERATOR_ROLE:String = MUC.MODERATOR_ROLE;
-		public static const PARTICIPANT_ROLE:String = MUC.PARTICIPANT_ROLE;
-		public static const VISITOR_ROLE:String = MUC.VISITOR_ROLE;
-	
-		private var myConnection:XMPPConnection;
-	    private var myJID:UnescapedJID
-		private var myNickname:String;
-	    private var myPassword:String;
-		private var myRole:String;
-		private var myAffiliation:String;
-	    private var myIsReserved:Boolean;
-	    private var mySubject:String;
-	    private var _anonymous:Boolean = true;
-//	    private var _fileRepo:RoomFileRepository;
-		
-		private var _active:Boolean;
-		
-		// Used to store nicknames in pending status, awaiting change approval from server
-		private var pendingNickname:String;
-
-		private static var staticConstructorDependencies:Array = [ 
-	        FormExtension,
-	        MUC
-		]
-	
-		private static var roomStaticConstructed:Boolean = RoomStaticConstructor();
-		
-		public function Room( aConnection:XMPPConnection=null )
-		{
-			setActive(false);
-			if (aConnection)
-				connection = aConnection;
-		}
-		
-		private static function RoomStaticConstructor():Boolean
-		{
-	        MUC.enable();
-	        FormExtension.enable();
-			
-			return true;
-		}
-		
-		/**
-		 * Sets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
-		 *
-		 * @param connection The XMPPConnection instance to use.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
-		 */
-		public function set connection( connection:XMPPConnection ):void
-		{
-			if (myConnection != null)
-			{
-				myConnection.removeEventListener(MessageEvent.MESSAGE, handleEvent);
-				myConnection.removeEventListener(PresenceEvent.PRESENCE, handleEvent);
-				myConnection.removeEventListener(DisconnectionEvent.DISCONNECT, handleEvent);	
-			}
-			
-			myConnection = connection;
-			
-			myConnection.addEventListener(MessageEvent.MESSAGE, handleEvent, false, 0, true);
-			myConnection.addEventListener(PresenceEvent.PRESENCE, handleEvent, false, 0, true);
-			myConnection.addEventListener(DisconnectionEvent.DISCONNECT, handleEvent, false, 0, true);
-			
-//			String baserepo = "http://"+myConnection.server+":9090/webdav/rooms/"+this.conferenceServer.replace("."+myConnection.server,"")+"/"+this.roomName+"/";
-//			_fileRepo = new RoomFileRepository(baserepo);
-		}
-	
-		/**
-		 * Gets a reference to the XMPPConnection being used for incoming/outgoing XMPP data.
-		 *
-		 * @returns The XMPPConnection used
-		 * @see org.jivesoftware.xiff.core.XMPPConnection
-		 */
-		public function get connection():XMPPConnection
-		{
-			return myConnection;
-		}
-		 
-	    /** 
-	     * Joins a conference room based on the parameters specified by the room
-	     * properties.  This call will create an instant room based on a default
-	     * server configuration if the room doesn't exist.  
-	     * 
-	     * <p>To create and begin the configuration process of a reserved room, pass
-	     * <code>true</code> to this method to begin the configuration process.  When
-	     * The configuration is complete, the room will be unlocked for others to join.
-	     * Listen for the <code>RoomEvent.CONFIGURE_ROOM</code> event to handle and 
-	     * either return or cancel the configuration of the room.
-		 *
-	     * @param createReserved Set to true if you wish to create and configure a reserved room
-		 * @return A boolean indicating whether the join attempt was successfully sent.
-		 */
-		public function join( createReserved:Boolean = false, joinPresenceExtensions:Array = null ):Boolean
-		{
-			if(!myConnection.isActive() || isActive) {
-				return false;
-			}
-			
-			myIsReserved = createReserved == true ? true : false;
-
-			var joinPresence:Presence = new Presence( userJID.escaped );
-			if (joinPresenceExtensions != null) {
-				for each(var joinExt:* in joinPresenceExtensions) {
-					joinPresence.addExtension(joinExt);
-				}
-			}
-
-			var muc:MUCExtension = new MUCExtension();
-	        
-	        if( password != null ) {
-	        	muc.password = password;
-	        }
-	
-			joinPresence.addExtension(muc);
-			myConnection.send( joinPresence );
-			return true;
-		}
-		 
-		/**
-		 * Leaves the current conference room, assuming that the user has joined one.
-		 * If the user is not currently in a room, this method does nothing.
-		 */
-		public function leave():void
-		{
-			if( isActive ) {
-				var leavePresence:Presence = new Presence( userJID.escaped, null, Presence.UNAVAILABLE_TYPE );
-				myConnection.send( leavePresence );
-				
-				// Clear out the roster items
-				removeAll();
-				myConnection.removeEventListener(MessageEvent.MESSAGE, handleEvent);
-				myConnection.removeEventListener(DisconnectionEvent.DISCONNECT, handleEvent);
-			}
-		}
-		
-		/**
-		 * Gets an instance of the <code>Message</code> class that has been pre-configured to be 
-		 * sent from this room. Use this method to get a <code>Message</code> in order to add extensions 
-		 * to outgoing room messages.
-		 * 
-		 * @param body The message body
-		 * @param htmlBody The message body with HTML formatting
-		 * @return A <code>Message</code> class instance
-		 */
-		public function getMessage( body:String = null, htmlBody:String = null ):Message
-		{
-			var tempMessage:Message = new Message( roomJID.escaped, null, body, htmlBody, Message.GROUPCHAT_TYPE );
-			return tempMessage;
-		}
-		
-		/**
-		 * Sends a message to the conference room.
-		 *
-		 * @param body The message body
-		 * @param htmlBody The message body with HTML formatting
-		 */
-		public function sendMessage( body:String=null, htmlBody:String=null ):void
-		{
-			if( isActive ) {
-				var tempMessage:Message = new Message( roomJID.escaped, null, body, htmlBody, Message.GROUPCHAT_TYPE );
-				myConnection.send( tempMessage );
-			}
-		}
-		
-		/**
-		 * Sends a message to the conference room with an extension attached. 
-		 * Use this method in conjunction with the <code>getMessage</code> method.
-		 *
-		 * @param msg The message to send
-		 */
-		public function sendMessageWithExtension( msg:Message ):void
-		{
-			if( isActive ) {
-				myConnection.send( msg );
-			}
-		}
-		
-		/**
-		 * Sends a private message to a specific participant in the conference room.
-		 *
-		 * @param recipientNickname The conference room nickname of the recipient who should 
-		 * receive the private message
-		 * @param body The message body
-		 * @param htmlBody The message body with HTML formatting
-		 */
-		public function sendPrivateMessage( recipientNickname:String, body:String = null, htmlBody:String = null ):void
-		{
-			if( isActive ) {
-				var tempMessage:Message = new Message( new EscapedJID(roomJID + "/" + recipientNickname), null, body, htmlBody, Message.CHAT_TYPE );
-				myConnection.send( tempMessage );
-			}
-		}
-		
-		/**
-		 * Changes the subject in the conference room. You must have already joined the 
-		 * room before you can change the subject.
-		 *
-		 * @param newSubject The new subject
-		 */
-		public function changeSubject( newSubject:String ):void
-		{
-			if( isActive ) {
-				var tempMessage:Message = new Message( roomJID.escaped, null, null, null, Message.GROUPCHAT_TYPE, newSubject );
-				myConnection.send( tempMessage );
-			}
-		}
-		
-		/**
-		 * Kicks an occupant out of the room, assuming that the user has necessary 
-		 * permissions in order to do so. If the user does not, the server will return an error.
-		 *
-		 * @param occupantNick The nickname of the room occupant to kick
-		 * @param reason The reason for the kick
-		 */
-		public function kickOccupant( occupantNick:String, reason:String ):void
-		{
-			if( isActive ) {
-				var tempIQ:IQ = new IQ( roomJID.escaped, IQ.SET_TYPE, XMPPStanza.generateID("kick_occupant_") );
-				var ext:MUCAdminExtension = new MUCAdminExtension(tempIQ.getNode());
-				//ext.addItem(null, MUC.NO_ROLE, null, null, null, reason);
-				ext.addItem(null, MUC.NO_ROLE, occupantNick, null, null, reason); 
-				tempIQ.addExtension(ext);
-				myConnection.send( tempIQ );
-			}
-		}
-		
-		/**
-		 * In a moderated room, sets voice status to a particular occupant, assuming the user 
-		 * has the necessary permissions to do so.
-		 *
-		 * @param occupantNick The nickname of the occupant to give voice
-		 * @param voice Whether to add voice (true) or remove voice (false). Having voice means
-		 * that the user is actually able to talk. Without voice the user is effectively muted.
-		 */
-		public function setOccupantVoice( occupantNick:String, voice:Boolean ):void
-		{
-			if( isActive ) {
-				var tempIQ:IQ = new IQ( roomJID.escaped, IQ.SET_TYPE, XMPPStanza.generateID("voice_") );
-				var ext:MUCAdminExtension = new MUCAdminExtension(tempIQ.getNode());
-				ext.addItem(null, voice ? MUC.PARTICIPANT_ROLE : MUC.VISITOR_ROLE);
-				tempIQ.addExtension(ext);
-				myConnection.send( tempIQ );
-			}
-		}
-	
-	    /**
-	     * Invites a user that is not currently a member of this room to this room.
-	     *
-	     * <p>You must have joined the room and have appropriate permissions to invite 
-	     * other memebers, because the server will format and send the invite message to 
-	     * as if it came from the room rather that you sending the invite directly from you.</p>
-	     *
-	     * <p>To listen to invite events, add an event listener on your XMPPConnection to the
-	     * <code>InviteEvent.INVITED</code> event.</p>
-	     *
-	     * @param jid A string JID of the user to invite.
-	     * @param reason A string describing why you would like to invite the user.
-	     */
-	    public function invite( jid:UnescapedJID, reason:String ):void
-	    {
-	        var msg:Message = new Message(roomJID.escaped)
-	        var muc:MUCUserExtension = new MUCUserExtension();
-	
-	        muc.invite(jid.escaped, undefined, reason);
-	
-	        msg.addExtension(muc);
-	        myConnection.send(msg);
-	    }
-	
-	    /**
-	     * Actively decline an invitation.  You can optionally ignore invitations
-	     * but if you choose to decline an invitation, you call this method on
-	     * a room instance that represents the room the invite originated from.
-	     *
-	     * <p>You do not need to have joined this room to decline an invitation</p>
-	     *
-	     * <p>Note: mu-conference-0.6 does not allow users to send decline
-	     * messages without joining first.  If using this version of conferencing
-	     * software, it is best to ignore invites.</p>
-	     *
-	     * @param reason A string describing why the invitiation was declined
-	     */
-	    public function decline(jid:UnescapedJID, reason:String):void
-	    {
-	        var msg:Message = new Message(roomJID.escaped)
-	        var muc:MUCUserExtension = new MUCUserExtension();
-	
-	        muc.decline(jid.escaped, undefined, reason);
-	
-	        msg.addExtension(muc);
-	        myConnection.send(msg);
-	    }
-	
-		/**
-		 * <strong>DEPRECATED! Use <code>getRoomJID</code> instead.</strong>
-		 * Gets the fully qualified room name (room@server) of the current room.
-		 *
-		 * @return The fully qualified room name.
-		 */
-		public function get fullRoomName():String
-		{
-	        return roomJID.toString();
-		}
-	
-	    /**
-	     * Get the JID of the room.
-	     *
-	     * @return The room's JID.
-	     */
-	    public function get roomJID():UnescapedJID
-	    {
-	        return myJID;
-	    }
-		
-	    /**
-	     * Set the JID of the room in the form "room@conference.server"
-	     */
-	    public function set roomJID( jid:UnescapedJID ):void
-	    {
-	        myJID = jid;
-	    }
-		
-	    /**
-	     * Get the JID of the conference room user.
-	     *
-	     * @return your JID in the room 
-	     */
-	    public function get userJID():UnescapedJID
-	    {
-	        return new UnescapedJID(roomJID.bareJID + "/" + nickname);
-	    }
-		
-		/**
-		 * Gets the user's role in the conference room. 
-		 * Possible roles are "visitor", "participant", "moderator" or no defined role.
-		 *
-		 * @return The user's role
-		 */
-		[Bindable(event=roleSet)]
-		public function get role():String
-		{
-			return myRole;
-		}
-		
-		/**
-		 * Gets the user's affiliation for this room.
-		 * Possible affiliations are "owner", "admin", "member", and "outcast". 
-		 * It is also possible to have no defined affiliation.
-		 *
-		 * @return The user's affiliation
-		 */
-		[Bindable(event=affiliationSet)]
-		public function get affiliation():String
-		{
-			return myAffiliation;
-		}
-	
-		/**
-		 * Determines whether the connection to the room is active - that is, the user 
-		 * is connected and has joined the room.
-		 *
-		 * @return True if the connection is active; false otherwise.
-		 */
-		[Bindable(event=activeStateUpdated)]
-		public function get isActive():Boolean
-		{
-			return _active;
-		}
-		
-		private function setActive(state:Boolean):void
-		{
-			_active = state;
-			dispatchEvent(new Event("activeStateUpdated"));
-		}
-
-		private function handleEvent( eventObj:Object ):void
-		{
-			switch( eventObj.type )
-			{
-				case "message":
-					var msg:Message = eventObj.data;
-					
-					// Check to see that the message is from this room
-					if( isThisRoom( msg.from.unescaped ) ) 
-					{
-						var e:RoomEvent;
-						if ( msg.type == Message.GROUPCHAT_TYPE ) 
-						{
-							// Check for a subject change
-							if( msg.subject != null ) 
-							{
-								mySubject = msg.subject;
-								e = new RoomEvent(RoomEvent.SUBJECT_CHANGE);
-								e.subject = msg.subject;
-								dispatchEvent(e);
-							}
-							else 
-							{
-								//silently ignore "room is not anonymous" message, identified by status code 100
-								//Clients should display that information in their UI based on the appropriate room property
-								var userexts:Array = msg.getAllExtensionsByNS(MUCUserExtension.NS);
-								if(!userexts || userexts.length == 0 || !(userexts[0].hasStatusCode(100)))
-								{
-									e = new RoomEvent(RoomEvent.GROUP_MESSAGE);
-									e.data = msg;
-									dispatchEvent(e);
-								}
-							}
-						} 
-						else if ( msg.type == Message.NORMAL_TYPE ) 
-						{
-								var form:Array = msg.getAllExtensionsByNS(FormExtension.NS)[0];
-								if (form) 
-								{
-									e = new RoomEvent(RoomEvent.CONFIGURE_ROOM);
-									e.data = form;
-									dispatchEvent(e);
-								}
-
-						}
-					}
-					else if( isThisUser(msg.to.unescaped) && msg.type == Message.CHAT_TYPE ) 
-					{ // It could be a private message via the conference
-						e = new RoomEvent(RoomEvent.PRIVATE_MESSAGE);
-						e.data = msg;
-						dispatchEvent(e);
-	                }
-	                else 
-	                { // Could be an decline to a previous invite
-	                	var mucExtensions:Array = msg.getAllExtensionsByNS(MUCUserExtension.NS);
-	                	if (mucExtensions != null && mucExtensions.length > 0) {
-	                		var muc:MUCUserExtension = mucExtensions[0];
-		                	if (muc && muc.type == MUCUserExtension.DECLINE_TYPE) 
-		                	{
-		                    	e = new RoomEvent(RoomEvent.DECLINED);
-		                    	e.from = muc.reason;
-		                    	e.reason = muc.reason;
-		                    	e.data = msg;
-		                    	dispatchEvent(e);
-		                    }
-		                }
-	                }
-					break;
-					
-				case "presence":
-	                //trace("ROOM presence: " + presence.from + " : " + nickname);
-					for each(var presence:Presence in eventObj.data)
-					{
-						if (presence.type == Presence.ERROR_TYPE) 
-						{
-							switch (presence.errorCode) 
-							{
-								case 401:
-									e = new RoomEvent(RoomEvent.PASSWORD_ERROR);
-									break;
-								
-								case 403:
-									e = new RoomEvent(RoomEvent.BANNED_ERROR);
-									break;
-								
-								case 404:
-									e = new RoomEvent(RoomEvent.LOCKED_ERROR);
-									break;
-									
-								case 407:
-									e = new RoomEvent(RoomEvent.REGISTRATION_REQ_ERROR);
-									break;
-								
-								case 409:
-									e = new RoomEvent(RoomEvent.NICK_CONFLICT);
-									e.nickname = nickname;
-									break;
-								
-								case 503:
-									e = new RoomEvent(RoomEvent.MAX_USERS_ERROR);
-									break;
-									
-								default:
-									e = new RoomEvent("MUC Error of type: " + presence.errorCode);
-									break;
-							}
-							e.errorCode = presence.errorCode;
-							e.errorMessage = presence.errorMessage;
-							dispatchEvent(e);
-						}
-						else if( isThisRoom( presence.from.unescaped ) ) 
-						{
-							// If the presence has our pending nickname, nickname change went through
-							if( presence.from.resource == pendingNickname ) 
-							{
-								myNickname = pendingNickname;
-								pendingNickname = null;
-							}
-							
-							var user:MUCUserExtension = presence.getAllExtensionsByNS(MUCUserExtension.NS)[0];
-							for each(var status:MUCStatus in user.statuses)
-							{
-								switch (status.code) 
-								{
-									case 100:
-									case 172:
-										anonymous = false;
-										break;
-									case 174:
-										anonymous = true;
-										break;
-									case 201:
-										unlockRoom(myIsReserved);
-										break;
-									case 307:
-										e = new RoomEvent(RoomEvent.USER_KICKED);
-										e.nickname = presence.from.resource;
-										dispatchEvent(e);
-										break;
-									case 301:
-										e = new RoomEvent(RoomEvent.USER_BANNED);
-										e.nickname = presence.from.resource;
-										dispatchEvent(e);
-										break;
-								}
-							}
-	
-							updateRoomRoster( presence );
-		
-							if (presence.type == Presence.UNAVAILABLE_TYPE && isActive && isThisUser(presence.from.unescaped)) 
-							{
-								//trace("Room: becoming inactive: " + presence.getNode());
-								setActive(false);
-								if(user.type == MUCUserExtension.DESTROY_TYPE)
-									e = new RoomEvent(RoomEvent.ROOM_DESTROYED);
-								else
-									e = new RoomEvent(RoomEvent.ROOM_LEAVE);
-								dispatchEvent(e);
-								myConnection.removeEventListener(PresenceEvent.PRESENCE, handleEvent);
-							}
-						}
-					}
-					break;
-	
-					
-				case "disconnection":
-					// The server disconnected, so we are no longer active
-					setActive(false);
-					removeAll();
-					e = new RoomEvent(RoomEvent.ROOM_LEAVE);
-					dispatchEvent(e);
-					break;
-			}
-		}
-	
-	    /*
-	     * Room owner (creation/configuration/destruction) methods
-	     */
-	
-	    private function unlockRoom( isReserved:Boolean ):void
-	    {
-	        // http://www.jabber.org/jeps/jep-0045.html#createroom
-	
-	        if( isReserved ) {
-	            requestConfiguration();
-	        } else {
-	            // Send an empty configuration form to open the instant room
-	
-	            // The IQ.result for this request will signify that the room is
-	            // unlocked.  Sometimes there are messages that are sent before
-	            // the request is returned.  It may be smart to either block those
-	            // messages, or provide 2 events "beginConfiguration" and "endConfiguration"
-	            // so the application can decide to block configuration messages
-	
-	            var iq:IQ = new IQ(roomJID.escaped, IQ.SET_TYPE);
-	            var owner:MUCOwnerExtension = new MUCOwnerExtension();
-	            var form:FormExtension = new FormExtension();
-	
-	            form.type = FormExtension.SUBMIT_TYPE;
-	
-	            owner.addExtension(form);
-	            iq.addExtension(owner);
-	            myConnection.send(iq);
-	        }
-	    }
-	
-		/**
-		 * Requests a configuration form from the room.  Listen to <code>configureForm</code>
-	     * event to fill out the form then call either <code>configure</code> or
-	     * <code>cancelConfiguration</code> to complete the configuration process
-	     *
-	     * You must be joined to the room and have the owner affiliation to request 
-	     * a configuration form
-		 *
-	     * @see #configureForm
-	     * @see #configure
-	     * @see #cancelConfiguration
-		 */
-	    public function requestConfiguration():void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.GET_TYPE);
-	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
-	
-	        iq.callbackScope = this;
-	        iq.callbackName = "finish_requestConfiguration";
-	        iq.addExtension(owner);
-	
-	        myConnection.send(iq);
-	    }
-	
-	    /**
-	     * @private
-	     *  
-	     * IQ callback when form is ready
-	     */
-	    public function finish_requestConfiguration(iq:IQ):void
-	    {
-			if( iq.type == IQ.ERROR_TYPE ) {
-				finish_admin(iq);
-				return;
-			}
-	
-			var owner:MUCOwnerExtension = iq.getAllExtensionsByNS(MUCOwnerExtension.NS)[0];
-	        var form:FormExtension = owner.getAllExtensionsByNS(FormExtension.NS)[0];
-	
-	        if( form.type == FormExtension.REQUEST_TYPE ) 
-	        {
-	        	var e:RoomEvent = new RoomEvent(RoomEvent.CONFIGURE_ROOM);
-	        	e.data = form;
-	        	dispatchEvent(e);
-	        }
-	    }
-	
-		/**
-		 * Sends a configuration form to the room.
-	     *
-	     * You must be joined and have owner affiliation to configure the room
-	     *
-	     * @param fieldmap FormExtension, or a hash that is an object with keys being the room configuration
-	     * form variables and the values being arrays. For single value fields, use a single 
-	     * element array.
-	     * @see #configureForm
-		 */
-	    public function configure(fieldmap:Object):void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.SET_TYPE);
-	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
-			var form:FormExtension;
-	
-			if (fieldmap is FormExtension) {
-				form = FormExtension(fieldmap);
-			} else {
-				form = new FormExtension();
-				fieldmap["FORM_TYPE"] = [MUCOwnerExtension.NS];
-				form.setFields(fieldmap);
-			}
-			form.type = FormExtension.SUBMIT_TYPE;
-			owner.addExtension(form);
-	
-	        iq.addExtension(owner);
-	        myConnection.send(iq);
-	    }
-	
-		/**
-		 * Cancels the configuration process.  The room may still be locked if
-	     * you cancel the configuration process when attempting to join a
-	     * reserved room.
-	     *
-	     * <p>You must have joined the room and have the owner affiliation to 
-	     * configure the room.</p>
-	     *
-	     * @see #configureForm
-	     * @see #join
-		 */
-	    public function cancelConfiguration():void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.SET_TYPE);
-	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
-	        var form:FormExtension = new FormExtension();
-	
-	        form.type = FormExtension.CANCEL_TYPE;
-	
-	        owner.addExtension(form);
-	        iq.addExtension(owner);
-	        myConnection.send(iq);
-	    }
-	
-	    /**
-	     * Grants permissions on a room one or more JIDs by setting the 
-	     * affiliation of a user based * on their JID.
-	     *
-	     * <p>If the JID currenly has an existing affiliation, then the existing 
-	     * affiliation will be replaced with the one passed. If the process could not be 
-	     * completed, the room will dispatch the event <code>RoomEvent.ADMIN_ERROR</code>.
-	     * 
-	     * @param affiliation Use one of the 
-	     * following affiliations: <code>Room.MEMBER_AFFILIATION</code>,
-	     * <code>Room.ADMIN_AFFILIATION</code>,
-	     * <code>Room.OWNER_AFFILIATION</code>
-	     * @param jids An array of UnescapedJIDs to grant these permissions to
-	     * @see #revoke
-	     * @see #allow
-	     */
-	    public function grant(affiliation:String, jids:Array):void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.SET_TYPE);
-	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
-	
-		    iq.callbackScope = this;
-		    iq.callback = finish_admin;
-	
-	        for each(var jid:UnescapedJID in jids) 
-	        {
-	            owner.addItem(affiliation, null, null, jid.escaped, null, null);
-	        }
-	
-	        iq.addExtension(owner);
-	        connection.send(iq);
-	    }
-	
-	    /**
-	     * Revokes all affiliations from the JIDs. This is the same as:
-	     * <code>grant( Room.NO_AFFILIATION, jids )</code>
-	     * 
-	     * <p>If the process could not be completed, the room will dispatch the event
-	     * <code>RoomEvent.ADMIN_ERROR</code>. Note: if the JID is banned from this room, 
-	     * then this will also revoke the banned status.</p>
-	     * 
-	     * @param jids An array of UnescapedJIDs to revoke affiliations from
-	     * @see #grant
-	     * @see #allow
-	     */
-	    public function revoke(jids:Array):void
-	    {
-	        grant(Room.NO_AFFILIATION, jids);
-	    }
-	
-	    /**
-	     * Bans an array of JIDs from entering the room.
-	     *
-	     * <p>If the process could not be completed, the room will dispatch the event
-	     * <code>RoomEvent.ADMIN_ERROR</code>.</p>
-	     * 
-	     * @param jids An arry of JIDs to ban
-	     */
-	    public function ban(jids:Array):void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.SET_TYPE);
-	        var adminExt:MUCAdminExtension = new MUCAdminExtension();
-
-		    iq.callbackScope = this;
-		    iq.callback = finish_admin;
-	
-	        for each(var banJID:UnescapedJID in jids) 
-	        {
-	            adminExt.addItem(Room.OUTCAST_AFFILIATION, null, null, banJID.escaped, null, null);
-	        }
-	
-	        iq.addExtension(adminExt);
-	        connection.send(iq);
-	    }
-	
-	    /**
-	     * Allow a previously banned JIDs to enter this room.  This is the same as:
-	     * Room.grant(NO_AFFILIATION, jid)
-	     *
-	     * <p>If the process could not be completed, the room will dispatch the event
-	     * <code>RoomEvent.ADMIN_ERROR</code></p>
-	     * 
-	     * @param jids An array of JIDs to allow
-	     * @see #grant
-	     * @see #revoke
-	     */
-	    public function allow( jids:Array ):void
-	    {
-	        grant(Room.NO_AFFILIATION, jids);
-	    }
-	
-	    /*
-	     * The default handler for admin IQ messages
-	     * Dispatches the adminError event if anything went wrong
-	     */
-	    private function finish_admin(iq:IQ):void
-	    {
-	        if (iq.type == IQ.ERROR_TYPE) 
-	        {
-	        	var e:RoomEvent = new RoomEvent(RoomEvent.ADMIN_ERROR);
-	        	e.errorCondition = iq.errorCondition;
-	        	e.errorMessage = iq.errorMessage;
-	        	e.errorType = iq.errorType;
-	        	e.errorCode = iq.errorCode;
-	        	dispatchEvent(e);
-	        }
-	    }
-	
-	    /**
-	     * Requests an affiliation list for a given affiliation with with room.
-	     * This will either dispatch the event <code>RoomEvent.AFFILIATIONS</code> or 
-	     * <code>RoomEvent.ADMIN_ERROR</code> depending on the result of the request.
-	     *
-	     * @param affiliation Use one of the following affiliations: <code>Room.NO_AFFILIATION</code>,
-	     * <code>Room.OUTCAST_AFFILIATION</code>,
-	     * <code>Room.MEMBER_AFFILIATION</code>,
-	     * <code>Room.ADMIN_AFFILIATION</code>,
-	     * <code>Room.OWNER_AFFILIATION</code>
-	     * @see #revoke
-	     * @see #grant
-	     * @see #affiliations
-	     */
-	    public function requestAffiliations( affiliation:String ):void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.GET_TYPE);
-	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
-	
-	        iq.callbackScope = this;
-	        iq.callbackName = "finish_requestAffiliates";
-	
-	        owner.addItem(affiliation);
-	
-	        iq.addExtension(owner);
-	        connection.send(iq);
-	    }
-	
-	    private function finish_requestAffiliates(iq:IQ):void
-	    {
-	        finish_admin(iq);
-	        if (iq.type == IQ.RESULT_TYPE) {
-	   
-		            var owner:MUCOwnerExtension = iq.getAllExtensionsByNS(MUCOwnerExtension.NS)[0];
-		            var items:Array = owner.getAllItems();
-		            // trace("Affiliates: " + items);
-		            var e:RoomEvent = new RoomEvent(RoomEvent.AFFILIATIONS);
-		            e.data = items;
-		            dispatchEvent(e);
-	        	
-
-	        }
-	    }
-	
-		/**
-		 * Destroys a reserved room.  If the room has been configured to be persistent,
-	     * then it is optional that the server will permanently remove the room.
-	     *
-	     * @param reason A short description of why the room is being destroyed
-	     * @param alternateJID A JID for current members to use as an alternate room to join 
-	     * after the room has been destroyed. Like a postal forwarding address.
-		 */
-	    public function destroy( reason:String, alternateJID:UnescapedJID = null, callback:Function = null ):void
-	    {
-	        var iq:IQ = new IQ(roomJID.escaped, IQ.SET_TYPE);
-	        var owner:MUCOwnerExtension = new MUCOwnerExtension();
-	
-	        iq.callback = callback;
-	        owner.destroy(reason, alternateJID.escaped);
-	
-	        iq.addExtension(owner);
-	        myConnection.send(iq);
-	    }
-	    
-	    private function getOccupantNamed(inName:String):RoomOccupant
-	    {
-	    	for each(var occ:RoomOccupant in this)
-			{
-				if(occ.displayName == inName)
-				{
-					return occ;
-				}
-			}
-			return null;
-	    }
-		
-		private function updateRoomRoster( aPresence:Presence ):void
-		{
-			var userNickname:String = aPresence.from.unescaped.resource;
-			var userExts:Array = aPresence.getAllExtensionsByNS(MUCUserExtension.NS);
-			var item:MUCItem = userExts[0].getAllItems()[0];
-			var e:RoomEvent;
-			
-			/*if we receive a presence about ourselves, it means 
-			 *a) we've joined the room; tell everyone, then proceed as usual
-			 *b) we're being told we left, which we handle in the caller
-			 */	
-			if ( isThisUser( aPresence.from.unescaped ) ) 
-			{
-				myAffiliation = item.affiliation;
-				dispatchEvent(new Event("affiliationSet")); //update bindings
-				myRole = item.role;
-				dispatchEvent(new Event("roleSet")); //update bindings
-		
-				if (!isActive && aPresence.type != Presence.UNAVAILABLE_TYPE) 
-				{
-					setActive(true);
-					e = new RoomEvent(RoomEvent.ROOM_JOIN);
-					dispatchEvent(e);
-				}
-			}
-			
-			var occupant:RoomOccupant = getOccupantNamed(userNickname);		
-			
-			//if we already know about this occupant, we're either being told about them leaving, or about a presence update
-			if(occupant)
-			{
-				if( aPresence.type == Presence.UNAVAILABLE_TYPE ) 
-				{
-					removeItemAt(getItemIndex(occupant));
-					
-					var user:MUCUserExtension = aPresence.getAllExtensionsByNS(MUCUserExtension.NS)[0];
-					for each(var status:MUCStatus in user.statuses)
-					{
-						// If the user left as a result of a kick or ban, so no need to dispatch a USER_DEPARTURE event as we already dispatched USER_KICKED/USER_BANNED
-						if (status.code == 307 || status.code == 301)
-							return;
-					}
-					
-	                // Notify listeners that a user has left the room
-	           		e = new RoomEvent(RoomEvent.USER_DEPARTURE);
-	            	e.nickname = userNickname;
-	            	e.data = aPresence;
-	            	dispatchEvent(e);
-	            }
-	            else 
-	            {
-	            	occupant.affiliation = item.affiliation;
-	            	occupant.role = item.role;
-	            	occupant.show = aPresence.show;
-	            }
-	  		}
-	  		else if( aPresence.type != Presence.UNAVAILABLE_TYPE ) 
-	  		{
-		 		// We didn't know about this occupant yet, so we add them, then let everyone know that we did.
-		 		addItem( new RoomOccupant(userNickname, aPresence.show, item.affiliation, item.role, item.jid ? item.jid.unescaped : null, this) );
-		
-				e = new RoomEvent(RoomEvent.USER_JOIN);
-				e.nickname = userNickname;
-				e.data = aPresence;
-				dispatchEvent(e);
-			}	
-		}
-		
-		/**
-		 * Determines if the <code>sender</code> parameter is the same
-		 * as the room's JID.
-		 *
-		 * @param the room JID to test
-		 * @return true if the passed JID matches the getRoomJID
-		 */
-		public function isThisRoom( sender:UnescapedJID ):Boolean
-		{
-			// Checks to see that sender is this room
-			return roomJID && sender.bareJID.toLowerCase() == roomJID.bareJID.toLowerCase();
-		}
-	
-		/**
-		 * Determines if the <code>sender</code> param is the
-		 * same as the user's JID.
-		 *
-		 * @param the room JID to test
-		 * @return true if the passed JID matches the userJID
-		 */
-		public function isThisUser( sender:UnescapedJID ):Boolean
-		{
-			// Case insensitive check that the sender is the same as the user
-			return sender.toString().toLowerCase() == userJID.toString().toLowerCase();
-		}
-		
-		/**
-		 * The conference server to use for this room. Usually, this is a subdomain of 
-		 * the primary XMPP server, like conference.myserver.com.
-		 */
-		public function get conferenceServer():String
-		{
-			return myJID.domain;
-		}
-		 
-		/**
-		 * @private
-		 */
-		public function set conferenceServer( aServer:String ):void
-		{
-			roomJID = new UnescapedJID(roomName + "@" + aServer);
-		}
-		
-		/**
-		 * The room name that should be used when joining.
-		 */
-		public function get roomName():String
-		{
-			return myJID.node;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set roomName( aName:String ):void
-		{
-			roomJID = new UnescapedJID(aName + "@" + conferenceServer);
-		}
-		
-		/**
-		 * The nickname to use when joining.
-		 */
-		public function get nickname():String
-		{
-			return myNickname == null ? myConnection.username : myNickname;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set nickname( theNickname:String ):void
-		{	
-			if( isActive ) {
-				pendingNickname = theNickname;
-				// var tempPresence:Presence = new Presence( userJID );
-				var tempPresence:Presence = new Presence( new EscapedJID(userJID + "/" + pendingNickname) );
-				myConnection.send( tempPresence );
-			}
-			else {
-				myNickname = theNickname;
-			}
-		}
-
-		/**
-		 * The password.
-		 */
-	    public function get password():String
-	    {
-	        return myPassword;
-	    }
-	
-		/**
-		 * @private
-		 */
-	    public function set password(aPassword:String):void
-	    {
-	        myPassword = aPassword;
-	    } 
-	
-		/**
-		 * The subject. (Read-only)
-		 */
-		[Bindable(event=subjectChange)]
-	    public function get subject():String
-	    {
-	        return mySubject;
-	    }
-	    
-	    /**
-	     * Whether the room shows full JIDs or not; (Read-only) 
-	     */
-	    public function get anonymous():Boolean
-	    {
-	    	return _anonymous;
-	    }
-	    
-	    /**
-	     * Don't call this; it would be private, but ActionScript apparently doesn't like mixed-visibility properties
-	     */
-	    public function set anonymous(newState:Boolean):void
-	    {
-	    	_anonymous = newState;
-	    }
-	    
-		/**
-	     * @private
-		 */ 
-		override public function toString():String
-	    {
-	    	return '[object Room]';
-	    }
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/conference/RoomFile.as
===================================================================
--- org/jivesoftware/xiff/conference/RoomFile.as	(revision 11020)
+++ org/jivesoftware/xiff/conference/RoomFile.as	(working copy)
@@ -1,10 +0,0 @@
-package org.jivesoftware.xiff.conference
-{
-	public class RoomFile
-	{
-		public function RoomFile()
-		{
-		}
-
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/conference/RoomFileRepository.as
===================================================================
--- org/jivesoftware/xiff/conference/RoomFileRepository.as	(revision 11020)
+++ org/jivesoftware/xiff/conference/RoomFileRepository.as	(working copy)
@@ -1,19 +0,0 @@
-package org.jivesoftware.xiff.conference
-{
-	import mx.collections.ArrayCollection;
-	
-	public class RoomFileRepository
-	{
-//		private _baseurl:String;
-//		
-//		[Bindable]
-//		public files:ArrayCollection;
-//		
-//		public function RoomFileRepository(fileRepoURL:String)
-//		{
-//			_baseurl = fileRepoURL;
-//			files = new ArrayCollection();
-//		}
-
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/conference/RoomOccupant.as
===================================================================
--- org/jivesoftware/xiff/conference/RoomOccupant.as	(revision 11020)
+++ org/jivesoftware/xiff/conference/RoomOccupant.as	(working copy)
@@ -1,124 +0,0 @@
-package org.jivesoftware.xiff.conference
-{
-	import flash.events.EventDispatcher;
-	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.im.Contact;
-	import org.jivesoftware.xiff.data.im.RosterItemVO;
-
-	public class RoomOccupant extends EventDispatcher implements Contact
-	{
-		private var _nickname:String;
-		private var _show:String;
-		private var _affiliation:String;
-		private var _role:String;
-		private var _jid:UnescapedJID;
-		private var _uid:String;
-		private var _room:Room;
-		
-		public function RoomOccupant(nickname:String, show:String, affiliation:String, role:String, jid:UnescapedJID, room:Room)
-		{
-			this.displayName = nickname;
-			this.show = show;
-			this.affiliation = affiliation;
-			this.role = role;
-			this.jid = jid;
-			this.room = room;
-		}
-		
-		public function set online(newOnline:Boolean):void
-		{
-			//RoomOccupants can't exist unless they're online
-		}
-		
-		[Bindable]
-		public function get online():Boolean
-		{
-			return true;
-		}
-		
-		public function set uid(i:String):void
-		{
-			_uid = i;
-		}
-		
-		public function get uid():String
-		{
-			return _uid;
-		}
-		
-		//If there isn't a roster item associated with this room occupant (for example, if the room is anonymous), this will return null
-		public function get rosterItem():RosterItemVO
-		{
-			if(!jid)
-				return null;
-			return RosterItemVO.get(jid, true);
-		}
-
-		[Bindable]
-		public function get jid():UnescapedJID
-		{
-			return _jid;
-		}
-		
-		public function set jid(newJID:UnescapedJID):void
-		{
-			_jid = newJID;
-		}
-		
-		[Bindable]
-		public function get displayName():String
-		{
-			return _nickname;
-		}
-		
-		public function set displayName(name:String):void
-		{
-			_nickname = name;
-		}
-		
-		[Bindable]
-		public function get show():String
-		{
-			return _show;
-		}
-		
-		public function set show(newShow:String):void
-		{
-			_show = newShow;
-		}
-		
-		[Bindable]
-		public function get affiliation():String
-		{
-			return _affiliation;
-		}
-		
-		public function set affiliation(newAffil:String):void
-		{
-			_affiliation = newAffil;	
-		}
-		
-		[Bindable]
-		public function get role():String
-		{
-			return _role;
-		}
-		
-		public function set role(newRole:String):void
-		{
-			_role = newRole;
-		}
-		
-		public function set room(newRoom:Room):void
-		{
-			_room = newRoom;
-		}
-		
-		[Bindable]
-		public function get room():Room
-		{
-			return _room;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/core/AbstractJID.as
===================================================================
--- org/jivesoftware/xiff/core/AbstractJID.as	(revision 11020)
+++ org/jivesoftware/xiff/core/AbstractJID.as	(working copy)
@@ -1,200 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.core
-{
-  /**
-   * This is a base class for the JID (Jabber ID) classes. It provides
-   * functionality to determine if a JID is valid, as well as extract the
-   * node, domain and resource from the JID.
-   *
-   * This class should not be instantiated directly, but should be subclassed
-   * instead.
-   */
-  public class AbstractJID
-  {
-    //TODO: this doesn't actually validate properly in some cases; need separate nodePrep, etc...
-    protected static var jidNodeValidator:RegExp = /^([\x29\x23-\x25\x28-\x2E\x30-\x39\x3B\x3D\x3F\x41-\x7E\xA0 \u1680\u202F\u205F\u3000\u2000-\u2009\u200A-\u200B\u06DD \u070F\u180E\u200C-\u200D\u2028-\u2029\u0080-\u009F \u2060-\u2063\u206A-\u206F\uFFF9-\uFFFC\uE000-\uF8FF\uFDD0-\uFDEF \uFFFE-\uFFFF\uD800-\uDFFF\uFFF9-\uFFFD\u2FF0-\u2FFB]{1,1023})/;
-    protected var _node:String = "";
-    protected var _domain:String = "";
-    protected var _resource:String = "";
-
-    /**
-     * Creates a new AbstractJID object.
-     *
-     * @param inJID The JID as a String.
-     * @param validate True if the JID should be validated.
-     */
-    public function AbstractJID(inJID:String, validate:Boolean=false) 
-    {
-      if(validate)
-      {
-        if(!jidNodeValidator.test(inJID) || inJID.indexOf(" ") > -1) 
-        {
-          // TODO: Get rid of trace (use Logger) and create
-          // better exception
-          trace("Invalid JID: %s", inJID);
-          throw "Invalid JID";
-        }
-      }
-      var separatorIndex:int = inJID.lastIndexOf("@");
-      var slashIndex:int = inJID.lastIndexOf("/");
-
-      if(slashIndex >= 0) 
-        _resource = inJID.substring(slashIndex + 1);
-
-      _domain = inJID.substring(separatorIndex + 1, slashIndex >= 0 ? slashIndex : inJID.length);
-
-      if(separatorIndex >= 1)
-        _node = inJID.substring(0, separatorIndex);
-    }
-
-    //if we use the literal regexp notation, flex gets confused and thinks the quote starts a string
-    private static var quoteregex:RegExp = new RegExp('"', "g");
-    private static var quoteregex2:RegExp = new RegExp("'", "g");
-
-    /**
-     * Provides functionality to convert a JID to an escaped format.
-     *
-     * @param n The string to escape.
-     *
-     * @return The escaped string.
-     */
-    public static function escapedNode(n:String):String
-    {
-      if( n && (
-            n.indexOf("@") >= 0 ||
-            n.indexOf(" ") >= 0 ||
-            n.indexOf("\\")>= 0 ||
-            n.indexOf("/") >= 0 ||
-            n.indexOf("&") >= 0 ||
-            n.indexOf("'") >= 0 ||
-            n.indexOf('"') >= 0 ||
-            n.indexOf(":") >= 0 ||
-            n.indexOf("<") >= 0 ||
-            n.indexOf(">") >= 0))
-      {
-        n = n.replace(/\\/g, "\\5c");
-        n = n.replace(/@/g, "\\40");
-        n = n.replace(/ /g, "\\20");
-        n = n.replace(/&/g, "\\26");
-        n = n.replace(/>/g, "\\3e");
-        n = n.replace(/</g, "\\3c");
-        n = n.replace(/:/g, "\\3a");
-        n = n.replace(/\//g, "\\2f");
-        n = n.replace(quoteregex, "\\22");
-        n = n.replace(quoteregex2, "\\27");
-      }
-      return n;
-    }
-
-    /**
-     * Provides functionality to return an escaped JID into a normal String.
-     *
-     * @param n The string to unescape.
-     *
-     * @return The unescaped string.
-     */
-    public static function unescapedNode(n:String):String
-    {
-      if( n && (
-            n.indexOf("\\40") >= 0 ||
-            n.indexOf("\\20") >= 0 ||
-            n.indexOf("\\26")>= 0 ||
-            n.indexOf("\\3e") >= 0 ||
-            n.indexOf("\\3c") >= 0 ||
-            n.indexOf("\\5c") >= 0 ||
-            n.indexOf('\\3a') >= 0 ||
-            n.indexOf("\\2f") >= 0 ||
-            n.indexOf("\\22") >= 0 ||
-            n.indexOf("\\27") >= 0) )
-      {
-        n = n.replace(/\40/g, "@");
-        n = n.replace(/\20/g, " ");
-        n = n.replace(/\26/g, "&");
-        n = n.replace(/\3e/g, ">");
-        n = n.replace(/\3c/g, "<");
-        n = n.replace(/\3a/g, ":");
-        n = n.replace(/\2f/g, "/");
-        n = n.replace(quoteregex, '"');
-        n = n.replace(quoteregex2, "'");
-        n = n.replace(/\5c/g, "\\");
-      }
-      return n;
-    }
-
-    /**
-     * Converts JID represented by this class to a String.
-     *
-     * @return The JID as a String.
-     */
-    public function toString():String 
-    {
-      var j:String = "";
-      if(node)
-        j += node + "@";
-      j += domain;
-      if(resource)
-        j += "/" + resource;
-
-      return j;
-    }
-
-    /**
-     * The JID without the resource.
-     */
-    public function get bareJID():String 
-    {
-      var str:String = toString();
-      var slashIndex:int = str.lastIndexOf("/");
-      if(slashIndex > 0)
-        str = str.substring(0, slashIndex);
-      return str;
-    }
-
-    /**
-     * The resource portion of the JID.
-     */
-    public function get resource():String 
-    {
-      if(_resource.length > 0)
-        return _resource;
-      return null;
-    }
-
-    /**
-     * The node portion of the JID.
-     */
-    public function get node():String 
-    {
-      if(_node.length > 0)
-        return _node;
-      return null;
-    }
-
-    /**
-     * The domain portion of the JID.
-     */
-    public function get domain():String 
-    {
-      return _domain;
-    }
-  }
-}
Index: org/jivesoftware/xiff/core/Browser.as
===================================================================
--- org/jivesoftware/xiff/core/Browser.as	(revision 11020)
+++ org/jivesoftware/xiff/core/Browser.as	(working copy)
@@ -1,162 +0,0 @@
-﻿/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.core
-{	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.browse.BrowseExtension;
-	import org.jivesoftware.xiff.data.disco.InfoDiscoExtension;
-	import org.jivesoftware.xiff.data.disco.ItemDiscoExtension;
-	
-	/**
-	 * This class provides a means of querying for available services on an XMPP
-   * server using the Disco protocol extension. For more information on Disco,
-   * take a look at
-	 * <a href="http://www.jabber.org/jeps/jep-0030.html">JEP-0030</a> and 
-	 * <a href="http://www.jabber.org/jeps/jep-0011.html">JEP-0011</a> for the
-	 * protocol enhancement specifications.
-	 */
-	public class Browser
-	{
-		private var _connection:XMPPConnection;
-		private var _pending:Object;
-	
-		private static var _staticDepends:Array = [ ItemDiscoExtension, InfoDiscoExtension, BrowseExtension, ExtensionClassRegistry ];
-		private static var _isEventEnabled:Boolean = BrowserStaticConstructor();
-	
-		/**
-     * Creates a new Browser object.
-     *
-		 * @param conn A reference to the <code>XMPPConnection</code> instance
-		 * to use.
-		 */
-		public function Browser( conn:XMPPConnection )
-		{
-			connection = conn;
-			_pending = new Object();
-		}
-	
-    /**
-     * @private
-     *
-     * Actionscript does not provide static constructors, but this is a 
-     * way to get aroudn that.
-     */
-		private static function BrowserStaticConstructor():Boolean
-		{
-			ItemDiscoExtension.enable();
-			InfoDiscoExtension.enable();
-			BrowseExtension.enable();
-			return true;
-		}
-	
-		public function getNodeInfo(service:EscapedJID, node:String, callback:String, scope:Object):void
-		{
-			var iq:IQ = new IQ(service, IQ.GET_TYPE);
-			var ext:InfoDiscoExtension = new InfoDiscoExtension(iq.getNode());
-			ext.service = service;
-			ext.serviceNode = node;
-			iq.callbackName = callback;
-			iq.callbackScope = scope;
-			iq.addExtension(ext);
-			connection.send(iq);
-		}
-	
-		public function getNodeItems(service:EscapedJID, node:String, callback:String, scope:Object):void
-		{
-			var iq:IQ = new IQ(service, IQ.GET_TYPE);
-			var ext:ItemDiscoExtension = new ItemDiscoExtension(iq.getNode());
-			ext.service = service;
-			ext.serviceNode = node;
-			iq.callbackName = callback;
-			iq.callbackScope = scope;
-			iq.addExtension(ext);
-			connection.send(iq);
-		}
-	
-		/**
-		 * Retrieves a list of available service information from the server specified. On successful query,
-		 * the callback specified will be called and passed a single parameter containing
-		 * a reference to an <code>IQ</code> containing the query results.
-		 *
-		 * @param server The server to query for available service information
-		 * @param callback The name of a callback function to call when results are retrieved
-		 * @param scope The scope of the callback function
-		 */
-		public function getServiceInfo(server:EscapedJID, callback:String, scope:Object):void
-		{
-			var iq:IQ = new IQ(server, IQ.GET_TYPE);
-			iq.callbackName = callback;
-			iq.callbackScope = scope;
-			iq.addExtension(new InfoDiscoExtension(iq.getNode()));
-			connection.send(iq);
-		}
-	
-		/**
-		 * Retrieves a list of available services items from the server specified. Items include things such
-		 * as available transports and user directories. On successful query, the callback specified in the will be 
-		 * called and passed a single parameter containing the query results.
-		 *
-		 * @param server The server to query for service items
-		 * @param callback The name of a callback function to call when results are retrieved
-		 * @param scope The scope of the callback function
-		 */
-		public function getServiceItems(server:EscapedJID, callback:String, scope:Object):void
-		{
-			var iq:IQ = new IQ(server, IQ.GET_TYPE);
-			iq.callbackName = callback;
-			iq.callbackScope = scope;
-			iq.addExtension(new ItemDiscoExtension(iq.getNode()));
-			connection.send(iq);
-		}
-	
-		/**
-		 * Use the <code>BrowseExtension</code> (jabber:iq:browse namespace) to query a 
-		 * resource for supported features and children.
-		 *
-		 * @param id The full JabberID to query for service items
-		 * @param callback The name of a callback function to call when results are retrieved
-		 * @param scope The scope of the callback function
-		 */
-		public function browseItem(id:EscapedJID, callback:String, scope:Object):void
-		{
-			var iq:IQ = new IQ(id, IQ.GET_TYPE);
-			iq.callbackName = callback;
-			iq.callbackScope = scope;
-			iq.addExtension(new BrowseExtension(iq.getNode()));
-			connection.send(iq);
-		}
-	
-		/**
-		 * The instance of the XMPPConnection class to use for sending and 
-     * receiving data.
-		 */
-		public function get connection():XMPPConnection { return _connection; }
-		
-		/**
-		 * @private
-     *
-     * Read-only.
-		 */
-		public function set connection(val:XMPPConnection):void { _connection=val; }
-	}
-	
-}
Index: org/jivesoftware/xiff/core/EscapedJID.as
===================================================================
--- org/jivesoftware/xiff/core/EscapedJID.as	(revision 11020)
+++ org/jivesoftware/xiff/core/EscapedJID.as	(working copy)
@@ -1,67 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.core
-{
-  /**
-   * This class provides access to a JID (Jabber ID) in escaped form.
-   */
-  public class EscapedJID extends AbstractJID
-  {
-    /**
-     * Creates a new EscapedJID object.
-     *
-     * @param inJID The JID in String form.
-     * @param validate Will validate the JID string if true. Invalid
-     * JIDs will throw an error.
-     */
-    public function EscapedJID(inJID:String, validate:Boolean=false)
-    {
-      super(inJID, validate);
-
-      if(node) {
-        _node = escapedNode(node);
-      }
-    }
-
-    /**
-     * The escaped JID in unescaped form.
-     */
-    public function get unescaped():UnescapedJID
-    {
-      return new UnescapedJID(toString());
-    }
-
-    /**
-     * Determines if two escaped JIDs are equivalent.
-     *
-     * @param testJID The JID with which to test equivalency.
-     *
-     * @return True if the JIDs are equivalent.
-     */
-    public function equals(testJID:EscapedJID, shouldTestBareJID:Boolean):Boolean 
-    {
-      if(shouldTestBareJID)
-        return testJID.bareJID == bareJID;
-      else
-        return testJID.toString() == toString();
-    }
-  }
-}
Index: org/jivesoftware/xiff/core/UnescapedJID.as
===================================================================
--- org/jivesoftware/xiff/core/UnescapedJID.as	(revision 11020)
+++ org/jivesoftware/xiff/core/UnescapedJID.as	(working copy)
@@ -1,67 +0,0 @@
-/*
- * Copyright 2003-2009
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License. 
- * You may obtain a copy of the License at 
- *
- *   http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-package org.jivesoftware.xiff.core
-{
-  /**
-   * This class provides access to a JID (Jabber ID) in unescaped form.
-   */
-  public class UnescapedJID extends AbstractJID
-  {
-    /**
-     * Creates a new UnescapedJID object.
-     *
-     * @param inJID The JID in String form.
-     * @param validate Will validate the JID string if true. Invalid
-     * JIDs will throw an error.
-     */
-    public function UnescapedJID(inJID:String, validate:Boolean=false)
-    {
-      super(inJID, validate);			
-
-      if(node) {
-        _node = unescapedNode(node);
-      }
-    }
-
-    /**
-     * The unescaped JID in escaped form.
-     */
-    public function get escaped():EscapedJID
-    {
-      return new EscapedJID(toString());
-    }
-
-    /**
-     * Determines if two unescaped JIDs are equivalent.
-     *
-     * @param testJID The JID with which to test equivalency.
-     *
-     * @return True if the JIDs are equivalent.
-     */
-    public function equals(testJID:UnescapedJID, shouldTestBareJID:Boolean):Boolean 
-    {
-      if(shouldTestBareJID)
-        return testJID.bareJID == bareJID;
-      else
-        return testJID.toString() == toString();
-    }
-  }
-}
Index: org/jivesoftware/xiff/core/XMPPBOSHConnection.as
===================================================================
--- org/jivesoftware/xiff/core/XMPPBOSHConnection.as	(revision 11020)
+++ org/jivesoftware/xiff/core/XMPPBOSHConnection.as	(working copy)
@@ -1,488 +0,0 @@
-package org.jivesoftware.xiff.core
-{
-	import flash.events.TimerEvent;
-	import flash.utils.Timer;
-	import flash.xml.XMLDocument;
-	import flash.xml.XMLNode;
-	
-	import mx.logging.ILogger;
-	import mx.rpc.events.FaultEvent;
-	import mx.rpc.events.ResultEvent;
-	import mx.rpc.http.HTTPService;
-	
-	import org.jivesoftware.xiff.events.ConnectionSuccessEvent;
-	import org.jivesoftware.xiff.events.DisconnectionEvent;
-	import org.jivesoftware.xiff.events.IncomingDataEvent;
-	import org.jivesoftware.xiff.events.LoginEvent;
-	import org.jivesoftware.xiff.events.OutgoingDataEvent;
-	import org.jivesoftware.xiff.logging.LoggerFactory;
-	import org.jivesoftware.xiff.util.Callback;
-	
-	public class XMPPBOSHConnection extends XMPPConnection
-	{
-		private static const logger:ILogger = LoggerFactory.getLogger("org.jivesoftware.xiff.core.XMPPBOSHConnection");
-		
-		private static const HTTP_PORT:int = 7070;
-		private static const HTTPS_PORT:int = 7443;
-		private static const BOSH_VERSION:String = "1.6";
-		
-		private static const headers:Object = {
-			"post": [],
-			"get": ['Cache-Control', 'no-store', 'Cache-Control', 'no-cache', 'Pragma', 'no-cache']
-		};
-		
-		private const responseTimer:Timer = new Timer(0.0, 1);
-		
-		private var requestCount:int = 0;
-		private var requestQueue:Array = [];
-		private var responseQueue:Array = [];
-		private var isDisconnecting:Boolean = false;
-		private var sid:String;
-		private var rid:Number;
-		
-		private var pollingEnabled:Boolean = false;
-		private var lastPollTime:Date = null;
-		
-		private var inactivity:uint;
-		private var boshPollingInterval:uint = 10000;
-		
-		private var pauseEnabled:Boolean = false;
-		private var maxPause:uint;
-		private var pauseTimer:Timer;
-		
-		private var streamRestarted:Boolean;
-		
-		// These attributes can be configured from outside after creating the instance
-		private var _secure:Boolean;
-		private var _port:Number;
-		private var _maxConcurrentRequests:uint;
-		private var _hold:uint;
-		private var _wait:uint;
-		private var _boshPath:String;
-		
-		public function XMPPBOSHConnection(secure:Boolean = false):void
-		{
-			super();
-			this.secure = secure;
-			this.hold = 1;
-			this.wait = 20;
-			this.maxConcurrentRequests = 2;
-			this.boshPollingInterval = 10000;
-			this.boshPath = "http-bind/";
-		}
-		
-		public override function connect(streamType:String=null):Boolean
-		{
-			logger.debug("BOSH connect()");
-			
-			var attrs:Object = {
-				"xml:lang": "en",
-	            "xmlns": "http://jabber.org/protocol/httpbind",
-	            "xmlns:xmpp": "urn:xmpp:xbosh",
-	            "xmpp:version": "1.0",
-	            "hold": hold,
-	            "rid": nextRID,
-	            "secure": secure,
-	            "wait": wait,
-	            "ver": BOSH_VERSION,
-	            "to": domain
-	        }
-	        
-	        var result:XMLNode = new XMLNode(1, "body");
-	        result.attributes = attrs;
-	        sendRequests(result);
-	
-	        return true;
-		}
-		
-		public function set maxConcurrentRequests(value:uint):void
-		{
-			_maxConcurrentRequests = value;
-		}
-		
-		public function get maxConcurrentRequests():uint
-		{
-			return _maxConcurrentRequests;
-		}
-		
-		public function set hold(value:uint):void
-		{
-			_hold = value;
-		}
-		
-		public function get hold():uint
-		{
-			return _hold;
-		}
-		
-		public function set wait(value:uint):void
-		{
-			_wait = value;
-		}
-		
-		public function get wait():uint
-		{
-			return _wait;
-		}
-		
-		public function set secure(flag:Boolean):void
-		{
-			logger.debug("set secure: {0}", flag);
-			_secure = flag;			
-			port = _secure ? HTTPS_PORT : HTTP_PORT;
-		}
-		
-		public function get secure():Boolean
-		{
-			return _secure;
-		}
-		
-		public override function set port(portnum:Number):void
-		{
-			logger.debug("set port: {0}", portnum);
-			_port = portnum;
-		}
-		
-		public override function get port():Number
-		{
-			return _port;
-		}
-		
-		public function set boshPath(value:String):void
-		{
-			_boshPath = value;
-		}
-		
-		public function get boshPath():String
-		{
-			return _boshPath;
-		}
-		
-		public function get httpServer():String
-		{
-			return (secure ? "https" : "http") + "://" + server + ":" + port + "/" + boshPath;
-		}
-		
-		public override function disconnect():void
-		{
-			if(active)
-			{
-				var data:XMLNode = createRequest();
-				data.attributes.type = "terminate";
-				sendRequests(data);
-				active = false;
-				loggedIn = false;
-				dispatchEvent(new DisconnectionEvent());
-			}
-		}
-		
-		public function processConnectionResponse(responseBody:XMLNode):void
-		{
-			dispatchEvent(new ConnectionSuccessEvent());
-			
-			var attributes:Object = responseBody.attributes;
-			
-			sid = attributes.sid;
-	        wait = attributes.wait;
-	        
-	        if(attributes.polling)
-	        {
-	        	boshPollingInterval = attributes.polling * 1000;
-	        }
-	        if(attributes.inactivity)
-	        {
-	        	inactivity = attributes.inactivity * 1000;
-	        }
-	        if(attributes.maxpause)
-	        {
-	            maxPause = attributes.maxpause * 1000;
-	            pauseEnabled = true;
-	        }
-	        if(attributes.requests)
-	        {
-	            maxConcurrentRequests = attributes.requests;
-	        }
-	        
-	        logger.debug("Polling interval: {0}", boshPollingInterval);
-	        logger.debug("Inactivity timeout: {0}", inactivity);
-	        logger.debug("Max requests: {0}", maxConcurrentRequests);
-	        logger.debug("Max pause: {0}", maxPause);
-	        
-	        active = true;
-	        
-	        addEventListener(LoginEvent.LOGIN, handleLogin);
-	        responseTimer.addEventListener(TimerEvent.TIMER_COMPLETE, processResponse);
-		}
-		
-		private function processResponse(event:TimerEvent=null):void
-		{
-			// Read the data and send it to the appropriate parser
-			var currentNode:XMLNode = responseQueue.shift();
-			var nodeName:String = currentNode.nodeName.toLowerCase();
-			
-			switch( nodeName )
-			{
-				case "stream:features":
-					handleStreamFeatures( currentNode );
-					streamRestarted = false; //avoid triggering the old server workaround
-					break;
-								
-				case "stream:error":
-					handleStreamError( currentNode );
-					break;
-					
-				case "iq":
-					handleIQ( currentNode );
-					break;
-					
-				case "message":
-					handleMessage( currentNode );
-					break;
-					
-				case "presence":
-					handlePresence( currentNode );
-					break;
-					
-				case "success":
-					handleAuthentication( currentNode );
-					break;
-
-				case "failure":
-					handleAuthentication( currentNode );
-					break;
-				default:
-					dispatchError( "undefined-condition", "Unknown Error", "modify", 500 );
-					break;
-			}
-			
-			resetResponseProcessor();
-		}
-	    
-	    protected override function restartStream():void
-	    {
-	    	var data:XMLNode = createRequest();
-			data.attributes["xmpp:restart"] = "true";
-			data.attributes["xmlns:xmpp"] = "urn:xmpp:xbosh";
-			data.attributes["xml:lang"] = "en";
-			data.attributes["to"] = domain;
-			sendRequests(data);
-	        streamRestarted = true;
-	    }
-	    
-	    /**
-	    * returns true if pause request is sent
-	    */
-	    public function pauseSession(seconds:uint):Boolean
-	    {
-	    	logger.debug("Pausing session for {0} seconds", seconds);
-	    	
-	    	var pauseDuration:uint = seconds * 1000;
-	    	if(!pauseEnabled || pauseDuration > maxPause || pauseDuration <= boshPollingInterval)
-	    		return false;
-	    	
-	    	pollingEnabled = false;
-	    	
-	    	var data:XMLNode = createRequest();
-			data.attributes["pause"] = seconds;
-			sendRequests(data);
-			
-			pauseTimer = new Timer(pauseDuration - 2000, 1);
-			pauseTimer.addEventListener(TimerEvent.TIMER, handlePauseTimeout);
-			pauseTimer.start();
-			
-			return true;
-	    }
-	    
-	    private function handlePauseTimeout(e:TimerEvent):void
-	    {
-	    	logger.debug("handlePauseTimeout");
-	    	pollingEnabled = true;
-	    	pollServer();
-	    }
-		
-		private function resetResponseProcessor():void
-		{
-			if(responseQueue.length > 0)
-			{
-				responseTimer.reset();
-				responseTimer.start();
-			}
-		}
-
-		private function httpResponse(req:XMLNode, isPollResponse:Boolean, evt:ResultEvent):void
-		{
-			requestCount--;
-			var rawXML:String = evt.result as String;
-			
-			logger.info("INCOMING {0}", rawXML);
-			
-			var xmlData:XMLDocument = new XMLDocument();
-			xmlData.ignoreWhite = this.ignoreWhite;
-			xmlData.parseXML(rawXML);
-			var bodyNode:XMLNode = xmlData.firstChild;
-			
-			var event:IncomingDataEvent = new IncomingDataEvent();
-			event.data = xmlData;
-			dispatchEvent(event);
-			
-			if(streamRestarted && !bodyNode.hasChildNodes())
-			{
-				streamRestarted = false;
-				bindConnection();
-			}
-			
-			if(bodyNode.attributes["type"] == "terminate")
-			{
-				dispatchError("BOSH Error", bodyNode.attributes["condition"], "", -1);
-				active = false;
-			}
-			
-			if(bodyNode.attributes["sid"] && !loggedIn)
-			{
-				processConnectionResponse(bodyNode);
-				
-				var featuresFound:Boolean = false;
-				for each(var child:XMLNode in bodyNode.childNodes)
-				{
-					if(child.nodeName == "stream:features")
-						featuresFound = true;
-				}
-				if(!featuresFound)
-				{
-					pollingEnabled = true;
-	    			pollServer();
-				}
-			}
-			
-			for each(var childNode:XMLNode in bodyNode.childNodes)
-			{
-				responseQueue.push(childNode);
-			}
-			
-			resetResponseProcessor();
-			
-			//if we have no outstanding requests, then we're free to send a poll at the next opportunity
-			if(requestCount == 0 && !sendQueuedRequests())
-				pollServer();
-		}
-		
-		private function httpError(req:XMLNode, isPollResponse:Boolean, evt:FaultEvent):void
-		{
-			disconnect();
-			dispatchError("Unknown HTTP Error", evt.fault.rootCause.text, "", -1);
-		}
-		
-		protected override function sendXML(body:*):void
-		{
-			sendQueuedRequests(body);
-		}
-		
-		private function sendQueuedRequests(body:*=null):Boolean
-		{
-			if(body)
-				requestQueue.push(body);
-			else if(requestQueue.length == 0)
-				return false;
-				
-			return sendRequests();
-		}
-		
-		//returns true if any requests were sent
-		private function sendRequests(data:XMLNode = null, isPoll:Boolean = false):Boolean
-		{
-			if(requestCount >= maxConcurrentRequests)
-				return false;
-			
-			requestCount++;
-			
-			if(!data)
-			{
-				if(isPoll)
-				{
-					data = createRequest();
-				}
-				else
-				{
-					var temp:Array = [];
-					for(var i:uint = 0; i < 10 && requestQueue.length > 0; i++)
-					{
-						temp.push(requestQueue.shift());
-					}
-					data = createRequest(temp);
-				}
-			}
-			
-			//build the http request
-	        var request:HTTPService = new HTTPService();
-	        request.method = "post";
-	        request.headers = headers[request.method];
-	        request.url = httpServer;
-	        request.resultFormat = HTTPService.RESULT_FORMAT_TEXT;
-	        request.contentType = "text/xml";
-	        
-	        var responseCallback:Callback = new Callback(this, httpResponse, data, isPoll);
-	        var errorCallback:Callback = new Callback(this, httpError, data, isPoll);
-	        
-	        request.addEventListener(ResultEvent.RESULT, responseCallback.call, false);
-	        request.addEventListener(FaultEvent.FAULT, errorCallback.call, false);
-	        
-			request.send(data);
-
-			var event:OutgoingDataEvent = new OutgoingDataEvent();
-			event.data = data;
-			dispatchEvent(event);
-			
-			if(isPoll) {
-				lastPollTime = new Date();
-				logger.info("Polling");
-			}
-			
-			logger.info("OUTGOING {0}", data);
-			
-			return true;
-		}
-    	
-    	private function pollServer():void 
-    	{
-    		//We shouldn't poll if the connection is dead, if we had requests to send instead, or if there's already one in progress
-    		if(!isActive() || !pollingEnabled || sendQueuedRequests() || requestCount > 0)
-    			return;
-    		
-    		//this should be safe since sendRequests checks to be sure it's not over the concurrent requests limit, and we just ensured that the queue is empty by calling sendQueuedRequests()
-    		sendRequests(null, true);
-    	}
-    	
-    	private function get nextRID():Number
-    	{
-    		if(!rid)
-    			rid = Math.floor(Math.random() * 1000000);
-    		return ++rid;
-    	}
-    	
-    	private function createRequest(bodyContent:Array=null):XMLNode
-    	{
-    		var attrs:Object = {
-    			"xmlns": "http://jabber.org/protocol/httpbind",
-				"rid": nextRID,
-				"sid": sid
-    		}
-    		var req:XMLNode = new XMLNode(1, "body");
-    		if(bodyContent)
-    			for each(var content:XMLNode in bodyContent)
-    					req.appendChild(content);
-    		
-    		req.attributes = attrs;
-    		
-    		return req;
-    	}
-	    
-	    private function handleLogin(e:LoginEvent):void
-	    {
-	    	pollingEnabled = true;
-	    	pollServer();
-	    }
-	    
-		//do nothing, we use polling instead
-		public override function sendKeepAlive():void {}
-	}
-}
Index: org/jivesoftware/xiff/core/XMPPConnection.as
===================================================================
--- org/jivesoftware/xiff/core/XMPPConnection.as	(revision 11020)
+++ org/jivesoftware/xiff/core/XMPPConnection.as	(working copy)
@@ -1,1147 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.core
-{	 
-	import flash.events.DataEvent;
-	import flash.events.Event;
-	import flash.events.EventDispatcher;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-	import flash.events.TimerEvent;
-	import flash.net.XMLSocket;
-	import flash.utils.Timer;
-	import flash.xml.XMLDocument;
-	import flash.xml.XMLNode;
-	
-	import mx.logging.ILogger;
-	
-	import org.jivesoftware.xiff.auth.Anonymous;
-	import org.jivesoftware.xiff.auth.External;
-	import org.jivesoftware.xiff.auth.Plain;
-	import org.jivesoftware.xiff.auth.SASLAuth;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.Message;
-	import org.jivesoftware.xiff.data.Presence;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.auth.AuthExtension;
-	import org.jivesoftware.xiff.data.bind.BindExtension;
-	import org.jivesoftware.xiff.data.forms.FormExtension;
-	import org.jivesoftware.xiff.data.register.RegisterExtension;
-	import org.jivesoftware.xiff.data.session.SessionExtension;
-	import org.jivesoftware.xiff.events.*;
-	import org.jivesoftware.xiff.exception.SerializationException;
-	import org.jivesoftware.xiff.logging.LoggerFactory;
-
-	/**
-	 * Dispatched when a password change is successful.
-	 * 
-	 * @eventType org.jivesoftware.xiff.events.ChangePasswordSuccessEvent.PASSWORD_SUCCESS
-	 */
-    [Event(name="changePasswordSuccess", type="org.jivesoftware.xiff.events.ChangePasswordSuccessEvent")]
-    
-    /**
-     * Dispatched when the connection is successfully made to the server.
-     * 
-     * @eventType org.jivesoftware.xiff.events.ConnectionSuccessEvent.CONNECT_SUCCESS
-     */
-    [Event(name="connection", type="org.jivesoftware.xiff.events.ConnectionSuccessEvent")]
-    
-    /**
-     * Dispatched when there is a disconnection from the server.
-     * 
-     * @eventType org.jivesoftware.xiff.events.DisconnectionEvent.DISCONNECT
-     */
-    [Event(name="disconnection", type="org.jivesoftware.xiff.events.DisconnectionEvent")]
-    
-    /**
-     * Dispatched when there is some type of XMPP error.
-     * 
-     * @eventType org.jivesoftware.xiff.events.XIFFErrorEvent.XIFF_ERROR
-     */
-    [Event(name="error", type="org.jivesoftware.xiff.events.XIFFErrorEvent")]
-    
-    /**
-     * Dispatched whenever there is incoming XML data.
-     * 
-     * @eventType org.jivesoftware.xiff.events.IncomingDataEvent.INCOMING_DATA
-     */
-    [Event(name="incomingData", type="org.jivesoftware.xiff.events.IncomingDataEvent")]
-    
-    /**
-     * Dispatched on successful authentication (login) with the server.
-     * 
-     * @eventType org.jivesoftware.xiff.events.LoginEvent.LOGIN
-     */
-    [Event(name="login", type="org.jivesoftware.xiff.events.LoginEvent")]
-    
-    /**
-     * Dispatched on incoming messages.
-     * 
-     * @eventType org.jivesoftware.xiff.events.MessageEvent.MESSAGE
-     */
-    [Event(name="message", type="org.jivesoftware.xiff.events.MessageEvent")]
-    
-    /**
-     * Dispatched whenever data is sent to the server.
-     * 
-     * @eventType org.jivesoftware.xiff.events.OutgoingDataEvent.OUTGOING_DATA
-     */
-    [Event(name="outgoingData", type="org.jivesoftware.xiff.events.OutgoingDataEvent")]
-    
-    /**
-     * Dispatched on incoming presence data.
-     * 
-     * @eventType org.jivesoftware.xiff.events.PresenceEvent.PRESENCE
-     */
-    [Event(name="presence", type="org.jivesoftware.xiff.events.PresenceEvent")]
-    
-    /**
-     * Dispatched on when new user account registration is successful.
-     * 
-     * @eventType org.jivesoftware.xiff.events.RegistrationSuccessEvent.REGISTRATION_SUCCESS
-     */
-    [Event(name="registrationSuccess", type="org.jivesoftware.xiff.events.RegistrationSuccessEvent")]
-    
-    /**
-     * This class is used to connect to and manage data coming from an XMPP server. Use one instance
-     * of this class per connection.
-     */ 
-	public class XMPPConnection extends EventDispatcher
-	{
-		private static const logger:ILogger = LoggerFactory.getLogger("org.jivesoftware.xiff.core.XMPPConnection");
-		
-		/**
-		 * @private
-		 */
-		protected var _useAnonymousLogin:Boolean;
-		
-		/**
-		 * @private
-		 */
-		protected var _socket:XMLSocket;
-		
-		/**
-		 * @private
-		 */
-		protected var myServer:String;
-		
-		/**
-		 * @private
-		 */
-	 	protected var myDomain:String;
-		
-		/**
-		 * @private
-		 */
-		protected var myUsername:String;
-		
-		/**
-		 * @private
-		 */
-		protected var myResource:String;
-		
-		/**
-		 * @private
-		 */
-		protected var myPassword:String;
-	
-		/**
-		 * @private
-		 */
-		protected var myPort:Number;
-		
-		/**
-		 * @private
-		 */
-		protected var _active:Boolean;
-		
-		/**
-		 * @private
-		 */
-		protected var loggedIn:Boolean;
-		
-		/**
-		 * @private
-		 */
-		protected var ignoreWhitespace:Boolean;
-		
-		/**
-		 * @private
-		 */
-		protected var openingStreamTag:String;
-		
-		/**
-		 * @private
-		 */
-		protected var closingStreamTag:String;
-
-		/**
-		 * @private
-		 */
-		protected var sessionID:String;
-		
-		/**
-		 * @private
-		 */
-		protected var pendingIQs:Object;
-		
-		/**
-		 * @private
-		 */
-		protected var _expireTagSearch:Boolean;
-		
-		/**
-		 * @private
-		 */
-		protected var auth:SASLAuth;
-		
-		protected static var _openConnections:Array = [];
-		
-		protected static var saslMechanisms:Object = {
-			"PLAIN":Plain,
-			"ANONYMOUS":Anonymous,
-      "EXTERNAL":External
-		};
-		
-		public function XMPPConnection()
-		{	
-			
-			// Hash to hold callbacks for IQs
-			pendingIQs = new Object();
-			
-			_useAnonymousLogin = false;
-			active = false;
-			loggedIn = false;
-			ignoreWhitespace = true;
-			resource = "xiff";
-			port = 5222;
-			
-			AuthExtension.enable();
-			BindExtension.enable();
-			SessionExtension.enable();
-			RegisterExtension.enable();
-			FormExtension.enable();
-		}
-		
-		/**
-		 * Connects to the server.
-		 *
-		 * @param streamType (Optional) The type of initial stream negotiation, either &lt;flash:stream&gt; or &lt;stream:stream&gt;. 
-		 * Some servers, like Jabber, Inc.'s XCP and Jabberd 1.4 expect &lt;flash:stream&gt; from a Flash client instead of the standard &lt;stream:stream&gt;.
-		 * The options for this parameter are: "flash", "terminatedFlash", "standard" and "terminatedStandard". The default is "terminatedStandard".
-		 *
-		 * @return A boolean indicating whether the server was found.
-		 */
-		public function connect( streamType:String = "terminatedStandard" ):Boolean
-		{
-			
-			// Create the socket
-			_socket = _createXmlSocket(); 
-			
-			active = false;
-			loggedIn = false;
-			
-			// Stream type lets user set opening/closing tag - some servers (jadc2s) prefer <stream:flash> to the standard
-			// <stream:stream>
-			switch( streamType ) {
-				case "flash":
-					openingStreamTag = new String( "<?xml version=\"1.0\"?><flash:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:flash=\"http://www.jabber.com/streams/flash\" version=\"1.0\">" );
-					closingStreamTag = new String( "</flash:stream>" );
-					break;
-					
-				case "terminatedFlash":
-					openingStreamTag = new String( "<?xml version=\"1.0\"?><flash:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:flash=\"http://www.jabber.com/streams/flash\" version=\"1.0\" />" );
-					closingStreamTag = new String( "</flash:stream>" );
-					break;
-					
-				case "standard":
-					openingStreamTag = new String( "<?xml version=\"1.0\"?><stream:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\">" );
-					closingStreamTag = new String( "</stream:stream>" );
-					break;
-			
-				case "terminatedStandard":
-				default:
-					openingStreamTag = new String( "<?xml version=\"1.0\"?><stream:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" />" );
-					closingStreamTag = new String( "</stream:stream>" );
-					break;
-			}
-			_socket.connect( server, port );
-			return true;
-		}
-		
-		public static function registerSASLMechanism(name:String, authClass:Class):void
-		{
-			saslMechanisms[name] = authClass;
-		}
-		
-		public static function disableSASLMechanism(name:String):void
-		{
-			saslMechanisms[name] = null;
-		}
-		
-		/**
-		 * Disconnects from the server if currently connected. After disconnect, 
-		 * a <code>DisconnectionEvent.DISCONNECT</code> event is broadcast.
-		 */
-		public function disconnect():void
-		{
-			if( isActive() ) {
-				sendXML( closingStreamTag );
-				if(_socket)
-					_socket.close();
-				active = false;
-				loggedIn = false;
-				var event:DisconnectionEvent = new DisconnectionEvent();
-				dispatchEvent(event);
-			}
-		}
-		
-		/**
-		 * Sends data to the server. If the data to send cannot be serialized properly, this method throws a <code>SerializeException</code>.
-		 *
-		 * @param o The data to send. This must be an instance of a class that implements the ISerializable interface.
-		 * @see org.jivesoftware.xiff.data.ISerializable
-		 * @example The following example sends a basic chat message to the user with the JID "sideshowbob@springfieldpenitentiary.gov".<br />
-		 * <pre>var msg:Message = new Message( "sideshowbob@springfieldpenitentiary.gov", null, "Hi Bob.", "<b>Hi Bob.</b>", Message.CHAT_TYPE );
-		 * myXMPPConnection.send( msg );</pre>
-		 */
-		public function send( o:XMPPStanza ):void
-		{
-			if( isActive() ) {
-				if( o is IQ ) {
-	                var iq:IQ = o as IQ;
-	                if ((iq.callbackName != null && iq.callbackScope != null) || iq.callback != null)
-	                {
-	                	addIQCallbackToPending( iq.id, iq.callbackName, iq.callbackScope, iq.callback );
-	                }		
-				}
-				var root:XMLNode = o.getNode().parentNode;
-				if (root == null) {
-					root = new XMLDocument();
-				}
-	
-				if (o.serialize(root)) {
-					sendXML( root.firstChild );
-				} else {
-					throw new SerializationException();
-				}
-			}
-		}
-		
-		public function sendKeepAlive():void
-		{
-			if( isActive() ) {
-				sendXML(" ");
-			}
-		}
-		
-		/**
-		 * Determines whether the connection with the server is currently active. (Not necessarily logged in.
-		 * For login status, use the <code>isLoggedIn()</code> method.)
-		 * 
-		 * @return A boolean indicating whether the connection is active.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection#isLoggedIn
-		 */
-		public function isActive():Boolean
-		{
-			return active;
-		}
-		
-		/**
-		 * Determines whether the user is connected and logged into the server.
-		 * 
-		 * @return A boolean indicating whether the user is logged in.
-		 * @see org.jivesoftware.xiff.core.XMPPConnection#isActive
-		 */
-		public function isLoggedIn():Boolean
-		{
-			return loggedIn;
-		}
-		
-		/**
-		 * Issues a request for the information that must be submitted for registration with the server.
-		 * When the data returns, a <code>RegistrationFieldsEvent.REG_FIELDS</code> event is dispatched 
-		 * containing the requested data.
-		 */
-		public function getRegistrationFields():void
-		{
-			var regIQ:IQ = new IQ( new EscapedJID(domain), IQ.GET_TYPE, XMPPStanza.generateID("reg_info_"), "getRegistrationFields_result", this, null);
-			regIQ.addExtension(new RegisterExtension(regIQ.getNode()));
-	
-			send( regIQ );
-		}
-		
-		/**
-		 * Registers a new account with the server, sending the registration data as specified in the fieldMap paramter.
-		 *
-		 * @param fieldMap An object map containing the data to use for registration. The map should be composed of 
-		 * attribute:value pairs for each registration data item.
-		 * @param key (Optional) If a key was passed in the "data" field of the "registrationFields" event, 
-		 * that key must also be passed here.
-		 * required field needed for registration.
-		 */
-		public function sendRegistrationFields( fieldMap:Object, key:String ):void
-		{
-			var regIQ:IQ = new IQ( new EscapedJID(domain), IQ.SET_TYPE, XMPPStanza.generateID("reg_attempt_"), "sendRegistrationFields_result", this, null );
-			var ext:RegisterExtension = new RegisterExtension(regIQ.getNode());
-	
-			for( var i:String in fieldMap ) {
-				ext[i] = fieldMap[i];
-			}
-			if (key != null) {
-				ext.key = key;
-			}
-	
-			regIQ.addExtension(ext);
-			send( regIQ );
-		}
-		
-		/**
-		 * Changes the user's account password on the server. If the password change is successful, 
-		 * the class will broadcast a <code>ChangePasswordSuccessEvent.PASSWORD_SUCCESS</code> event.
-		 *
-		 * @param newPassword The new password
-		 */
-		public function changePassword( newPassword:String ):void
-		{
-			var passwdIQ:IQ = new IQ( new EscapedJID(domain), IQ.SET_TYPE, XMPPStanza.generateID("pswd_change_"), "changePassword_result", this, null );
-			var ext:RegisterExtension = new RegisterExtension(passwdIQ.getNode());
-	
-			ext.username = jid.escaped.bareJID;
-			ext.password = newPassword;
-	
-			passwdIQ.addExtension(ext);
-			send( passwdIQ );
-		}
-		
-		/**
-		 * Gets the fully qualified JID (user@server/resource) of the user. A fully-qualified JID includes 
-		 * the resource. A bare JID does not. To get the bare JID, use the <code>getBareJID()</code> method.
-		 *
-		 * @return The fully qualified JID
-		 * @see #getBareJID
-		 */
-		public function get jid():UnescapedJID
-		{
-			return new UnescapedJID(myUsername + "@" + myDomain + "/" + myResource);
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function changePassword_result( resultIQ:IQ ):void
-		{
-			if( resultIQ.type == IQ.RESULT_TYPE ) {
-				var event:ChangePasswordSuccessEvent = new ChangePasswordSuccessEvent();
-				dispatchEvent(event);
-			}
-			else {
-				// We weren't expecting this
-				dispatchError( "unexpected-request", "Unexpected Request", "wait", 400 );
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function getRegistrationFields_result( resultIQ:IQ ):void
-		{
-			try
-			{
-				var ext:RegisterExtension = resultIQ.getAllExtensionsByNS(RegisterExtension.NS)[0];
-				var fields:Array = ext.getRequiredFieldNames(); //TODO, phase this out
-				
-				var event:RegistrationFieldsEvent = new RegistrationFieldsEvent();
-				event.fields = fields;
-				event.data = ext;
-				
-				dispatchEvent(event);
-			}
-			catch (e:Error)
-			 {
-			 	trace(e.getStackTrace());
-			 }
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function sendRegistrationFields_result( resultIQ:IQ ):void
-		{
-			if( resultIQ.type == IQ.RESULT_TYPE ) {
-
-				var event:RegistrationSuccessEvent = new RegistrationSuccessEvent();
-				dispatchEvent( event );
-			}
-			else {
-				// We weren't expecting this
-				dispatchError( "unexpected-request", "Unexpected Request", "wait", 400 );
-			}
-		}
-		
-		// Listener function from the ListenerXMLSocket
-		/**
-		 * @private
-		 */
-		protected function socketConnected(ev:Event):void
-		{
-			active = true;
-			sendXML( openingStreamTag );
-			var event:ConnectionSuccessEvent = new ConnectionSuccessEvent();
-			dispatchEvent( event );
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function socketReceivedData( ev:DataEvent ):void
-		{
-			// parseXML is more strict in AS3 so we must check for the presence of flash:stream
-			// the unterminated tag should be in the first string of xml data retured from the server
-			if (!_expireTagSearch) 
-			{
-				var pattern:RegExp = new RegExp("<flash:stream");
-				var resultObj:Object = pattern.exec(ev.data);
-				if (resultObj != null) // stop searching for unterminated node
-				{
-					ev.data = ev.data.concat("</flash:stream>");
-					_expireTagSearch = true;
-				}
-			}
-			
-			if(ev.data == "</flash:stream>")
-			{
-				socketClosed(null);
-				return;	
-			}	
-			
-			var xmlData:XMLDocument = new XMLDocument();
-			xmlData.ignoreWhite = this.ignoreWhite;
-			xmlData.parseXML( ev.data );
-			
-			var event:IncomingDataEvent = new IncomingDataEvent();
-			event.data = xmlData;
-			dispatchEvent( event );
-			
-			// Read the data and send it to the appropriate parser
-			var firstNode:XMLNode = xmlData.firstChild;
-			var nodeName:String = firstNode.nodeName.toLowerCase();
-			
-			logger.info("INCOMING: {0}", firstNode);
-			
-			switch( nodeName )
-			{
-				case "stream:stream":
-				case "flash:stream":
-					_expireTagSearch = false;
-					handleStream( firstNode );
-					break;
-					
-				case "stream:error":
-					handleStreamError( firstNode );
-					break;
-					
-				case "iq":
-					handleIQ( firstNode );
-					break;
-					
-				case "message":
-					handleMessage( firstNode );
-					break;
-					
-				case "presence":
-					handlePresence( firstNode );
-					break;
-					
-				case "stream:features":
-					handleStreamFeatures( firstNode );
-					break;
-					
-				case "success":
-					handleAuthentication( firstNode );
-					break;
-
-				case "failure":
-					handleAuthentication( firstNode );
-					break;
-					
-				default:
-					// silently ignore lack of or unknown stanzas
-					// if the app designer wishes to handle raw data they
-					// can on "incomingData".
-	
-					// Use case: received null byte, XMLSocket parses empty document
-					// sends empty document
-					
-					// I am enabling this for debugging
-					dispatchError( "undefined-condition", "Unknown Error", "modify", 500 );
-					break;
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function socketClosed(e:Event):void
-		{	
-			var event:DisconnectionEvent = new DisconnectionEvent();
-			dispatchEvent( event );
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function handleStream( node:XMLNode ):void
-		{
-			sessionID = node.attributes.id;
-			domain = node.attributes.from;
-			
-			for each(var childNode:XMLNode in node.childNodes)
-			{
-				if(childNode.nodeName == "stream:features")
-				{
-					handleStreamFeatures(childNode);
-				}
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function handleStreamFeatures( node:XMLNode ):void
-		{
-			if(!loggedIn)
-			{
-				for each(var feature:XMLNode in node.childNodes)
-				{
-					if (feature.nodeName == "starttls")
-					{
-						if (feature.firstChild && feature.firstChild.nodeName == "required")
-						{
-							// No TLS support yet
-							dispatchError("TLS required", "The server requires TLS, but this feature is not implemented.", "cancel", 501);
-							disconnect();
-							return;
-						}
-					}
-					else if (feature.nodeName == "mechanisms")
-					{
-						configureAuthMechanisms(feature);
-					}
-					
-		        }
-		        
-				if(useAnonymousLogin || (username != null && username.length > 0))
-				{
-					beginAuthentication();
-				}
-				else
-				{
-					getRegistrationFields();
-				}
-			}
-			else
-			{
-				bindConnection();
-			}
-		}
-	    
-	    /**
-		 * @private
-		 */
-	    protected function configureAuthMechanisms(mechanisms:XMLNode):void
-	    {
-	        var authMechanism:SASLAuth;
-	        var authClass:Class;
-	        for each(var mechanism:XMLNode in mechanisms.childNodes) 
-	        {
-	        	authClass = saslMechanisms[mechanism.firstChild.nodeValue];
-	   			if(useAnonymousLogin)
-	   			{
-	   				if(authClass == Anonymous)
-	   					break;
-	   			}
-	   			else
-	   			{
-	   				if(authClass) break;
-	   			}	   			
-	        }
-	
-	        if (!authClass) {
-	        	dispatchError("SASL missing", "The server is not configured to support any available SASL mechanisms", "SASL", -1);
-	        	return;
-	        }
-	        
-	        auth = new authClass(this);
-	    }
-		
-		/**
-		 * @private
-		 */
-		protected function handleStreamError( node:XMLNode ):void
-		{
-			dispatchError( "service-unavailable", "Remote Server Error", "cancel", 502 );
-			
-			// Cancel everything by closing connection
-			try {
-				_socket.close();
-			}
-			catch (error:Error){
-				
-			}
-			active = false;
-			loggedIn = false;
-			var event:DisconnectionEvent = new DisconnectionEvent();
-			
-			dispatchEvent( event );
-		}
-		
-		protected function set active(flag:Boolean):void
-		{
-			if(flag)
-			{
-				_openConnections.push(this);
-			}
-			else
-			{
-				_openConnections.splice(_openConnections.indexOf(this), 1);
-			}
-			_active = flag;
-		}
-		
-		protected function get active():Boolean
-		{
-			return _active;
-		}
-		
-		public static function get openConnections():Array
-		{
-			return _openConnections;
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function handleIQ( node:XMLNode ):IQ
-		{
-			var iq:IQ = new IQ();
-			// Populate the IQ with the incoming data
-			if( !iq.deserialize( node ) ) {
-				throw new SerializationException();
-			}
-			
-			// If it's an error, handle it
-			
-			if( iq.type == IQ.ERROR_TYPE) {
-				dispatchError( iq.errorCondition, iq.errorMessage, iq.errorType, iq.errorCode );
-			}
-			else {
-				
-				// Start the callback for this IQ if one exists
-				if( pendingIQs[iq.id] !== undefined ) {
-					var callbackInfo:* = pendingIQs[iq.id];
-					
-					if(callbackInfo.methodScope && callbackInfo.methodName) {
-						callbackInfo.methodScope[callbackInfo.methodName].apply( callbackInfo.methodScope, [iq] );
-					}			
-					if (callbackInfo.func != null) { 
-						callbackInfo.func( iq );
-					}
-					pendingIQs[iq.id] = null;
-					delete pendingIQs[iq.id];
-				}
-				else {
-					var exts:Array = iq.getAllExtensions();
-					for (var ns:String in exts) {
-						// Static type casting
-						var ext:IExtension = exts[ns] as IExtension;
-						if (ext != null) {
-							var event:IQEvent = new IQEvent(ext.getNS());
-							event.data = ext;
-							event.iq = iq;
-							dispatchEvent( event );
-						}
-					}
-				}
-			}
-	        return iq;
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function handleMessage( node:XMLNode ):Message
-		{
-			var msg:Message = new Message();
-			logger.debug("MESSAGE: {0}", msg);	
-			// Populate with data
-			if( !msg.deserialize( node ) ) {
-				throw new SerializationException();
-			}
-			// ADDED in error handling for messages
-			if( msg.type == Message.ERROR_TYPE ) {
-				var exts:Array = msg.getAllExtensions();
-				dispatchError( msg.errorCondition, msg.errorMessage, msg.errorType, msg.errorCode, exts.length > 0 ? exts[0] : null);
-			}
-			else
-			{
-				var event:MessageEvent = new MessageEvent();
-				event.data = msg;
-				dispatchEvent( event );		
-			}
-	        return msg;
-		}
-		
-		/**
-		 * @private
-		 */
-		private var presenceQueue:Array = [];
-		private var presenceQueueTimer:Timer;
-		protected function handlePresence( node:XMLNode ):Presence
-		{
-			if(!presenceQueueTimer)
-			{
-				presenceQueueTimer = new Timer(1, 1);
-				presenceQueueTimer.addEventListener(TimerEvent.TIMER_COMPLETE, flushPresenceQueue);
-			}
-			
-			var pres:Presence = new Presence();
-			
-			// Populate
-			if( !pres.deserialize( node ) ) {
-				throw new SerializationException();
-			}
-			
-			presenceQueue.push(pres);
-			
-			presenceQueueTimer.reset();
-			presenceQueueTimer.start();
-
-	        return pres;
-		}
-		
-		protected function flushPresenceQueue(evt:TimerEvent):void
-		{
-			var event:PresenceEvent = new PresenceEvent();
-			event.data = presenceQueue;
-			dispatchEvent( event );
-			presenceQueue = [];
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function onIOError(event:IOErrorEvent):void{
-			/*
-			this fires the standard dispatchError method. need to add
-			the appropriate error code
-			*/
-			dispatchError( "service-unavailable", "Service Unavailable", "cancel", 503 );
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function securityError(event:SecurityErrorEvent):void{
-			trace("there was a security error of type: " + event.type + "\nError: " + event.text);
-			dispatchError( "not-authorized", "Not Authorized", "auth", 401 );
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function dispatchError( condition:String, message:String, type:String, code:Number, extension:Extension = null ):void
-		{
-			logger.error("Error: {0} - {1}", condition, message);
-			var event:XIFFErrorEvent = new XIFFErrorEvent();
-			event.errorCondition = condition;
-			event.errorMessage = message;
-			event.errorType = type;
-			event.errorCode = code;
-			event.errorExt = extension;
-			dispatchEvent( event );
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function sendXML( someData:* ):void
-		{
-			logger.info("OUTGOING: {0}", someData);
-			// Data is untyped because it could be a string or XML
-			_socket.send( someData );
-			var event:OutgoingDataEvent = new OutgoingDataEvent();
-			event.data = someData;
-			dispatchEvent( event );
-		}
-		
-		/**
-		 * @private
-		 */
-		protected function beginAuthentication():void
-		{
-	        sendXML(auth.request);
-		}
-	    
-		/**
-		 * @private
-		 */
-	    protected function handleAuthentication(responseBody:XMLNode):void
-	    {
-	        var status:Object = auth.handleResponse(0, responseBody);
-	        if (status.authComplete)
-	        {
-	            if (status.authSuccess)
-	            {
-					loggedIn = true;
-					restartStream();
-	            }
-	            else
-	            {
-					dispatchError("Authentication Error", "", "", 401);
-	                disconnect();
-	            }
-	        }
-	    }
-	    
-		/**
-		 * @private
-		 */
-	    protected function restartStream():void
-	    {
-	        sendXML(openingStreamTag);
-	    }
-	    
-		/**
-		 * @private
-		 */
-	    protected function bindConnection():void 
-	    {
-	    	var bindIQ:IQ = new IQ(null, "set");
-	
-			var bindExt:BindExtension = new BindExtension();
-			if(resource)
-	        	bindExt.resource = resource;
-	        
-	        bindIQ.addExtension(bindExt);
-	        
-			bindIQ.callback = handleBindResponse;
-			bindIQ.callbackScope = this;
-	
-	        send(bindIQ);
-	    }
-	    
-		/**
-		 * @private
-		 */
-	    protected function handleBindResponse(packet:IQ):void
-	    {
-	    	logger.debug("handleBindResponse: {0}", packet.getNode());
-	    	var bind:BindExtension = packet.getExtension("bind") as BindExtension;
-	
-            var jid:UnescapedJID = bind.jid.unescaped;
-            
-            myResource = jid.resource;
-            myUsername = jid.node;
-            domain = jid.domain;
-            
-            establishSession();
-	    }
-	    
-		/**
-		 * @private
-		 */
-	    private function establishSession():void
-	    {
-	        var sessionIQ:IQ = new IQ(null, "set");
-
-	        sessionIQ.addExtension(new SessionExtension());
-	        
-	        sessionIQ.callback = handleSessionResponse;
-	        sessionIQ.callbackScope = this;
-	
-	        send(sessionIQ);
-	    }
-	    
-		/**
-		 * @private
-		 */
-	    private function handleSessionResponse(packet:IQ):void
-	    {
-	    	logger.debug("handleSessionResponse: {0}", packet.getNode());
-			dispatchEvent(new LoginEvent());
-	    }
-		
-		/**
-		 * @private
-		 */
-		protected function addIQCallbackToPending( id:String, callbackName:String, callbackScope:Object, callbackFunc:Function ):void
-		{
-			pendingIQs[id] = {methodName:callbackName, methodScope:callbackScope, func:callbackFunc};
-		}
-		
-		/**
-		 * The XMPP server to use for connection.
-		 */
-		public function get server():String
-		{
-			if (!myServer)
-				return myDomain;
-			return myServer;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set server( theServer:String ):void
-		{
-			myServer = theServer;
-		}
-		
-		/**
-		 * The XMPP domain to use with the server.
-		 */
-		public function get domain():String
-		{
-			if (!myDomain)
-				return myServer;
-			return myDomain;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set domain( theDomain:String ):void
-		{
-			myDomain = theDomain;
-		}
-		
-		/**
-		 * The username to use for connection. If this property is null when <code>connect()</code> is called,
-		 * the class will fetch registration field data rather than attempt to login.
-		 */
-		public function get username():String
-		{
-			return myUsername;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set username( theUsername:String ):void
-		{
-			myUsername = theUsername;
-		}
-		
-		/**
-		 * The password to use when logging in.
-		 */
-		public function get password():String
-		{
-			return myPassword;
-		}
-		
-		public function set password( thePassword:String ):void
-		{
-			myPassword = thePassword;
-		}
-		
-		/**
-		 * The resource to use when logging in. A resource is required (defaults to "XIFF") and 
-		 * allows a user to login using the same account simultaneously (most likely from multiple machines). 
-		 * Typical examples of the resource include "Home" or "Office" to indicate the user's current location.
-		 */
-		public function get resource():String
-		{
-			return myResource;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set resource( theResource:String ):void
-		{
-			if( theResource.length > 0 )
-			{
-				myResource = theResource;
-			}
-		}
-		
-		/**
-		 * Whether to use anonymous login or not.
-		 */
-		public function get useAnonymousLogin():Boolean 
-		{ 
-			return _useAnonymousLogin; 
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set useAnonymousLogin(value:Boolean):void 
-		{
-			// set only if not connected
-			if(!isActive()) _useAnonymousLogin = value;
-		}
-		
-		/**
-		 * The port to use when connecting. The default XMPP port is 5222.
-		 */
-		public function get port():Number
-		{
-			return myPort;
-		}
-		
-		public function set port( portNum:Number ):void
-		{
-			myPort = portNum;
-		}
-	
-		/**
-		 * Determines whether whitespace will be ignored on incoming XML data.
-		 * Behaves the same as <code>XML.ignoreWhite</code>
-		 */
-		public function get ignoreWhite():Boolean
-		{
-			return ignoreWhitespace;
-		}
-	
-		public function set ignoreWhite( val:Boolean ):void
-		{
-			ignoreWhitespace = val;
-		}
-		
-		private function _createXmlSocket():XMLSocket {
-			var socket:XMLSocket = new XMLSocket(server, port);
-			socket.addEventListener(Event.CONNECT,socketConnected);
-			socket.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
-			socket.addEventListener(Event.CLOSE,socketClosed);
-			socket.addEventListener(DataEvent.DATA,socketReceivedData);
-			socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityError);
-			return socket;
-		}
-	}
-}
Index: org/jivesoftware/xiff/core/XMPPSocketConnection.as
===================================================================
--- org/jivesoftware/xiff/core/XMPPSocketConnection.as	(revision 11020)
+++ org/jivesoftware/xiff/core/XMPPSocketConnection.as	(working copy)
@@ -1,232 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.core
-{	 
-	import flash.events.Event;
-	import flash.events.IOErrorEvent;
-	import flash.events.SecurityErrorEvent;
-	import flash.xml.XMLDocument;
-	import flash.xml.XMLNode;
-	
-	import mx.logging.ILogger;
-	
-	import org.jivesoftware.xiff.events.*;
-	import org.jivesoftware.xiff.logging.LoggerFactory;
-	import org.jivesoftware.xiff.util.SocketConn;
-	import org.jivesoftware.xiff.util.SocketDataEvent;
-	
-	/**
-	 * A child of <code>XMPPConnection</code>, this class makes use of the
-	 * Flash AVM2 binary socket instead of the older <code>XMLSocket</code>.
-	 * This gets rid of issues related to the <code>XMLSocket</code>'s appending
-	 * of a null-byte to all outgoing data.
-	 * 
-	 * @see org.jivesoftware.xiff.core.XMPPConnection
-	 */
-	public class XMPPSocketConnection extends XMPPConnection
-	{
-		private static const logger:ILogger = LoggerFactory.getLogger("org.jivesoftware.xiff.core.XMPPSocketConnection");
-		
-		private var _incompleteRawXML: String = '';
-		
-		protected var binarySocket:SocketConn;
-		
-		public function XMPPSocketConnection()
-		{
-			super();
-			configureSocket();
-		}
-		
-		private function configureSocket():void {
-			binarySocket = new SocketConn();
-			
-	        binarySocket.addEventListener(Event.CLOSE, socketClosed);
-	        binarySocket.addEventListener(Event.CONNECT, socketConnected);
-	        binarySocket.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
-	        binarySocket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityError);
-	        binarySocket.addEventListener(SocketDataEvent.SOCKET_DATA_RECEIVED, bSocketReceivedData);
-	    }
-	    
-	    override protected function sendXML( someData:* ):void
-		{
-			logger.info("OUTGOING: {0}", someData);
-			// Data is untyped because it could be a string or XML
-	        binarySocket.sendString(someData);
-
-			var event:OutgoingDataEvent = new OutgoingDataEvent();
-			event.data = someData;
-			dispatchEvent( event );
-		}
-		
-		override public function disconnect():void
-		{
-			if( isActive() ) {
-				sendXML( closingStreamTag );
-				binarySocket.close();
-				active = false;
-				loggedIn = false;
-				var event:DisconnectionEvent = new DisconnectionEvent();
-				dispatchEvent(event);
-			}
-		}
-		
-		override public function connect( streamType:String = "terminatedStandard" ):Boolean
-		{
-			active = false;
-			loggedIn = false;
-			
-			// Stream type lets user set opening/closing tag - some servers (jadc2s) prefer <stream:flash> to the standard
-			// <stream:stream>
-			switch( streamType ) {
-				case "flash":
-					openingStreamTag = "<?xml version=\"1.0\"?><flash:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:flash=\"http://www.jabber.com/streams/flash\" version=\"1.0\">";
-					closingStreamTag = "</flash:stream>";
-					break;
-					
-				case "terminatedFlash":
-					openingStreamTag = "<?xml version=\"1.0\"?><flash:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:flash=\"http://www.jabber.com/streams/flash\" version=\"1.0\" />";
-					closingStreamTag = "</flash:stream>";
-					break;
-					
-				case "standard":
-					openingStreamTag = "<?xml version=\"1.0\"?><stream:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\">";
-					closingStreamTag = "</stream:stream>";
-					break;
-			
-				case "terminatedStandard":
-				default:
-					openingStreamTag = "<?xml version=\"1.0\"?><stream:stream to=\"" + domain + "\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" />";
-					closingStreamTag = "</stream:stream>";
-					break;
-			}
-			binarySocket.connect( server, port );
-			return true;
-		}
-		
-		protected function bSocketReceivedData( ev:SocketDataEvent ):void 
-		{
-			var rawXML:String = _incompleteRawXML + ev.data as String;
-			
-			logger.info("INCOMING: {0}", rawXML);
-			// parseXML is more strict in AS3 so we must check for the presence of flash:stream
-			// the unterminated tag should be in the first string of xml data retured from the server
-			if (!_expireTagSearch) 
-			{
-				var pattern:RegExp = new RegExp("<flash:stream");
-				var resultObj:Object = pattern.exec(rawXML);
-				if (resultObj != null) // stop searching for unterminated node
-				{
-					rawXML = rawXML.concat("</flash:stream>");
-					_expireTagSearch = true;
-				}
-			}
-			
-			if (!_expireTagSearch) 
-			{
-				var pattern2:RegExp = new RegExp("<stream:stream");
-				var resultObj2:Object = pattern2.exec(rawXML);
-				if (resultObj2 != null) // stop searching for unterminated node
-				{
-					rawXML = rawXML.concat("</stream:stream>");
-					_expireTagSearch = true;
-				}
-			}
-			
-			var xmlData:XMLDocument = new XMLDocument();
-			xmlData.ignoreWhite = this.ignoreWhite;
-			
-			//error handling to catch incomplete xml strings that have 
-			//been truncated by the socket
-			try{
-				var isComplete: Boolean = true;
-				xmlData.parseXML( rawXML );
-				_incompleteRawXML = '';
-			}
-			catch(err:Error){
-				isComplete = false;
-				_incompleteRawXML += ev.data as String;//concatenate the raw xml to the previous xml
-			}
-			
-			if (isComplete){
-				
-	
-				var event:IncomingDataEvent = new IncomingDataEvent();
-				event.data = xmlData;
-				dispatchEvent( event );
-				
-				for (var i:int = 0; i<xmlData.childNodes.length; i++)
-				{
-					// Read the data and send it to the appropriate parser
-					var currentNode:XMLNode = xmlData.childNodes[i];
-					var nodeName:String = currentNode.nodeName.toLowerCase();
-					
-					
-					switch( nodeName )
-					{
-						case "stream:stream":
-							_expireTagSearch = false;
-							handleStream( currentNode );
-							break;
-						case "flash:stream":
-							_expireTagSearch = false;
-							handleStream( currentNode );
-							break;
-							
-						case "stream:error":
-							handleStreamError( currentNode );
-							break;
-							
-						case "iq":
-							handleIQ( currentNode );
-							break;
-							
-						case "message":
-							handleMessage( currentNode );
-							break;
-							
-						case "presence":
-							handlePresence( currentNode );
-							break;
-												
-						case "stream:features":
-							handleStreamFeatures( currentNode );
-							break;
-							
-						case "success":
-							handleAuthentication( currentNode );
-							break;
-		
-						case "failure":
-							handleAuthentication( currentNode );
-							break;
-							
-						default:
-							dispatchError( "undefined-condition", "Unknown Error", "modify", 500 );
-							break;
-					}
-				}
-			}
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/AbstractExtension.as
===================================================================
--- org/jivesoftware/xiff/data/AbstractExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/AbstractExtension.as	(working copy)
@@ -1,45 +0,0 @@
-package org.jivesoftware.xiff.data
-{
-	import flash.xml.XMLNode;
-
-	public class AbstractExtension extends Extension implements ISerializable {
-		public function AbstractExtension(parent:XMLNode=null) {
-			super(parent);
-		}
-		
-		public function serialize(parentNode:XMLNode):Boolean
-		{
-			var node:XMLNode = getNode().cloneNode(true);
-			var extensions:Array = getAllExtensions();
-			for (var i:int = 0; i < extensions.length; i++) {
-				if (extensions[i] is ISerializable) {
-					ISerializable(extensions[i]).serialize(node);
-				}
-			}
-			parentNode.appendChild(node);
-			return true;
-		}
-		
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-			for each(var extNode:XMLNode in node.childNodes) 
-			{
-				var extClass:Class = ExtensionClassRegistry.lookup(extNode.attributes.xmlns);
-				if (extClass == null) {
-					continue;
-				}
-				var ext:IExtension = new extClass();
-				if (ext == null) {
-					continue;
-				}
-				if (ext is ISerializable) {
-					ISerializable(ext).deserialize(extNode);
-				}
-				addExtension(ext);
-			}
-			return true;
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/auth/AuthExtension.as
===================================================================
--- org/jivesoftware/xiff/data/auth/AuthExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/auth/AuthExtension.as	(working copy)
@@ -1,243 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.auth
-{	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.auth.SHA1;
-	
-	import flash.xml.XMLNode;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	/**
-	 * Implements <a href="http://www.jabber.org/jeps/jep-0078.html">JEP-0078<a> 
-	 * for non SASL authentication.
-	 */
-	public class AuthExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "jabber:iq:auth";
-		public static var ELEMENT:String = "query";
-	
-		private var myUsernameNode:XMLNode;
-		private var myPasswordNode:XMLNode;
-		private var myDigestNode:XMLNode;
-		private var myResourceNode:XMLNode;
-		
-		public function AuthExtension( parent:XMLNode = null)
-		{
-			super(parent);
-		}
-	
-		/**
-		 * Gets the namespace associated with this extension.
-		 * The namespace for the AuthExtension is "jabber:iq:auth".
-		 *
-		 * @return The namespace
-		 */
-		public function getNS():String
-		{
-			return AuthExtension.NS;
-		}
-	
-		/**
-		 * Gets the element name associated with this extension.
-		 * The element for this extension is "query".
-		 *
-		 * @return The element name
-		 */
-		public function getElementName():String
-		{
-			return AuthExtension.ELEMENT;
-		}
-	
-	    /**
-	     * Registers this extension with the extension registry.  
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(AuthExtension);
-	    }
-		
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			if (!exists(getNode().parentNode)) {
-				parent.appendChild(getNode().cloneNode(true));
-			}
-			return true;
-		}
-	
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			
-			setNode(node);
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-				switch( children[i].nodeName )
-				{
-					case "username":
-						myUsernameNode = children[i];
-						break;
-						
-					case "password":
-						myPasswordNode = children[i];
-						break;
-						
-					case "digest":
-						myDigestNode = children[i];
-						break;
-	
-					case "resource":
-						myResourceNode = children[i];
-						break;
-				}
-			}
-			return true;
-		}
-	
-		/**
-		 * Computes the SHA1 digest of the password and session ID for use when 
-		 * authenticating with the server.
-		 *
-		 * @param sessionID The session ID provided by the server
-		 * @param password The user's password
-		 */
-		public static function computeDigest( sessionID:String, password:String ):String
-		{
-			return SHA1.calcSHA1( sessionID + password ).toLowerCase();
-		}
-	
-		/**
-		 * Determines whether this is a digest (SHA1) authentication.
-		 *
-		 * @return It is a digest (true); it is not a digest (false)
-		 */
-		public function isDigest():Boolean 
-		{ 
-			return exists(myDigestNode); 
-		}
-	
-		/**
-		 * Determines whether this is a plain-text password authentication.
-		 *
-		 * @return It is plain-text password (true); it is not plain-text 
-		 * password (false)
-		 */
-		public function isPassword():Boolean 
-		{ 
-			return exists(myPasswordNode); 
-		}
-	
-		/**
-		 * The username to use for authentication.
-		 */
-		public function get username():String 
-		{
-			if(myUsernameNode && myUsernameNode.firstChild)
-				return myUsernameNode.firstChild.nodeValue;
-			
-			return null; 
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set username(val:String):void 
-		{ 
-			myUsernameNode = replaceTextNode(getNode(), myUsernameNode, "username", val);
-		}
-	
-		/**
-		 * The password to use for authentication.
-		 */
-		public function get password():String 
-		{
-			if(myPasswordNode && myPasswordNode.firstChild)
-				return myPasswordNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set password(val:String):void
-		{
-			// Either or for digest or password
-			myDigestNode = (myDigestNode==null)?(XMLStanza.XMLFactory.createElement('')):(myDigestNode);
-			myDigestNode.removeNode();
-			myDigestNode = null;
-			//delete myDigestNode;
-	
-			myPasswordNode = replaceTextNode(getNode(), myPasswordNode, "password", val);
-		}
-	
-		/**
-		 * The SHA1 digest to use for authentication.
-		 */
-		public function get digest():String 
-		{
-			if(myDigestNode && myDigestNode.firstChild)
-				return myDigestNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set digest(val:String):void
-		{
-			// Either or for digest or password
-			myPasswordNode.removeNode();
-			myPasswordNode = null;
-			//delete myPasswordNode;
-	
-			myDigestNode = replaceTextNode(getNode(), myDigestNode, "digest", val);
-		}
-	
-		/**
-		 * The resource to use for authentication.
-		 *
-		 * @see org.jivesoftware.xiff.core.XMPPConnection#resource
-		 */
-		public function get resource():String
-		{
-			if(myResourceNode && myResourceNode.firstChild)
-				return myResourceNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set resource(val:String):void
-		{
-			myResourceNode = replaceTextNode(getNode(), myResourceNode, "resource", val);
-		}
-	
-	}
-}
Index: org/jivesoftware/xiff/data/auth/SHA1.as
===================================================================
--- org/jivesoftware/xiff/data/auth/SHA1.as	(revision 11020)
+++ org/jivesoftware/xiff/data/auth/SHA1.as	(working copy)
@@ -1,159 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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.s
- * 
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.auth
-{
-	/**
-	 * A static class for SHA1 hash creation. Original ActionScript 1.0 version 
-	 * by Branden Hall. Original ActionScript 2.0 translation by Ron Haberle.
-	 */
-	public class SHA1
-	{
-		private static var hex_chr:String = "0123456789abcdef";
-		
-		/**
-		 * Takes a string and returns the hex representation of its SHA1 hash.
-		 *
-		 * @param str The string to use for calculating the hash
-		 * @return The SHA1 hash of the string passed to the function
-		 */
-		public static function calcSHA1(str:String):String
-		{
-			var x:Array = SHA1.str2blks(str);
-			var w:Array = new Array(80);
-			var a:Number = 1732584193;
-			var b:Number = -271733879;
-			var c:Number = -1732584194;
-			var d:Number = 271733878;
-			var e:Number = -1009589776;
-			for (var i:Number = 0; i < x.length; i += 16)
-			{
-				var olda:Number = a;
-				var oldb:Number = b;
-				var oldc:Number = c;
-				var oldd:Number = d;
-				var olde:Number = e;
-				for (var j:Number = 0; j < 80; j++)
-				{
-					if (j < 16)
-					{
-						w[j] = x[i + j];
-					}
-					else
-					{
-						w[j] = SHA1.rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
-					}
-					var t:Number = SHA1.safe_add(SHA1.safe_add(SHA1.rol(a, 5), SHA1.ft(j, b, c, d)), SHA1.safe_add(SHA1.safe_add(e, w[j]), SHA1.kt(j)));
-					e = d;
-					d = c;
-					c = SHA1.rol(b, 30);
-					b = a;
-					a = t;
-				}
-				a = SHA1.safe_add(a, olda);
-				b = SHA1.safe_add(b, oldb);
-				c = SHA1.safe_add(c, oldc);
-				d = SHA1.safe_add(d, oldd);
-				e = SHA1.safe_add(e, olde);
-			}
-			return SHA1.hex(a) + SHA1.hex(b) + SHA1.hex(c) + SHA1.hex(d) + SHA1.hex(e);
-		}
-		
-		private static function hex(num:Number):String
-		{
-			var str:String = "";
-			for (var j:Number = 7; j >= 0; j--)
-			{
-				str += hex_chr.charAt((num >> (j * 4)) & 0x0F);
-			}
-			return str;
-		}
-		
-		/*
-		 * Convert a string to a sequence of 16-word blocks, stored as an array.
-		 * Append padding bits and the length, as described in the SHA1 standard.
-		 */
-		private static function str2blks(str:String):Array
-		{
-			var nblk:Number = ((str.length + 8) >> 6) + 1;
-			var blks:Array = new Array(nblk * 16);
-			for (var i:Number = 0; i < nblk * 16; i++)
-			{
-				blks[i] = 0;
-			}
-			for (var j:Number = 0; j < str.length; j++)
-			{
-				blks[j >> 2] |= str.charCodeAt(j) << (24 - (j % 4) * 8);
-			}
-			blks[j >> 2] |= 0x80 << (24 - (j % 4) * 8);
-			blks[nblk * 16 - 1] = str.length * 8;
-			return blks;
-		}
-		
-		/*
-		 * Add integers, wrapping at 2^32. This uses 16-bit operations internally
-		 * to work around bugs in some JS interpreters.
-		 */
-		private static function safe_add(x:Number, y:Number):Number
-		{
-			var lsw:Number = (x & 0xFFFF) + (y & 0xFFFF);
-			var msw:Number = (x >> 16) + (y >> 16) + (lsw >> 16);
-			return (msw << 16) | (lsw & 0xFFFF);
-		}
-		
-		/*
-		 * Bitwise rotate a 32-bit number to the left
-		 */
-		private static function rol(num:Number, cnt:Number):Number
-		{
-			return (num << cnt) | (num >>> (32 - cnt));
-		}
-		
-		/*
-		 * Perform the appropriate triplet combination function for the current
-		 * iteration
-		 */
-		private static function ft(t:Number, b:Number, c:Number, d:Number):Number
-		{
-			if (t < 20)
-			{
-				return (b & c) | ((~b) & d);
-			}
-			if (t < 40)
-			{
-				return b ^ c ^ d;
-			}
-			if (t < 60)
-			{
-				return (b & c) | (b & d) | (c & d);
-			}
-			return b ^ c ^ d;
-		}
-		
-		/*
-		 * Determine the appropriate additive constant for the current iteration
-		 */
-		private static function kt(t:Number):Number
-		{
-			return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : (t < 60) ? -1894007588 : -899497514;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/bind/BindExtension.as
===================================================================
--- org/jivesoftware/xiff/data/bind/BindExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/bind/BindExtension.as	(working copy)
@@ -1,87 +0,0 @@
-package org.jivesoftware.xiff.data.bind
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-
-	public class BindExtension extends Extension implements IExtension, ISerializable
-	{
-		public static var NS:String = "urn:ietf:params:xml:ns:xmpp-bind";
-		public static var ELEMENT_NAME:String = "bind";
-		private var _jid:EscapedJID;
-		private var _resource:String;
-		
-		public function getNS():String
-		{
-			return BindExtension.NS;
-		}
-		
-		public function getElementName():String
-		{
-			return BindExtension.ELEMENT_NAME;
-		}
-		
-		public function get jid():EscapedJID
-		{
-			return _jid;
-		}
-		
-		public function serialize(parent:XMLNode):Boolean
-		{
-			if (!exists(getNode().parentNode)) {
-				var child:XMLNode = getNode().cloneNode(true);
-				var resourceNode:XMLNode = new XMLNode(1, "resource");
-				resourceNode.appendChild(XMLStanza.XMLFactory.createTextNode(resource ? resource : "xiff"));
-				child.appendChild(resourceNode);
-				parent.appendChild(child);
-			}
-			return true;
-		}
-		
-		public function BindExtension( parent:XMLNode = null)
-		{
-			super(parent);
-		}
-		
-		/**
-	     * Registers this extension with the extension registry.  
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(BindExtension);
-	    }
-		
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-				switch( children[i].nodeName )
-				{
-					case "jid":
-						_jid = new EscapedJID(children[i].firstChild.nodeValue);
-						break;
-					default:
-						throw "Unknown element: " + children[i].nodeName;
-				}
-			}
-			return true;
-		}
-		
-		public function set resource(newResource:String):void
-		{
-			_resource = newResource;
-		}
-		
-		public function get resource():String
-		{
-			return _resource;
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/browse/BrowseExtension.as
===================================================================
--- org/jivesoftware/xiff/data/browse/BrowseExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/browse/BrowseExtension.as	(working copy)
@@ -1,158 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.browse
-{
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	/**
-	 * Implements jabber:iq:browse namespace.  Use this extension to request the items
-	 * of an agent or service such as the rooms of a conference server or the members of
-	 * a room.
-	 */
-	public class BrowseExtension extends BrowseItem implements IExtension, ISerializable 
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "jabber:iq:browse";
-		public static var ELEMENT:String = "query";
-	
-	    private static var staticDepends:Class = ExtensionClassRegistry;
-	
-		private var myItems:Array;
-	
-		public function BrowseExtension(parent:XMLNode = null)
-		{
-			super(parent);
-	
-			getNode().attributes.xmlns = getNS();
-			getNode().nodeName = getElementName();
-	
-			myItems = new Array();
-		}
-	
-		/**
-		 * Gets the namespace associated with this extension.
-		 * The namespace for the BrowseExtension is "jabber:iq:browse".
-		 *
-		 * @return The namespace
-		 * @availability Flash Player 7
-		 */
-		public function getNS():String
-		{
-			return BrowseExtension.NS;
-		}
-	
-		/**
-		 * Gets the element name associated with this extension.
-		 * The element for this extension is "query".
-		 */
-		public function getElementName():String
-		{
-			return BrowseExtension.ELEMENT;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(BrowseExtension);
-	    }
-	
-		/**
-		 * If you are generating a browse response to a browse request, then
-		 * fill out the items list with this method.
-		 *
-		 * @param item BrowseItem which contains the info related to the browsed resource
-		 * @availability Flash Player 7
-		 * @returns the item added
-		 * @see org.jivesoftware.xiff.data.browse.BrowseItem
-		 */
-		public function addItem(item:BrowseItem):BrowseItem
-		{
-			myItems.push(item);
-			return item;
-		}
-	
-		/**
-		 * An array of BrowseItems containing information about the browsed resource
-		 *
-		 * @availability Flash Player 7
-		 * @returns array of BrowseItems
-		 * @see org.jivesoftware.xiff.data.browse.BrowseItem
-		 */
-		public function get items():Array
-		{
-			return myItems;
-		}
-	
-		/**
-		 * ISerializable implementation which loads this extension from XML
-		 *
-		 * @availability Flash Player 7
-		 * @see org.jivesoftware.xiff.data.ISerializable
-		 */
-		override public function serialize(parentNode:XMLNode):Boolean
-		{
-			var node:XMLNode = getNode();
-			for each (var item:BrowseItem in myItems) {
-				item.serialize(node);
-			}
-	
-			if (!exists(node.parentNode)) {
-				parentNode.appendChild(node.cloneNode(true));
-			}
-	
-			return true;
-		}
-	
-		/**
-		 * ISerializable implementation which saves this extension to XML
-		 *
-		 * @availability Flash Player 7
-		 * @see org.jivesoftware.xiff.data.ISerializable
-		 */
-		override public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-	
-			this['deserialized'] = true;
-	
-			myItems = [];
-	
-			for each (var child:XMLNode in node.childNodes) {
-				switch(child.nodeName) {
-					case "item":
-						var item:BrowseItem = new BrowseItem(getNode());
-						item.deserialize(child);
-						myItems.push(item);
-						break;
-				}
-			}
-			return true;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/browse/BrowseItem.as
===================================================================
--- org/jivesoftware/xiff/data/browse/BrowseItem.as	(revision 11020)
+++ org/jivesoftware/xiff/data/browse/BrowseItem.as	(working copy)
@@ -1,192 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.browse
-{
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	/**
-	 * Class that representes a child resource of a browsed resource.
-	 */
-	public class BrowseItem extends XMLStanza implements ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public function BrowseItem(parent:XMLNode)
-		{
-			super();
-			getNode().nodeName = "item";
-	
-			if (exists(parent)) {
-				parent.appendChild(getNode());
-			}
-	
-		}
-	
-		/**
-		 * The full JabberID of the entity described
-		 */
-		public function get jid():String 
-		{ 
-			return getNode().attributes.jid;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set jid(val:String):void
-		{
-			getNode().attributes.jid = val;
-		}
-	
-		/**
-		 * One of the categories from the list above, or a 
-		 * non-standard category prefixed with the string "x-". 
-		 *
-		 * @see http://www.jabber.org/jeps/jep-0011.html#sect-id2594870
-		 */
-		public function get category():String 
-		{ 
-			return getNode().attributes.category;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set category(val:String):void
-		{
-			getNode().attributes.category = val;
-		}
-	
-		/**
-		 * A friendly name that may be used in a user interface
-		 */
-		public function get name():String 
-		{ 
-			return getNode().attributes.name;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set name(val:String):void
-		{
-			getNode().attributes.name = val;
-		}
-	
-		/**
-		 * One of the official types from the specified category, 
-		 * or a non-standard type prefixed with the string "x-". 
-
-		 * @see http://www.jabber.org/jeps/jep-0011.html#sect-id2594870
-		 */
-		public function get type():String 
-		{ 
-			return getNode().attributes.type;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set type(val:String):void
-		{
-			getNode().attributes.type = val;
-		}
-	
-		/**
-		 * A string containing the version of the node, equivalent 
-		 * to the response provided to a query in the 'jabber:iq:version' 
-		 * namespace. This is useful for servers, especially for lists of 
-		 * services (see the 'service/serverlist' category/type above). 
-		 */
-		public function get version():String 
-		{ 
-			return getNode().attributes.version;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set version(val:String):void
-		{
-			getNode().attributes.version = val;
-		}
-	
-		/**
-		 * Add new features that are supported if you are responding to a 
-		 * browse request
-		 */
-		public function addNamespace(ns:String):XMLNode
-		{
-			return addTextNode(getNode(), "ns", ns);
-		}
-	 
-	 	/**
-		 * On top of the browsing framework, a simple form of "feature
-		 * advertisement" can be built. This enables any entity to advertise 
-		 * whichfeatures it supports, based on the namespaces associated with 
-		 * those features. The <ns/> element is allowed as a subelement of the 
-		 * item. This element contains a single namespace that the entity 
-		 * supports, and multiple <ns/> elements can be included in any item. 
-		 * For a connectedclient this might be <ns>jabber:iq:oob</ns>, or for a 
-		 * service<ns>jabber:iq:search</ns>. This list of namespaces should be 
-		 * used to present available options for a user or to automatically 
-		 * locate functionality for an application.
-		 *
-		 * <p>The children of a browse result may proactively contain a few 
-		 * <ns/> elements (such as the result of the service request to the home 
-		 * server), which advertises the features that the particular service 
-		 * supports. Thislist may not be complete (it is only for first-pass 
-		 * filtering by simpler clients), and the JID should be browsed if a 
-		 * complete list is required.</p>
-		 */
-		public function get namespaces():Array
-		{
-			var res:Array = [];
-	
-			for each (var child:XMLNode in getNode().childNodes) {
-				if (child.nodeName == "ns") {
-					res.push(child.firstChild.nodeValue);
-				}
-			}
-			return res;
-		}
-	
-		public function serialize(parentNode:XMLNode):Boolean
-		{
-			var node:XMLNode = getNode();
-			if (!exists(node.parentNode)) {
-				parentNode.appendChild(node.cloneNode(true));
-			}
-	
-			return true;
-		}
-	
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-			return true;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/disco/DiscoExtension.as
===================================================================
--- org/jivesoftware/xiff/data/disco/DiscoExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/disco/DiscoExtension.as	(working copy)
@@ -1,108 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	
-package org.jivesoftware.xiff.data.disco
-{
-
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	/**
-	 * Base class for service discovery extensions.
-	 */
-	public class DiscoExtension extends Extension implements ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "http://jabber.org/protocol/disco";
-		public static var ELEMENT:String = "query";
-		
-		public var myService:EscapedJID;
-	
-		/**
-		 * The name of the resource of the service queried if the resource 
-		 * doesn't have a JID. For more information, see 
-		 * <a href="http://www.jabber.org/registrar/disco-nodes.html">
-		 * http://www.jabber.org/registrar/disco-nodes.html</a>.
-		 */
-		public function DiscoExtension(xmlNode:XMLNode)
-		{
-			super(xmlNode);
-		}
-		
-		public function get serviceNode():String 
-		{ 
-			return getNode().parentNode.attributes.node;
-		}
-	
-		/**
-		 * @private
-		 */
-		public function set serviceNode(val:String):void
-		{
-			getNode().parentNode.attributes.node = val;
-		}
-	
-		/**
-		 * The service name of the discovery procedure
-		 */
-		public function get service():EscapedJID
-		{
-			var parent:XMLNode = getNode().parentNode;
-	
-			if (parent.attributes.type == "result") {
-				return new EscapedJID(parent.attributes.from);
-			} else {
-				return new EscapedJID(parent.attributes.to);
-			}
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set service(val:EscapedJID):void
-		{
-			var parent:XMLNode = getNode().parentNode;
-	
-			if (parent.attributes.type == "result") {
-				parent.attributes.from = val.toString();
-			} else {
-				parent.attributes.to = val.toString();
-			}
-		}
-	
-		public function serialize(parentNode:XMLNode):Boolean
-		{
-			if (parentNode != getNode().parentNode) {
-				parentNode.appendChild(getNode().cloneNode(true));
-			}
-			return true;
-		}
-	
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-			return true;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/disco/InfoDiscoExtension.as
===================================================================
--- org/jivesoftware/xiff/data/disco/InfoDiscoExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/disco/InfoDiscoExtension.as	(working copy)
@@ -1,128 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.disco
-{
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	
-	/**
-	 * Implements <a href="http://www.jabber.org/jeps/jep-0030.html">JEP-0030<a> for service info discovery.
-	 * Also, take a look at <a href="http://www.jabber.org/jeps/jep-0020.html">JEP-0020</a> and 
-	 * <a href="http://www.jabber.org/jeps/jep-0060.html">JEP-0060</a>.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The XMLNode that contains this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Service Discovery
-	 * @toc-sort 1/2
-	 */
-	public class InfoDiscoExtension extends DiscoExtension implements IExtension
-	{
-		// Static class variables to be overridden in subclasses;
-		public static const NS:String = "http://jabber.org/protocol/disco#info";
-	
-		private var myIdentities:Array;
-		private var myFeatures:Array;
-		
-		public function InfoDiscoExtension(xmlNode:XMLNode = null)
-		{
-			super(xmlNode);
-		}
-		
-		public function getElementName():String
-		{
-			return DiscoExtension.ELEMENT;
-		}
-	
-		public function getNS():String
-		{
-			return InfoDiscoExtension.NS;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(InfoDiscoExtension);
-	    }
-	
-		/**
-		 * An array of objects that represent the identities of a resource discovered. For more information on
-		 * categories, see <a href="http://www.jabber.org/registrar/disco-categories.html">
-		 * http://www.jabber.org/registrar/disco-categories.html</a>
-		 *
-		 * The objects in the array have the following possible attributes:
-		 * <ul>
-		 * <li><code>category</code> - a category of the kind of identity</li>
-		 * <li><code>type</code> - a path to a resource that can be discovered without a JID</li>
-		 * <li><code>name</code> - the friendly name of the identity</li>
-		 * </ul>
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get identities():Array
-		{
-			return myIdentities;
-		}
-	
-		/**
-		 * An array of namespaces this service supports for feature negotiation.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get features():Array
-		{
-			return myFeatures;
-		}
-	
-		override public function deserialize(node:XMLNode):Boolean
-		{
-			if (!super.deserialize(node))
-				return false;
-			
-			myIdentities = [];
-			myFeatures = [];
-			
-			for each(var child:XMLNode in getNode().childNodes) 
-			{
-				switch (child.nodeName) 
-				{
-					case "identity":
-						myIdentities.push(child.attributes);
-						break;
-
-					case "feature":
-						myFeatures.push(child.attributes["var"]);
-						break;
-				}
-			}
-			return true;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/disco/ItemDiscoExtension.as
===================================================================
--- org/jivesoftware/xiff/data/disco/ItemDiscoExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/disco/ItemDiscoExtension.as	(working copy)
@@ -1,99 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.disco
-{
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	
-	/**
-	 * Implements <a href="http://www.jabber.org/jeps/jep-0030.html">JEP-0030<a> 
-	 * for service item discovery.
-	 */
-	public class ItemDiscoExtension extends DiscoExtension implements IExtension
-	{
-		// Static class variables to be overridden in subclasses;
-		public static const NS:String = "http://jabber.org/protocol/disco#items";
-	
-		private var myItems:Array;
-		
-		public function ItemDiscoExtension(xmlNode:XMLNode=null)
-		{
-			super(xmlNode);
-		}
-		
-		public function getElementName():String
-		{
-			return DiscoExtension.ELEMENT;
-		}
-	
-		public function getNS():String
-		{
-			return ItemDiscoExtension.NS;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension 
-	     * registry.  
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(ItemDiscoExtension);
-	    }
-	
-		/**
-		 * An array of objects that represent the items discovered
-		 *
-		 * <p>The objects in the array have the following possible 
-		 * attributes:</p>
-		 * 
-		 * <ul>
-		 * <li><code>jid</code>: the resource name</li>
-		 * <li><code>node</code>: a path to a resource that can be discovered 
-		 * without a JID</li>
-		 * <li><code>name</code>: the friendly name of the jid</li>
-		 * <li><code>action</code>: the kind of action that occurs during 
-		 * publication of services it can be either "remove" or "update"</li>
-		 * </ul>
-		 */
-		public function get items():Array
-		{
-			return myItems;
-		}
-	
-		override public function deserialize(node:XMLNode):Boolean
-		{
-			if (!super.deserialize(node))
-				return false;
-				
-			myItems = [];
-			
-			for each(var item:XMLNode in getNode().childNodes) 
-			{
-				myItems.push(item.attributes);
-			}
-			return true;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/events/MessageEventExtension.as
===================================================================
--- org/jivesoftware/xiff/data/events/MessageEventExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/events/MessageEventExtension.as	(working copy)
@@ -1,44 +0,0 @@
-package org.jivesoftware.xiff.data.events
-{
-import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import flash.xml.XMLNode;
-	
-	public class MessageEventExtension implements IExtension, ISerializable {
-		
-		public function getNS():String{
-			return "jabber:x:event";
-		}
-		
-		public function getElementName():String {
-			return "x";
-		}
-		
-		/**
-		 * Called when the library need to retrieve the state of the instance.  If the instance manages its own state, then the state should be copied into the XMLNode passed.  If the instance also implements INodeProxy, then the parent should be verified against the parent XMLNode passed to determine if the serialization is in the same namespace.
-		 *
-		 * @param parentNode (XMLNode) The container of the XML.
-		 * @returns On success, return true.
-		 */
-		public function serialize( parentNode:XMLNode ):Boolean {
-			var xmlNode:XMLNode = new XMLNode(1, 'x');
-			xmlNode.attributes.xmlns = "jabber:x:event";
-			var childNode:XMLNode = new XMLNode(1, "composing");
-			xmlNode.appendChild(childNode);
-			parentNode.appendChild(xmlNode);			
-			return true;
-		}
-	
-		/**
-		 * Called when data is retrieved from the XMLSocket, use this method to extract any state into internal state.
-		 * @param node (XMLNode) The node that should be used as the data container.
-		 * @returns On success, return true.
-		 */
-		public function deserialize( node:XMLNode ):Boolean {
-			return true;
-		}
-		
-		
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/Extension.as
===================================================================
--- org/jivesoftware/xiff/data/Extension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/Extension.as	(working copy)
@@ -1,70 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data
-{
-	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	import flash.xml.XMLNode;
-	
-	/**
-	 * This is a base class for all data extensions.
-	 * @param parent The parent node that this extension should be appended to
-	 */
-	public class Extension extends XMLStanza
-	{
-		public function Extension(parent:XMLNode=null)
-		{
-			super();
-	
-			getNode().nodeName = IExtension(this).getElementName();
-			getNode().attributes.xmlns = IExtension(this).getNS();
-	
-			if (exists(parent)) {
-				parent.appendChild(getNode());
-			}
-		}
-	
-		/**
-		 * Removes the extension from its parent.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function remove():void
-		{
-			getNode().removeNode();
-		}
-		
-		/**
-		 * Converts the extension stanza XML to a string.
-		 *
-		 * @availability Flash Player 7
-		 * @return The extension XML in string form
-		 */
-		public function toString():String
-		{
-			return getNode().toString();
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/ExtensionClassRegistry.as
===================================================================
--- org/jivesoftware/xiff/data/ExtensionClassRegistry.as	(revision 11020)
+++ org/jivesoftware/xiff/data/ExtensionClassRegistry.as	(working copy)
@@ -1,60 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import org.jivesoftware.xiff.data.IExtension;
-	import flash.xml.XMLDocument;
-	
-	/**
-	 * This is a static class that contains class constructors for all extensions that could come from the network.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Data
-	 * @toc-sort 1
-	 */
-	public class ExtensionClassRegistry
-	{
-		private static var myClasses:Array = new Array();
-		
-		public static function register( extensionClass:Class ):Boolean
-		{
-			//trace ("ExtensionClassRegistry.register(" + extensionClass + ")");
-			
-			var extensionInstance:IExtension = new extensionClass();
-			
-			//if (extensionInstance instanceof IExtension) {
-			if (extensionInstance is IExtension) {
-				myClasses[extensionInstance.getNS()] = extensionClass;
-				return true;
-			}
-			return false;
-		}
-		
-		public static function lookup( ns:String ):Class
-		{
-			return myClasses[ns];
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/ExtensionContainer.as
===================================================================
--- org/jivesoftware/xiff/data/ExtensionContainer.as	(revision 11020)
+++ org/jivesoftware/xiff/data/ExtensionContainer.as	(working copy)
@@ -1,97 +0,0 @@
-﻿
-package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.IExtendable;
-	 
-	/**
-	 * Contains the implementation for a generic extension container.  Use the static method "decorate" to implement the IExtendable interface on a class.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Data
-	 * @toc-sort 1
-	 */
-	public class ExtensionContainer implements IExtendable
-	{
-		public var _exts:Object;
-		
-		public function ExtensionContainer(){
-			_exts = new Object();
-		}
-	
-		public function addExtension( ext:IExtension ):IExtension
-		{
-			if (_exts[ext.getNS()] == null){
-				_exts[ext.getNS()] = new Array();
-			}
-			_exts[ext.getNS()].push(ext);
-			return ext;
-		}
-	
-		public function removeExtension( ext:IExtension ):Boolean
-		{
-			var extensions:Object = _exts[ext.getNS()];
-			for (var i:String in extensions) {
-			//for (var i in extensions) { untyped var throws compiler warning
-				if (extensions[i] === ext) {
-					extensions[i].remove();
-					extensions.splice(Number(i), 1);
-					return true;
-				}
-			}
-			return false;
-		}
-		public function removeAllExtensions( ns:String ):void
-		{
-			//for (var i in this[_exts][namespace]) {
-			for (var i:String in _exts[ns]) {
-				_exts[ns][i].ns();
-			}
-			_exts[ns] = new Array();
-		}
-	
-		public function getAllExtensionsByNS( ns:String ):Array
-		{
-			return _exts[ns];
-		}
-		
-		public function getExtension( name:String ):Extension
-		{
-			return getAllExtensions().filter(function(obj:IExtension, idx:int, arr:Array):Boolean { return obj.getElementName() == name; })[0];
-		}
-	
-		public function getAllExtensions():Array
-		{
-			var exts:Array = new Array();
-			for (var ns:String in _exts) {
-			//for (var ns in this[_exts]) {
-				exts = exts.concat(_exts[ns]);
-			}
-			return exts;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/forms/FormExtension.as
===================================================================
--- org/jivesoftware/xiff/data/forms/FormExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/forms/FormExtension.as	(working copy)
@@ -1,333 +0,0 @@
-﻿package org.jivesoftware.xiff.data.forms{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	/**
-	 * Implements the base functionality shared by all MUC extensions
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The containing XMLNode for this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	//public class FormExtension extends Extension implements ISerializable, IExtension
-	public class FormExtension extends Extension implements IExtension, ISerializable
-	{
-	    public static var FIELD_TYPE_BOOLEAN:String = "boolean";
-	    public static var FIELD_TYPE_FIXED:String = "fixed";
-	    public static var FIELD_TYPE_HIDDEN:String = "hidden";
-	    public static var FIELD_TYPE_JID_MULTI:String = "jid-multi";
-	    public static var FIELD_TYPE_JID_SINGLE:String = "jid-single";
-	    public static var FIELD_TYPE_LIST_MULTI:String = "list-multi";
-	    public static var FIELD_TYPE_LIST_SINGLE:String = "list-single";
-	    public static var FIELD_TYPE_TEXT_MULTI:String = "text-multi";
-	    public static var FIELD_TYPE_TEXT_PRIVATE:String = "text-private";
-	    public static var FIELD_TYPE_TEXT_SINGLE:String = "text-single";
-	
-	    public static var REQUEST_TYPE:String = "form";
-	    public static var RESULT_TYPE:String = "result";
-	    public static var SUBMIT_TYPE:String = "submit";
-	    public static var CANCEL_TYPE:String = "cancel";
-	
-	    public static var NS:String = "jabber:x:data";
-	    public static var ELEMENT:String = "x";
-	
-		//private static var isStaticConstructed:Boolean = enable();
-		//private static var staticDependencies:Array = [ ExtensionClassRegistry ];
-	
-		private var myItems:Array;
-		private var myFields:Array;
-	    private var myReportedFields:Array;
-	
-	    private var myInstructionsNode:XMLNode;
-	    private var myTitleNode:XMLNode;
-	
-		public function FormExtension( parent:XMLNode=null )
-		{
-			super(parent);
-			myItems = new Array();
-			myFields = new Array();
-			myReportedFields = new Array();
-		}
-	
-		public function getNS():String
-		{
-			return FormExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return FormExtension.ELEMENT;
-		}
-		
-		public static function enable():Boolean
-	    {
-	        ExtensionClassRegistry.register(FormExtension);
-	        return true;
-	    }
-		/**
-		 * Called when this extension is being put back on the network.  Perform any further serialization for Extensions and items
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			var node:XMLNode = getNode();
-	
-			for each (var field:FormField in myFields) {
-				if (!field.serialize(node))
-					return false;
-			}
-	
-			if (parent != node.parentNode) {
-				parent.appendChild(node.cloneNode(true));
-			}
-	
-			return true;
-		}
-	
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode(node);
-	
-			removeAllItems();
-			removeAllFields();
-	
-			for each( var c:XMLNode in node.childNodes ) {
-				var field:FormField;
-				switch( c.nodeName )
-				{
-	                case "instructions": myInstructionsNode = c; break;
-	                case "title": myTitleNode = c; break;
-	                case "reported":
-	                	for each(var reportedFieldXML:XMLNode in c.childNodes) 
-	                	{
-	                		field = new FormField();
-	                		field.deserialize(reportedFieldXML);
-	                		myReportedFields.push(field);
-	                	}
-	                    break;
-	
-					case "item":
-						var itemFields:Array = [];
-	                    for each(var itemFieldXML:XMLNode in c.childNodes) 
-	                    {
-	                        field = new FormField();
-	                        field.deserialize(itemFieldXML);
-	                        itemFields.push(field);
-	                    }
-	                    myItems.push(itemFields);
-						break;
-	
-	                case "field":
-	                    field = new FormField();
-	                    field.deserialize(c);
-	                    myFields.push(field);
-	                    break;
-				}
-			}
-			return true;
-		}
-	
-	    /**
-	     * This is an accessor to the hidden field type <code>FORM_TYPE</code> 
-	     * easily check what kind of form this is.
-	     *
-		 * @return String the registered namespace of this form type
-	     * @see http://www.jabber.org/jeps/jep-0068.html
-		 * @availability Flash Player 7
-	     */
-	    public function getFormType():String
-	    {
-	        // Most likely at the start of the array
-	        for each(var field:FormField in myFields) {
-	        	if(field.name == "FORM_TYPE")
-	        		return field.value;
-	        }
-	        return "";
-	    }
-	
-		/**
-		 * Item interface to array of fields if they are contained in an "item" element
-		 *
-		 * @return Array containing Arrays of FormFields objects
-		 * @availability Flash Player 7
-		 */
-	    public function getAllItems():Array 
-	    { 
-	        return myItems; 
-	    }
-	    
-	    /**
-	    * Returns the request form field
-	    * 
-	    * @param value the name of the form field to retrieve
-	    * @returns FormField the matching form field
-	    */
-	    public function getFormField(value:String):FormField
-	    {
-	    	 for each (var field:FormField in myFields)
-	    	 {
-			 	if (field.name == value)
-			 		return field;
-			 }
-			 return null;
-	    }
-	
-		/**
-		 * Item interface to array of fields if they are contained in an "item" element
-		 *
-		 * @return Array of FormFields objects
-		 * @availability Flash Player 7
-		 */
-	    public function getAllFields():Array 
-	    { 
-	        return myFields; 
-	    }
-	
-	    /**
-	     * Sets the fields given a fieldmap object containing keys of field names
-	     * and values of value arrays
-	     *
-	     * @param fieldmap Object in format obj[key:String].value:Array
-	     * @availability Flash Player 7
-	     */
-	    public function setFields(fieldmap:Object):void
-	    {
-	        removeAllFields();
-	        for (var f:String in fieldmap) {
-	            var field:FormField = new FormField();
-	            field.name = f;
-	            field.setAllValues(fieldmap[f]);
-	            myFields.push(field);
-	        }
-	    }
-	
-		/**
-		 * Use this method to remove all items.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function removeAllItems():void
-		{
-			for each(var item:FormField in myItems) {
-	            for each(var i:* in item) {
-	                i.getNode().removeNode();
-	                i.setNode(null);
-	            }
-			}
-		 	myItems = [];
-		}
-		/**
-		 * Use this method to remove all fields.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function removeAllFields():void
-		{
-			for each(var item:FormField in myFields) {
-	            for each(var i:* in item) {
-	                i.getNode().removeNode();
-	                i.setNode(null);
-	            }
-			}
-		 	myFields = [];
-		}
-	
-	    /**
-	     * Instructions describing what to do with this form
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get instructions():String 
-	    {
-	    	if(myInstructionsNode && myInstructionsNode.firstChild)
-	    		return myInstructionsNode.firstChild.nodeValue;
-	    	
-	    	return null;
-	    }
-	    
-	    
-	    public function set instructions(val:String) :void
-	    { 
-	        myInstructionsNode = replaceTextNode(getNode(), myInstructionsNode, "instructions", val);
-	    }
-	
-	    /**
-	     * The title of this form
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get title():String
-	    {
-	    	if(myTitleNode && myTitleNode.firstChild)
-	    		return myTitleNode.firstChild.nodeValue;
-	    	
-	    	return null;
-	    }
-	    
-	    
-	    public function set title(val:String) :void
-	    { 
-	        myTitleNode = replaceTextNode(getNode(), myTitleNode, "Title", val);
-	    }
-	
-	    /**
-	     * Array of fields found in individual items due to a search query result
-	     *
-	     * @returns Array of FormField objects containing information about the fields
-	     * in the fields retrieved by getAllItems
-		 * @availability Flash Player 7
-	     */
-	    public function getReportedFields():Array
-	    { 
-	        return myReportedFields; 
-	    }
-	
-	    /**
-	     * The type of form.  May be one of the following:
-	     *
-	     * <code>FormExtension.REQUEST_TYPE</code>
-	     * <code>FormExtension.RESULT_TYPE</code>
-	     * <code>FormExtension.SUBMIT_TYPE</code>
-	     * <code>FormExtension.CANCEL_TYPE</code>
-	     *
-		 * @availability Flash Player 7
-	     */
-	
-	    public function get type():String { return getNode().attributes.type; }
-	    public function set type(val:String) :void
-	    { 
-	        // TODO ensure it is in the enumeration of "cancel", "form", "result", "submit"
-	        // TODO Change the behavior of the serialization depending on the type
-	        getNode().attributes.type = val; 
-	    }
-	}
-}
Index: org/jivesoftware/xiff/data/forms/FormField.as
===================================================================
--- org/jivesoftware/xiff/data/forms/FormField.as	(revision 11020)
+++ org/jivesoftware/xiff/data/forms/FormField.as	(working copy)
@@ -1,288 +0,0 @@
-﻿package org.jivesoftware.xiff.data.forms{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	/**
-	 * This class is used by the FormExtension class for managing fields
-	 * as fields have multiple behaviors depending on the type of the form
-	 * while containing different kinds of data, some optional some not.
-	 *
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @see org.jivesoftware.xiff.data.forms.FormExtension
-	 * @see http://www.jabber.org/jeps/jep-0004.html
-	 * @param parent The parent XMLNode
-	 * @toc-path Extensions/Instant Messaging
-	 * @toc-sort 1/2
-	 */
-	public class FormField extends XMLStanza implements ISerializable
-	{
-		public static var ELEMENT:String = "field";
-	
-	    private var myDescNode:XMLNode;
-	    private var myRequiredNode:XMLNode;
-	    private var myValueNodes:Array;
-	    private var myOptionNodes:Array;
-		
-		public function FormField() { super(); }
-		
-		/**
-		 * Serializes the FormField data to XML for sending.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this item should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			getNode().nodeName = FormField.ELEMENT;
-	
-			if( parent != getNode().parentNode ) {
-				parent.appendChild( getNode().cloneNode( true ) );
-			}
-	
-			return true;
-		}
-		
-		/**
-		 * Deserializes the FormField data.
-		 *
-		 * @availability Flash Player 7
-		 * @param node The XML node associated this data
-		 * @return An indicator as to whether deserialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode( node );
-	
-	        myValueNodes = new Array();
-	        myOptionNodes = new Array();
-	
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-	            var c:XMLNode = children[i];
-	
-				switch( children[i].nodeName ) {
-	                case "desc": myDescNode = c; break;
-	                case "required": myRequiredNode = c; break;
-	                case "value": myValueNodes.push(c); break;
-	                case "option": myOptionNodes.push(c); break;
-				}
-			}
-			
-			return true;
-		}
-		
-	    /**
-	     * The name of this field used by the application or server.
-	     *
-	     * Note: this serializes to the <code>var</code> attribute on the
-	     * field node.  Since <code>var</code> is a reserved word in ActionScript
-	     * this field uses <code>name</code> to describe the name of this field.
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get name():String { return getNode().attributes["var"]; }
-	    public function set name(val:String) :void
-	    { 
-	        getNode().attributes["var"] = val; 
-	    }
-	
-	    /**
-	     * The type of this field used by user interfaces to render an approprite 
-	     * control to represent this field.
-	     *
-	     * May be one of the following:
-	     *
-	     * <code>FormExtension.FIELD_TYPE_BOOLEAN</code>
-	     * <code>FormExtension.FIELD_TYPE_FIXED</code>
-	     * <code>FormExtension.FIELD_TYPE_HIDDEN</code>
-	     * <code>FormExtension.FIELD_TYPE_JID_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_JID_SINGLE</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_SINGLE</code>
-	     * <code>FormExtension.FIELD_TYPE_TEXT_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_TEXT_PRIVATE</code>
-	     * <code>FormExtension.FIELD_TYPE_TEXT_SINGLE</code>
-	     *
-	     * @see http://www.jabber.org/jeps/jep-0004.html#protocol-fieldtypes
-		 * @availability Flash Player 7
-	     */
-	    public function get type():String { return getNode().attributes.type; }
-	    public function set type(val:String) :void
-	    { 
-	        getNode().attributes.type = val; 
-	    }
-	
-	    /**
-	     * The label of this field used by user interfaces to render a descriptive
-	     * title of this field
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get label():String { return getNode().attributes.label; }
-	    public function set label(val:String) :void
-	    { 
-	        getNode().attributes.label = val; 
-	    }
-	
-	    /**
-	     * The chosen value for this field.  In forms with a type 
-	     * <code>FormExtension.REQUEST_TYPE</code> this is typically the default
-	     * value of the field.
-	     *
-	     * Applies to the following field types:
-	     *
-	     * <code>FormExtension.FIELD_TYPE_BOOLEAN</code>
-	     * <code>FormExtension.FIELD_TYPE_FIXED</code>
-	     * <code>FormExtension.FIELD_TYPE_HIDDEN</code>
-	     * <code>FormExtension.FIELD_TYPE_JID_SINGLE</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_SINGLE</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_TEXT_PRIVATE</code>
-	     * <code>FormExtension.FIELD_TYPE_TEXT_SINGLE</code>
-	     *
-	     * Suggested values can typically be retrieved in <code>getAllOptions</code>
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get value():String {
-	    	try 
-	    	{
-	    		if (myValueNodes[0] != null && myValueNodes[0].firstChild != null)
-	    			return myValueNodes[0].firstChild.nodeValue; 
-	    	}
-	    	catch (error:Error)
-	    	{
-				trace(error.getStackTrace());
-		    }
-		    return null;
-	    }
-	    
-	    public function set value(val:String) :void
-	    {
-	    	if (myValueNodes == null)
-	    		myValueNodes = new Array();
-
-	        myValueNodes[0] = replaceTextNode(getNode(), myValueNodes[0], "value", val);
-	    }
-	
-	    /**
-	     * The values for this multiple field.  In forms with a type 
-	     * <code>FormExtension.REQUEST_TYPE</code> these are typically the existing
-	     * values of the field.
-	     *
-	     * Applies to the following field types:
-	     *
-	     * <code>FormExtension.FIELD_TYPE_JID_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_TEXT_MULTI</code>
-	     *
-	     * @returns Array containing strings representing the values of this field
-		 * @availability Flash Player 7
-	     */
-	    public function getAllValues():Array
-	    {
-	        var res:Array = [];
-	        for each(var valueNode:XMLNode in myValueNodes)
-	        {
-	            res.push(valueNode.firstChild.nodeValue);
-	        }
-	        return res;
-	    }
-	
-	    /**
-	     * Sets all the values of this field from an array of strings
-	     *
-	     * @param val Array of Strings
-		 * @availability Flash Player 7
-	     */
-	    public function setAllValues(val:Array) :void
-	    {
-	        for each(var v:XMLNode in myValueNodes) {
-	            v.removeNode();
-	        }
-	
-	        myValueNodes = val.map( 
-	        	function(value:String, index:uint, arr:Array):* { 
-	        		return replaceTextNode(getNode(), undefined, "value", value); 
-	        	}
-	        );
-	    }
-	
-	    /**
-	     * If options are provided for possible selections of the value they are listed
-	     * here.
-	     *
-	     * Applies to the following field types:
-	     *
-	     * <code>FormExtension.FIELD_TYPE_JID_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_JID_SINGLE</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_MULTI</code>
-	     * <code>FormExtension.FIELD_TYPE_LIST_SINGLE</code>
-	     *
-	     * @returns Array of objects with the properties <code>label</code> and <code>value</code>
-		 * @availability Flash Player 7
-	     */
-	    public function getAllOptions():Array
-	    {
-	        return myOptionNodes.map(
-	        	function(optionNode:XMLNode, index:uint, arr:Array):Object {
-	        		return {
-	        			label: optionNode.attributes.label,
-	                	value: optionNode.firstChild.firstChild.nodeValue
-	        		}
-	        	}
-	        );
-	    }
-	
-	    /**
-	     * Sets all the options available from an array of objects
-	     *
-	     * @param Array containing objects with the properties <code>label</code> and
-	     * <code>value</code>
-		 * @availability Flash Player 7
-	     */
-	    public function setAllOptions(val:Array):void
-	    {
-	        for each(var optionNode:XMLNode in myOptionNodes) {
-	        	optionNode.removeNode();
-	        }
-	
-	        myOptionNodes = val.map(
-	        	function(v:Object, index:uint, arr:Array):XMLNode {
-	        		var option:XMLNode = replaceTextNode(getNode(), undefined, "value", v.value);
-	            	option.attributes.label = v.label;
-	            	return option;
-	        	}
-	        );
-	    }
-	}
-	
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/id/IIDGenerator.as
===================================================================
--- org/jivesoftware/xiff/data/id/IIDGenerator.as	(revision 11020)
+++ org/jivesoftware/xiff/data/id/IIDGenerator.as	(working copy)
@@ -1,42 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Media Insites, Inc.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.id
-{	
-	/**
-	 * To use custom ID generators call the static function on the
-	 * XMPPStanza class with an instance that implements IIDGenerator.
-	 * 
-	 * @example <code>XMPPStanza.setIDGenerator( 
-	 * 	new org.jivesoftware.xiff.data.id.SharedObjectGenerator() );</code>
-	 */
-	public interface IIDGenerator
-	{
-		/**
-		 * Gets the generated ID.
-		 *
-		 * @param prefix The prefix to use for the ID (for namespacing purposes)
-		 * @return The generated ID
-		 */
-		function getID(prefix:String):String;
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/id/IncrementalGenerator.as
===================================================================
--- org/jivesoftware/xiff/data/id/IncrementalGenerator.as	(revision 11020)
+++ org/jivesoftware/xiff/data/id/IncrementalGenerator.as	(working copy)
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Media Insites, Inc.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.id
-{
-	import org.jivesoftware.xiff.data.id.IIDGenerator;
-	
-	/**
-	 * Uses a simple incrementation of a static variable to generate new IDs.
-	 * Guaranteed to generate unique IDs for the duration of application execution.
-	 */
-	public class IncrementalGenerator implements IIDGenerator
-	{
-		private var myCounter:Number;
-		private static var instance:IIDGenerator;
-		
-		public static function getInstance():IIDGenerator
-		{
-			if(instance == null)
-			{
-				instance = new IncrementalGenerator();
-			}
-			
-			return instance;
-		}
-	
-		public function IncrementalGenerator()
-		{
-			myCounter = 0;
-		}
-	
-		/**
-		 * Gets the unique ID.
-		 *
-		 * @param prefix The ID prefix to use when generating the ID
-		 * @return The generated ID
-		 */
-		public function getID(prefix:String):String
-		{
-			myCounter++;
-			var id:String;
-	
-			if ( prefix != null ) {
-				id = prefix + myCounter;
-			} else {
-				id = myCounter.toString();
-			}
-			return id;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/id/SharedObjectGenerator.as
===================================================================
--- org/jivesoftware/xiff/data/id/SharedObjectGenerator.as	(revision 11020)
+++ org/jivesoftware/xiff/data/id/SharedObjectGenerator.as	(working copy)
@@ -1,67 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- * Media Insites, Inc.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data.id
-{
-	
-	import org.jivesoftware.xiff.data.id.IIDGenerator;
-	import flash.net.SharedObject;
-	
-	/**
-	 * Generates an incrementing ID and saves the last value in a local shared object.
-	 * Guaranteed to generate unique IDs for a single machine.
-	 */
-	public class SharedObjectGenerator implements IIDGenerator
-	{
-		private static var SO_COOKIE_NAME:String = "IIDGenerator";
-	
-		private var mySO:SharedObject;
-	
-		public function SharedObjectGenerator()
-		{
-			mySO = SharedObject.getLocal(SO_COOKIE_NAME);
-			if (mySO.data.myCounter == undefined) {
-				mySO.data.myCounter = 0;
-			}
-		}
-	
-		/**
-		 * Gets the unique ID.
-		 *
-		 * @param prefix The ID prefix to use when generating the ID
-		 * @return The generated ID
-		 */
-		public function getID(prefix:String):String
-		{
-			mySO.data.myCounter++;
-	
-			var id:String;
-	
-			if (prefix != null) {
-				id = prefix + mySO.data.myCounter;
-			} else {
-				id = mySO.data.myCounter.toString();
-			}
-			return id;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/IExtendable.as
===================================================================
--- org/jivesoftware/xiff/data/IExtendable.as	(revision 11020)
+++ org/jivesoftware/xiff/data/IExtendable.as	(working copy)
@@ -1,47 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.IExtension;
-	
-	/**
-	 * This interface provides access to contained extensions and methods to modify the contained extensions.  
-	 * All XMPP stanzas that can be extended should implement this interface.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @see org.jivesoftware.xiff.data.ExtensionContainer
-	 * @see org.jivesoftware.xiff.data.IExtension
-	 * @availability Flash Player 7
-	 * @toc-path Interfaces
-	 * @toc-sort 1
-	 */
-	public interface IExtendable
-	{
-		function addExtension( extension:IExtension ):IExtension;
-		function getAllExtensionsByNS( ns:String ):Array;
-		function getAllExtensions():Array;
-		function removeExtension( extension:IExtension ):Boolean;
-		function removeAllExtensions( ns:String ):void;
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/IExtension.as
===================================================================
--- org/jivesoftware/xiff/data/IExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/IExtension.as	(working copy)
@@ -1,39 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	/**
-	 * The interface describing an extension.  All extensions must implement this interface.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Interfaces
-	 * @toc-sort 1
-	 */
-	public interface IExtension
-	{
-		function getNS():String;
-		function getElementName():String;
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/im/Contact.as
===================================================================
--- org/jivesoftware/xiff/data/im/Contact.as	(revision 11020)
+++ org/jivesoftware/xiff/data/im/Contact.as	(working copy)
@@ -1,21 +0,0 @@
-package org.jivesoftware.xiff.data.im
-{
-	import mx.core.IPropertyChangeNotifier;
-	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	
-	public interface Contact extends IPropertyChangeNotifier
-	{
-		function get jid():UnescapedJID;
-		function set jid(newJID:UnescapedJID):void;
-		
-		function get displayName():String;
-		function set displayName(name:String):void;
-		
-		function get show():String;
-		function set show(newShow:String):void;
-		
-		function get online():Boolean;
-		function set online(newOnline:Boolean):void;
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/im/RosterExtension.as
===================================================================
--- org/jivesoftware/xiff/data/im/RosterExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/im/RosterExtension.as	(working copy)
@@ -1,224 +0,0 @@
-﻿package org.jivesoftware.xiff.data.im{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	 
-	/**
-	 * An IQ extension for roster data. Roster data is typically any data
-	 * that is sent or received with the "jabber:iq:roster" namespace.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @param theRoot The extension root
-	 * @param theNode The extension node
-	 * @toc-path Extensions/Instant Messaging
-	 * @toc-sort 1/2
-	 */
-	public class RosterExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "jabber:iq:roster";
-		public static var ELEMENT:String = "query";
-		
-		public static var SUBSCRIBE_TYPE_NONE:String = "none";
-		public static var SUBSCRIBE_TYPE_TO:String = "to";
-		public static var SUBSCRIBE_TYPE_FROM:String = "from";
-		public static var SUBSCRIBE_TYPE_BOTH:String = "both";
-		public static var SUBSCRIBE_TYPE_REMOVE:String = "remove";
-		public static var ASK_TYPE_NONE:String = "none";
-		public static var ASK_TYPE_SUBSCRIBE:String = "subscribe";
-		public static var ASK_TYPE_UNSUBSCRIBE:String = "unsubscribe";
-		public static var SHOW_UNAVAILABLE:String = "unavailable";
-		public static var SHOW_PENDING:String = "Pending";
-		
-	    private static var staticDepends:Array = [ExtensionClassRegistry];
-	
-		private var myItems:Array = [];
-		
-		public function RosterExtension( parent:XMLNode=null )
-		{
-			super( parent );
-		}
-	
-		/**
-		 * Gets the namespace associated with this extension.
-		 * The namespace for the RosterExtension is "jabber:iq:roster".
-		 *
-		 * @return The namespace
-		 * @availability Flash Player 7
-		 */
-		public function getNS():String
-		{
-			return RosterExtension.NS;
-		}
-	
-		/**
-		 * Gets the element name associated with this extension.
-		 * The element for this extension is "query".
-		 *
-		 * @return The element name
-		 * @availability Flash Player 7
-		 */
-		public function getElementName():String
-		{
-			return RosterExtension.ELEMENT;
-		}
-		
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(RosterExtension);
-	    }
-	
-		/**
-		 * Serializes the RosterExtension data to XML for sending.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			var node:XMLNode = getNode();
-			
-			// Serialize each roster item
-			for( var i:String in myItems ) {
-				if( !myItems[i].serialize( node ) ){
-					return false;
-				}
-			}
-			
-			if( !exists( getNode().parentNode ) ) {
-				parent.appendChild( getNode().cloneNode( true ) );
-			}
-			
-			return true;
-		}
-		
-		/**
-		 * Deserializes the RosterExtension data.
-		 *
-		 * @availability Flash Player 7
-		 * @param node The XML node associated this data
-		 * @return An indicator as to whether deserialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode( node );
-			removeAllItems();
-			
-			var children:Array = node.childNodes;
-			for( var i:String in children ){
-				switch( children[i].nodeName ) {
-					case "item":
-						var item:RosterItem = new RosterItem( getNode() );
-						if( !item.deserialize( children[i] ) ) {
-							return false;
-						}
-						myItems.push( item );
-						break;
-				}
-			}
-			
-			return true;
-		}
-		
-		/**
-		 * Get all the items from this roster query.
-		 *
-		 * @return An array of roster items.
-		 * @availability Flash Player 7
-		 */
-		public function getAllItems():Array
-		{
-			return myItems;
-		}
-		
-		/**
-		 * Gets one item from the roster query, returning the first item found with the JID specified. If none is found, then it returns null.
-		 *
-		 * @return A roster item object with the following attributes: "jid", "subscription", "displayName", and "groups".
-		 * @availability Flash Player 7
-		 */
-		public function getItemByJID( jid:EscapedJID ):RosterItem
-		{
-			for( var i:String in myItems ) {
-				if( myItems[i].jid == jid.toString() ) {
-					return myItems[i];
-				}
-			}
-			
-			return null;
-		}
-		
-		/**
-		 * Adds a single roster item to the extension payload.
-		 *
-		 * @param jid The JID of the contact to add
-		 * @param subscription The subscription type of the roster item contact. There are pre-defined static variables for these string options in this class definition.
-		 * @param displayName The display name or nickname of the contact.
-		 * @param groups An array of strings of the group names that this contact should be placed in.
-		 * @availability Flash Player 7
-		 */
-		public function addItem( jid:EscapedJID=null, subscription:String="", displayName:String="", groups:Array=null ):void
-		{
-			var item:RosterItem = new RosterItem( getNode() );
-			
-			if( exists( jid ) ) { item.jid = jid }
-			if( exists( subscription ) ) { item.subscription = subscription; }
-			if( exists( displayName ) ) { item.name = displayName; }
-			if( exists( groups ) ) {
-				for each( var group:String in groups ) {
-					if(group)
-						item.addGroupNamed( group );
-				}
-			}
-		}
-		
-		/**
-		 * Removes all items from the roster data.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function removeAllItems():void
-		{
-			for( var i:String in myItems ) {
-				myItems[i].setNode( null );
-			}
-			
-			myItems = new Array();
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/im/RosterGroup.as
===================================================================
--- org/jivesoftware/xiff/data/im/RosterGroup.as	(revision 11020)
+++ org/jivesoftware/xiff/data/im/RosterGroup.as	(working copy)
@@ -1,76 +0,0 @@
-package org.jivesoftware.xiff.data.im
-{
-	/*
-	 * Copyright (C) 2008
-	 * Jive Software
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import mx.collections.ArrayCollection;
-	import mx.collections.Sort;
-	import mx.collections.SortField;
-	
-	public class RosterGroup extends ArrayCollection
-	{
-		public var label:String;
-		public var shared:Boolean = false;
-		
-		public function RosterGroup(l:String)
-		{
-			var s:Sort = new Sort();
-		    s.fields = [new SortField("displayName", true)];
-		    sort = s;
-		    refresh();
-			label = l;
-		}
-		
-		public override function addItem(item:Object):void
-		{
-			if(!item is RosterItemVO)
-				throw new Error("Assertion Failure: attempted to add something other than a RosterItemVO to a RosterGroup");
-			if(source.indexOf(item) == -1)
-				super.addItem(item);
-		}
-		
-		public function removeItem(item:RosterItemVO):void
-		{
-			var itemIndex:int = getItemIndex(item);
-			if(itemIndex >= 0)
-				removeItemAt(itemIndex);
-			else
-			{
-				itemIndex =	source.indexOf(item);
-				if(itemIndex >= 0)
-					source.splice(itemIndex, 1);
-			}
-		}
-		
-		public override function set filterFunction(f:Function):void
-		{
-			throw new Error("Setting the filterFunction on RosterGroup is not allowed; Wrap it in a ListCollectionView and filter that.");
-		}
-
-		private function sortContacts(item1:RosterItemVO, item2:RosterItemVO, fields:Array = null):int
-		{
-			if(item1.displayName.toLowerCase() < item2.displayName.toLowerCase())
-				return -1;
-			else if(item1.displayName.toLowerCase() > item2.displayName.toLowerCase())
-				return 1;
-			return 0;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/im/RosterItem.as
===================================================================
--- org/jivesoftware/xiff/data/im/RosterItem.as	(revision 11020)
+++ org/jivesoftware/xiff/data/im/RosterItem.as	(working copy)
@@ -1,261 +0,0 @@
-﻿package org.jivesoftware.xiff.data.im{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	/**
-	 * This class is used internally by the RosterExtension class for managing items
-	 * received and sent as roster data. Usually, each item in the roster represents a single
-	 * contact, and this class is used to represent, abstract, and serialize/deserialize
-	 * this data.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @see org.jivesoftware.xiff.data.im.RosterExtension
-	 * @param parent The parent XMLNode
-	 * @toc-path Extensions/Instant Messaging
-	 * @toc-sort 1/2
-	 */
-	public class RosterItem extends XMLStanza implements ISerializable
-	{
-		public static var ELEMENT:String = "item";
-		
-		private var myGroupNodes:Array;
-		
-		public function RosterItem( parent:XMLNode=null )
-		{
-			//<query xmlns="jabber:iq:roster"><item jid="herb@vaio.lymabean.com" subscription="both"><group>Buddies</group></item><item jid="alex@vaio.lymabean.com" subscription="both"><group>Co-workers</group></item><item jid="jack@vaio.lymabean.com" subscription="both"><group>Buddies</group></item></query>
-
-			super();
-			
-			getNode().nodeName = ELEMENT;
-			myGroupNodes = new Array();
-			
-			if( exists( parent ) ) {
-				parent.appendChild( getNode() );
-			}
-		}
-		
-		/**
-		 * Serializes the RosterItem data to XML for sending.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this item should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			if (!exists(jid)) {
-				trace("Warning: required roster item attributes 'jid' missing");
-				return false;
-			}
-			
-			if( parent != getNode().parentNode ) {
-				parent.appendChild( getNode().cloneNode( true ) );
-			}
-	
-			return true;
-		}
-		
-		/**
-		 * Deserializes the RosterItem data.
-		 *
-		 * @availability Flash Player 7
-		 * @param node The XML node associated this data
-		 * @return An indicator as to whether deserialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode( node );
-			
-	
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-				switch( children[i].nodeName ) {
-					case "group":
-						myGroupNodes.push( children[i] );
-						break;
-				}
-			}
-			
-			return true;
-		}
-		
-		/**
-		 * Adds a group to the roster item. Contacts in the roster can be associated
-		 * with multiple groups.
-		 *
-		 * @availability Flash Player 7
-		 * @param groupName The name of the group to add
-		 */
-		public function addGroupNamed( groupName:String ):void
-		{
-			var node:XMLNode = addTextNode( getNode(), "group", groupName );
-			
-			myGroupNodes.push( node );
-		}
-		
-		/**
-		 * Gets a list of all the groups associated with this roster item.
-		 *
-		 * @availability Flash Player 7
-		 * @return An array of strings containing the name of each group
-		 */
-		public function get groupNames():Array
-		{
-			var returnArr:Array = new Array();
-
-			for( var i:String in myGroupNodes ) {
-				var node:XMLNode = myGroupNodes[i].firstChild;
-				if(node != null){
-					returnArr.push(node.nodeValue);
-				}
-				//returnArr.push(myGroupNodes[i].firstChild.nodeValue);
-
-			}
-			return returnArr;
-		}
-		
-		public function get groupCount():Number
-		{
-			return myGroupNodes.length;
-		}
-		
-		public function removeAllGroups():void
-		{
-			for( var i:String in myGroupNodes ) {
-				myGroupNodes[i].removeNode();
-			}
-			
-			myGroupNodes = new Array();
-		}
-		
-		public function removeGroupByName( groupName:String ):Boolean
-		{
-			for( var i:String in myGroupNodes )
-			{
-				if( myGroupNodes[i].nodeValue == groupName ) {
-					myGroupNodes[i].removeNode();
-					myGroupNodes.splice( Number(i), 1 );
-					return true;
-				}
-			}
-			
-			return false;
-		}	
-		
-		/**
-		 * The JID for this roster item.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get jid():EscapedJID
-		{
-			return new EscapedJID(getNode().attributes.jid);
-		}
-		
-		public function set jid( newJID:EscapedJID ):void
-		{
-			getNode().attributes.jid = newJID.toString();
-		}
-		
-		/**
-		 * The display name for this roster item.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get name():String
-		{
-			return getNode().attributes.name;
-		}
-		
-		public function set name( newName:String ):void
-		{
-			getNode().attributes.name = newName;
-		}
-		
-		/**
-		 * The subscription type for this roster item. Subscription types
-		 * have been enumerated by static variables in the RosterExtension:
-		 * <ul>
-		 * <li>RosterExtension.SUBSCRIBE_TYPE_NONE</li>
-		 * <li>RosterExtension.SUBSCRIBE_TYPE_TO</li>
-		 * <li>RosterExtension.SUBSCRIBE_TYPE_FROM</li>
-		 * <li>RosterExtension.SUBSCRIBE_TYPE_BOTH</li>
-		 * <li>RosterExtension.SUBSCRIBE_TYPE_REMOVE</li>
-		 * </ul>
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get subscription():String
-		{
-			return getNode().attributes.subscription;
-		}
-		
-		public function set subscription( newSubscription:String ):void
-		{
-			getNode().attributes.subscription = newSubscription;
-		}
-		
-		/**
-		 * The ask type for this roster item.  Ask types have
-		 * been enumerated by static variables in the RosterExtension:
-		 * <ul>
-		 * <li>RosterExtension.ASK_TYPE_NONE</li>
-		 * <li>RosterExtension.ASK_TYPE_SUBSCRIBE</li>
-		 * <li>RosterExtension.ASK_TYPE_UNSUBSCRIBE</li>
-		 * </ul>
-		 * 
-		 * @availability Flash Player 7
-		 */
-		 public function get askType():String
-		 {
-		 	return getNode().attributes.ask;
-		 }
-		 
-		 public function set askType( newAskType:String ):void
-		 {
-		 	getNode().attributes.ask = newAskType;
-		 }
-		 
-		 /**
-		 * Convenience routine to determine if a roster item is considered "pending" or not.
-		 */
-		 public function get pending():Boolean
-		 {
-		 	if (askType == RosterExtension.ASK_TYPE_SUBSCRIBE && (subscription == RosterExtension.SUBSCRIBE_TYPE_NONE || subscription == RosterExtension.SUBSCRIBE_TYPE_FROM)) {
-		 		return true;
-		 	}
-		 	else {
-		 		return false;
-		 	}
-		 }
-	}
-	
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/im/RosterItemVO.as
===================================================================
--- org/jivesoftware/xiff/data/im/RosterItemVO.as	(revision 11020)
+++ org/jivesoftware/xiff/data/im/RosterItemVO.as	(working copy)
@@ -1,176 +0,0 @@
-package org.jivesoftware.xiff.data.im
-{
-  import flash.events.Event;
-  import flash.events.EventDispatcher;
-
-  import mx.events.PropertyChangeEvent;
-
-  import org.jivesoftware.xiff.core.UnescapedJID;
-
-  public class RosterItemVO extends EventDispatcher implements Contact
-  {
-    private static var allContacts:Object = {};
-    private var _jid:UnescapedJID
-    private var _displayName:String;
-    private var _groups:Array = [];
-    private var _askType:String;
-    private var _subscribeType:String;
-    private var _status:String;
-    private var _show:String;
-    private var _priority:Number;
-    private var _online:Boolean = false;
-
-    public function RosterItemVO(newJID:UnescapedJID)
-    {
-      jid = newJID;
-    }
-
-    public static function get(jid:UnescapedJID, create:Boolean):RosterItemVO
-    {
-      var bareJID:String = jid.bareJID;
-      var item:RosterItemVO = allContacts[bareJID];
-      if(!item && create)
-        allContacts[bareJID] = item = new RosterItemVO(new UnescapedJID(bareJID));
-      return item;
-    }
-
-    public function set uid(i:String):void
-    {
-
-    }
-
-    public function get uid():String
-    {
-      return _jid.toString();
-    }
-
-    public function set subscribeType(newSub:String):void
-    {
-      var oldSub:String = subscribeType;
-      _subscribeType = newSub;
-      PropertyChangeEvent.createUpdateEvent(this, "subscribeType", oldSub, subscribeType);
-      dispatchEvent(new Event("changeSubscription"));
-    }
-
-    [Bindable]
-      public function get subscribeType():String
-    {
-      return _subscribeType;
-    }
-
-    public function set priority(newPriority:Number):void
-    {
-      var oldPriority:Number = priority;
-      _priority = newPriority;
-      PropertyChangeEvent.createUpdateEvent(this, "priority", oldPriority, priority);
-    }
-
-    [Bindable]
-      public function get priority():Number
-    {
-      return _priority;
-    }
-
-    public function set askType(aT:String):void
-    {
-      var oldasktype:String = askType;
-      var oldPending:Boolean = pending;
-      _askType = aT;
-      PropertyChangeEvent.createUpdateEvent(this, "askType", oldasktype, askType);
-      PropertyChangeEvent.createUpdateEvent(this, "pending", oldPending, pending);
-
-      dispatchEvent(new Event("changeAskType"));
-    }
-
-    [Bindable]
-      public function get askType():String
-    {
-      return _askType;	
-    }
-
-    public function set status(newStatus:String):void
-    {
-      var oldStatus:String = status;
-      _status = newStatus;
-      PropertyChangeEvent.createUpdateEvent(this, "status", oldStatus, status);
-    }
-
-    [Bindable]
-      public function get status():String
-    {
-      if(!online)
-        return "Offline";
-      return _status ? _status : "Available";
-    }
-
-    public function set online(newState:Boolean):void
-    {
-      if(newState == online)
-        return;
-      var oldOnline:Boolean = online;
-      _online = newState;
-      PropertyChangeEvent.createUpdateEvent(this, "online", oldOnline, online);
-    }
-
-    [Bindable]
-      public function get online():Boolean
-    {
-      return _online;
-    }
-
-    public function set show(newShow:String):void
-    {
-      var oldShow:String = show;
-      _show = newShow;
-      PropertyChangeEvent.createUpdateEvent(this, "show", oldShow, show);
-    }
-
-    [Bindable]
-      public function get show():String
-    {
-      return _show;
-    }
-
-    public function set jid(j:UnescapedJID):void
-    {
-      var oldjid:UnescapedJID = _jid;
-      _jid = j;
-      //if we aren't using a custom display name, then settings the jid updates the display name
-      if(!_displayName)
-        dispatchEvent(new Event("changeDisplayName"));
-
-      PropertyChangeEvent.createUpdateEvent(this, "jid", oldjid, j);
-    }
-
-    [Bindable]
-      public function get jid():UnescapedJID
-    {
-      return _jid;
-    }
-
-    public function set displayName(name:String):void
-    {
-      var olddisplayname:String = displayName;
-      _displayName = name;
-      PropertyChangeEvent.createUpdateEvent(this, "displayName", olddisplayname, displayName);
-      dispatchEvent(new Event("changeDisplayName"));
-    }
-
-    [Bindable(event=changeDisplayName)]
-      public function get displayName():String
-    {
-      return _displayName ? _displayName : _jid.node;
-    }
-
-    [Bindable(event=changeAskType)]
-      [Bindable(event=changeSubscription)]
-      public function get pending():Boolean {
-        return askType == RosterExtension.ASK_TYPE_SUBSCRIBE && (subscribeType == RosterExtension.SUBSCRIBE_TYPE_NONE || subscribeType == RosterExtension.SUBSCRIBE_TYPE_FROM);
-      }
-
-    public override function toString():String
-    {
-      return jid.toString();
-    }
-  }
-}
Index: org/jivesoftware/xiff/data/INodeProxy.as
===================================================================
--- org/jivesoftware/xiff/data/INodeProxy.as	(revision 11020)
+++ org/jivesoftware/xiff/data/INodeProxy.as	(working copy)
@@ -1,52 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	/**
-	 * An interface for objects that abstract XML data by providing accessors
-	 * to the original XML data stored within.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Interfaces
-	 * @toc-sort 1
-	 */
-	import flash.xml.XMLNode;
-
-	public interface INodeProxy
-	{
-		/**
-		 * Gets the XML node that is being abstracted.
-		 *
-		 * @availability Flash Player 7
-		 */
-		function getNode():XMLNode;
-		
-		/**
-		 * Sets the XML node that will be abstracted.
-		 *
-		 * @availability Flash Player 7
-		 */
-		function setNode( node:XMLNode ):Boolean;
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/IQ.as
===================================================================
--- org/jivesoftware/xiff/data/IQ.as	(revision 11020)
+++ org/jivesoftware/xiff/data/IQ.as	(working copy)
@@ -1,156 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data
-{
-	
-	import flash.xml.XMLNode;
-	import org.jivesoftware.xiff.core.EscapedJID;
-	
-	/**
-	 * A class for abstraction and encapsulation of IQ (info-query) data.
-	 * 
-	 * @param recipient The JID of the IQ recipient
-	 * @param sender The JID of the IQ sender - the server should report an error if this is falsified
-	 * @param iqType The type of the IQ - there are static variables declared for each type
-	 * @param iqID The unique ID of the IQ
-	 * @param iqCallback The function to be called when the server responds to the IQ
-	 * @param iqCallbackScope The object instance containing the callback method
-	 */
-	public class IQ extends XMPPStanza implements ISerializable
-	{
-		private var myCallback:String;
-		private var myCallbackScope:Object;
-	    private var myCallbackFunc:Function;
-	
-		private var myQueryName:String;
-		private var myQueryFields:Array;
-		
-		// Static variables for specific type strings
-		public static var SET_TYPE:String = "set";
-		public static var GET_TYPE:String = "get";
-		public static var RESULT_TYPE:String = "result";
-		public static var ERROR_TYPE:String = "error";
-	
-		public function IQ( recipient:EscapedJID=null, iqType:String=null, iqID:String=null, iqCallback:String=null, iqCallbackScope:Object=null, iqCallbackFunc:Function=null )
-		{
-			var id:String = exists( iqID ) ? iqID : generateID("iq_");
-			
-			super( recipient, null, iqType, id, "iq" );
-			
-			callbackName = iqCallback;
-			callbackScope = iqCallbackScope;
-	        callback = iqCallbackFunc;
-	        
-		}
-	
-		/**
-		 * Serializes the IQ into XML form for sending to a server.
-		 *
-		 * @return An indication as to whether serialization was successful
-		 */
-		override public function serialize( parentNode:XMLNode ):Boolean
-		{
-			return super.serialize( parentNode );
-		}
-		
-		/**
-		 * Deserializes an XML object and populates the IQ instance with its data.
-		 *
-		 * @param xmlNode The XML to deserialize
-		 * @return An indication as to whether deserialization was sucessful
-		 */
-		override public function deserialize( xmlNode:XMLNode ):Boolean
-		{
-			return super.deserialize( xmlNode );
-		}
-		
-		/**
-		 * The function that will be called when an IQ result or error 
-		 * is received with the same ID as one you send.  The function will
-	     * be called in the scope of the IQ, so if you wish to have this
-	     * called with the scope of your class wrap your function with a
-	     * mx.utils.Delegate class.
-	     *
-	     * <p>If both <code>callbackName/callbackScope</code> and callback are 
-	     * set then both functions will be called.</p>
-	     *
-	     * <p>This is an alternative to the <code>callbackName/callbackScope</code> 
-	     * method of receiving callbacks.</p>
-	     *
-	     * <p>Callback functions take one parameter which will be the IQ instance
-	     * received from the server.</p>
-	     *
-	     * <p>This isn't a required property, but is useful if you
-		 * need to respond to server responses to an IQ.</p>
-		 *
-		 * @see #callbackScope
-		 * @see #callbackName
-		 */
-	    public function get callback():Function
-	    {
-	        return myCallbackFunc;
-	    }
-	
-	    public function set callback( aFunc:Function ):void
-	    {
-	        myCallbackFunc = aFunc;
-	    }
-	
-		/**
-		 * The name of the callback function to call when a response to the IQ
-		 * is received. This isn't a required property, but is useful if you
-		 * need to respond to server responses to an IQ.
-		 *
-		 * @see #callbackScope
-	     * @see #callback
-		 */
-		public function get callbackName():String
-		{
-			return myCallback;
-		}
-		
-		public function set callbackName( aName:String ):void
-		{
-			myCallback = aName;
-		}
-		
-		/**
-		 * The scope of the callback function to call when a response to the IQ
-		 * is received. This isn't a required property, but is useful if you
-		 * need to respond to server responses to an IQ.
-		 *
-		 * @see #callbackName
-	     * @see #callback
-		 */
-		public function get callbackScope():Object
-		{
-			return myCallbackScope;
-		}
-		
-		public function set callbackScope( scope:Object ):void
-		{
-			myCallbackScope = scope;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/ISerializable.as
===================================================================
--- org/jivesoftware/xiff/data/ISerializable.as	(revision 11020)
+++ org/jivesoftware/xiff/data/ISerializable.as	(working copy)
@@ -1,54 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	/**
-	 * All XMPP stanzas that will interact with the library should implement this interface.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Interfaces
-	 * @toc-sort 1
-	 */
-	import flash.xml.XMLNode;
-
-	public interface ISerializable
-	{
-		/**
-		 * Called when the library need to retrieve the state of the instance.  If the instance manages its own state, then the state should be copied into the XMLNode passed.  If the instance also implements INodeProxy, then the parent should be verified against the parent XMLNode passed to determine if the serialization is in the same namespace.
-		 *
-		 * @param parentNode (XMLNode) The container of the XML.
-		 * @returns On success, return true.
-		 */
-		function serialize( parentNode:XMLNode ):Boolean;
-	
-		/**
-		 * Called when data is retrieved from the XMLSocket, use this method to extract any state into internal state.
-		 * @param node (XMLNode) The node that should be used as the data container.
-		 * @returns On success, return true.
-		 */
-		function deserialize( node:XMLNode ):Boolean;
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/Message.as
===================================================================
--- org/jivesoftware/xiff/data/Message.as	(revision 11020)
+++ org/jivesoftware/xiff/data/Message.as	(working copy)
@@ -1,262 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.data
-{
-	 
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.muc.MUCUserExtension;
-	import org.jivesoftware.xiff.data.xhtml.XHTMLExtension;
-	
-	/**
-	 * A class for abstraction and encapsulation of message data.
-	 *
-	 * @param recipient The JID of the message recipient
-	 * @param sender The JID of the message sender - the server should report an error if this is falsified
-	 * @param msgID The message ID
-	 * @param msgBody The message body in plain-text format
-	 * @param msgHTMLBody The message body in XHTML format
-	 * @param msgType The message type
-	 * @param msgSubject (Optional) The message subject
-	 */
-	public class Message extends XMPPStanza implements ISerializable
-	{
-		
-		// Static variables for specific type strings
-		public static var NORMAL_TYPE:String = "normal";
-		public static var CHAT_TYPE:String = "chat";
-		public static var GROUPCHAT_TYPE:String = "groupchat";
-		public static var HEADLINE_TYPE:String = "headline";
-		public static var ERROR_TYPE:String = "error";
-	
-		// Private references to nodes within our XML
-		private var myBodyNode:XMLNode;
-		private var mySubjectNode:XMLNode;
-		private var myThreadNode:XMLNode;
-		private var myTimeStampNode:XMLNode;
-			
-		private static var isMessageStaticCalled:Boolean = MessageStaticConstructor();
-		private static var staticConstructorDependency:Array = [ XMPPStanza, XHTMLExtension, ExtensionClassRegistry ];
-	
-		public function Message( recipient:EscapedJID=null, msgID:String=null, msgBody:String=null, msgHTMLBody:String=null, msgType:String=null, msgSubject:String=null )
-		{
-			// Flash gives a warning if superconstructor is not first, hence the inline id check
-			var msgId:String = exists( msgID ) ? msgID : generateID("m_");
-			super( recipient, null, msgType, msgId, "message" );
-			body = msgBody;
-			htmlBody = msgHTMLBody;
-			subject = msgSubject;
-		}
-	
-		public static function MessageStaticConstructor():Boolean
-		{
-			XHTMLExtension.enable();
-			return true;
-		}
-	
-		/**
-		 * Serializes the Message into XML form for sending to a server.
-		 *
-		 * @return An indication as to whether serialization was successful
-		 */
-		override public function serialize( parentNode:XMLNode ):Boolean
-		{
-			return super.serialize( parentNode );
-		}
-	
-		/**
-		 * Deserializes an XML object and populates the Message instance with its data.
-		 *
-		 * @param xmlNode The XML to deserialize
-		 * @return An indication as to whether deserialization was sucessful
-		 */
-		override public function deserialize( xmlNode:XMLNode ):Boolean
-		{
-			var isSerialized:Boolean = super.deserialize( xmlNode );
-			if (isSerialized) {
-				var children:Array = xmlNode.childNodes;
-				for( var i:String in children )
-				{
-					switch( children[i].nodeName )
-					{
-						// Adding error handler for 404 sent back by server
-						case "error":
-							
-							break;
-						case "body":
-							myBodyNode = children[i];
-							break;
-						
-						case "subject":
-							mySubjectNode = children[i];
-							break;
-							
-						case "thread":
-							myThreadNode = children[i];
-							break;
-							
-						case "x":
-							if(children[i].attributes.xmlns == "jabber:x:delay")
-								myTimeStampNode = children[i];
-							if(children[i].attributes.xmlns == MUCUserExtension.NS) {
-								var mucUserExtension:MUCUserExtension = new MUCUserExtension(getNode());
-								mucUserExtension.deserialize(children[i]);
-								addExtension(mucUserExtension);
-							}
-							break;
-					}
-				}
-			}
-			return isSerialized;
-		}
-		
-		/**
-		 * The message body in plain-text format. If a client cannot render HTML-formatted
-		 * text, this text is typically used instead.
-		 */
-		public function get body():String
-		{
-			if (!exists(myBodyNode)){
-				return null;
-			}
-			var value: String = '';
-			
-			try
-			{
-				value =  myBodyNode.firstChild.nodeValue;				
-			}
-			
-			catch (error:Error)
-			{
-				trace (error.getStackTrace());
-			}
-			return value;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set body( bodyText:String ):void
-		{
-			myBodyNode = replaceTextNode(getNode(), myBodyNode, "body", bodyText);
-		}
-		
-		/**
-		 * The message body in XHTML format. Internally, this uses the XHTML data extension.
-		 *
-		 * @see org.jivesoftware.xiff.data.xhtml.XHTMLExtension
-		 */
-		public function get htmlBody():String
-		{
-			try
-			{
-				var ext:XHTMLExtension = getAllExtensionsByNS(XHTMLExtension.NS)[0];
-				return ext.body;
-			}
-			catch (e:Error)
-			{
-				trace("Error : null trapped. Resuming.");
-			}
-			return null;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set htmlBody( bodyHTML:String ):void
-		{
-			// Removes any existing HTML body text first
-	        removeAllExtensions(XHTMLExtension.NS);
-	
-	        if (exists(bodyHTML) && bodyHTML.length > 0) {
-	            var ext:XHTMLExtension = new XHTMLExtension(getNode());
-	            ext.body = bodyHTML;
-	            addExtension(ext);
-	        }
-		}
-	
-		/**
-		 * The message subject. Typically chat and groupchat-type messages do not use
-		 * subjects. Rather, this is reserved for normal and headline-type messages.
-		 */
-		public function get subject():String
-		{
-			if (mySubjectNode == null || mySubjectNode.firstChild == null) return null;
-			return mySubjectNode.firstChild.nodeValue;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set subject( aSubject:String ):void
-		{
-			mySubjectNode = replaceTextNode(getNode(), mySubjectNode, "subject", aSubject);
-		}
-	
-		/**
-		 * The message thread ID. Threading is used to group messages of the same discussion together.
-		 * The library does not perform message grouping, rather it is up to any client authors to
-		 * properly perform this task.
-		 */
-		public function get thread():String
-		{
-			if (myThreadNode == null || myThreadNode.firstChild == null) return null;
-			return myThreadNode.firstChild.nodeValue;
-		}
-		
-		/**
-		 * @private
-		 */
-		public function set thread( theThread:String ):void
-		{
-			myThreadNode = replaceTextNode(getNode(), myThreadNode, "thread", theThread);
-		}
-		
-		public function set time( theTime:Date ): void
-		{
-			
-		}
-		
-		public function get time():Date 
-		{
-			if(myTimeStampNode == null) return null;
-			var stamp:String = myTimeStampNode.attributes.stamp;
-			
-			var t:Date = new Date();
-			//CCYYMMDDThh:mm:ss
-			//20020910T23:41:07
-			t.setUTCFullYear(stamp.slice(0, 4)); //2002
-			t.setUTCMonth(Number(stamp.slice(4, 6)) - 1); //09 
-			t.setUTCDate(stamp.slice(6, 8)); //10
-											 //T
-			t.setUTCHours(stamp.slice(9, 11)); //23
-												//:
-			t.setUTCMinutes(stamp.slice(12, 14)); //41
-												//:
-			t.setUTCSeconds(stamp.slice(15, 17)); //07
-			return t;
-		}
-	}
-}
Index: org/jivesoftware/xiff/data/muc/MUC.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUC.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUC.as	(working copy)
@@ -1,85 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	/**
-	 * This class contains a series of static constants that are used throughout the
-	 * multi-user conferencing extensions. The constants include the following for
-	 * conference room affiliations:
-	 * <ul>
-	 * <li>ADMIN_AFFILIATION</li>
-	 * <li>MEMBER_AFFILIATION</li>
-	 * <li>NO_AFFILIATION</li>
-	 * <li>OUTCAST_AFFILIATION</li>
-	 * <li>OWNER_AFFILIATION</li>
-	 * </ul>
-	 *
-	 * And the following constants for room roles:
-	 * <ul>
-	 * <li>MODERATOR_ROLE</li>
-	 * <li>NO_ROLE</li>
-	 * <li>PARTICIPANT_ROLE</li>
-	 * <li>VISITOR_ROLE</li>
-	 * </ul>
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.muc.MUCExtension;
-	import org.jivesoftware.xiff.data.muc.MUCUserExtension;
-	import org.jivesoftware.xiff.data.muc.MUCOwnerExtension;
-	import org.jivesoftware.xiff.data.muc.MUCAdminExtension;
-	
-	public class MUC
-	{
-		public static var ADMIN_AFFILIATION:String = "admin";
-		public static var MEMBER_AFFILIATION:String = "member";
-		public static var NO_AFFILIATION:String = "none";
-		public static var OUTCAST_AFFILIATION:String = "outcast";
-		public static var OWNER_AFFILIATION:String = "owner";
-	
-		public static var MODERATOR_ROLE:String = "moderator";
-		public static var NO_ROLE:String = "none";
-		public static var PARTICIPANT_ROLE:String = "participant";
-		public static var VISITOR_ROLE:String = "visitor";
-	
-		private static var staticDependencies:Array = [ ExtensionClassRegistry, MUCExtension, MUCUserExtension, MUCOwnerExtension, MUCAdminExtension ];
-	
-	    /** 
-	     * Register the multi-user chat extension capabilities with this method
-	     * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register( MUCExtension );
-	        ExtensionClassRegistry.register( MUCUserExtension );
-	        ExtensionClassRegistry.register( MUCOwnerExtension );
-	        ExtensionClassRegistry.register( MUCAdminExtension );
-	    }
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/muc/MUCAdminExtension.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCAdminExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCAdminExtension.as	(working copy)
@@ -1,64 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	import org.jivesoftware.xiff.data.muc.MUCBaseExtension;
-	import flash.xml.XMLNode;
-	
-	/**
-	 * Implements the administration command data model in <a href="http://www.jabber.org/jeps/jep-0045.html">JEP-0045<a> for multi-user chat.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The containing XMLNode for this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	public class MUCAdminExtension extends MUCBaseExtension implements IExtension
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "http://jabber.org/protocol/muc#admin";
-		public static var ELEMENT:String = "query";
-	
-		private var myItems:Array;
-	
-		public function MUCAdminExtension( parent:XMLNode=null )
-		{
-			super(parent);
-		}
-	
-		public function getNS():String
-		{
-			return MUCAdminExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return MUCAdminExtension.ELEMENT;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/muc/MUCBaseExtension.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCBaseExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCBaseExtension.as	(working copy)
@@ -1,162 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtendable;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	/**
-	 * Implements the base functionality shared by all MUC extensions
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The containing XMLNode for this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	public class MUCBaseExtension extends Extension implements IExtendable, ISerializable
-	{
-		private var myItems:Array = [];
-	
-		public function MUCBaseExtension( parent:XMLNode=null )
-		{
-			super(parent);
-		}
-
-		/**
-		 * Called when this extension is being put back on the network.  Perform any further serialization for Extensions and items
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			var node:XMLNode = getNode();
-	
-			for each(var i:* in myItems) {
-				if (!i.serialize(node)) {
-					return false;
-				}
-			}
-	
-			var exts:Array = getAllExtensions();
-			for each(var ii:* in exts) {
-				if (!ii.serialize(node)) {
-					return false;
-				}
-			}
-	
-			if (parent != node.parentNode) {
-				parent.appendChild(node.cloneNode(true));
-			}
-	
-			return true;
-		}
-	
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode(node);
-			removeAllItems();
-	
-			for each( var child:XMLNode in node.childNodes ) {
-				switch( child.nodeName )
-				{
-					case "item":
-						var item:MUCItem = new MUCItem(getNode());
-						item.deserialize(child);
-						myItems.push(item);
-						break;
-	
-					default:
-						var extClass:Class = ExtensionClassRegistry.lookup(child.attributes.xmlns);
-						if (extClass != null) {
-							var ext:IExtension = new extClass();
-							if (ext != null) {
-								if (ext is ISerializable) {
-									ISerializable(ext).deserialize(child);
-								}
-								addExtension(ext);
-							}
-						}
-						break;
-				}
-			}
-			return true;
-		}
-	
-		/**
-		 * Item interface to MUCItems if they are contained in this extension
-		 *
-		 * @return Array of MUCItem objects
-		 * @availability Flash Player 7
-		 */
-		public function getAllItems():Array
-		{
-			return myItems;
-		}
-	
-		/**
-		 * Use this method to create a new item.  Either the affiliation or role are requried.
-		 *
-		 * @param affiliation A predefined string defining the affiliation the JID or nick has in relation to the room
-		 * @param role The role the jid or nick has in the room
-		 * @param nick The nickname of the new item
-		 * @param jid The jid of the new item
-		 * @param actor The user that is actually creating the request
-		 * @param reason The reason why the action associated with this item is being preformed
-		 * @return The newly created MUCItem
-		 * @availability Flash Player 7
-		 */
-		public function addItem(affiliation:String=null, role:String=null, nick:String=null, jid:EscapedJID=null, actor:String=null, reason:String=null):MUCItem
-		{
-			var item:MUCItem = new MUCItem(getNode());
-	
-			if (exists(affiliation)){ item.affiliation = affiliation; }
-			if (exists(role)) 		{ item.role = role; }
-			if (exists(nick)) 		{ item.nick = nick; }
-			if (exists(jid)) 		{ item.jid = jid; }
-			if (exists(actor)) 		{ item.actor = new EscapedJID(actor); }
-			if (exists(reason)) 	{ item.reason = reason; }
-			
-			myItems.push(item);
-			return item;
-		}
-		
-		/**
-		 * Use this method to remove all items.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function removeAllItems():void
-		{
-			for each(var i:* in myItems) {
-				i.setNode(null);
-			}
-		 	myItems = [];
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/muc/MUCExtension.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCExtension.as	(working copy)
@@ -1,199 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	/**
-	 * Implements the base MUC protocol schema from <a href="http://www.xmpp.org/extensions/xep-0045.html">XEP-0045<a> for multi-user chat.
-	 *
-	 * This extension is typically used to test for the presence of MUC enabled conferencing service, or a MUC related error condition.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The containing XMLNode for this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	public class MUCExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "http://jabber.org/protocol/muc";
-		public static var ELEMENT:String = "x";
-	
-		private var myHistoryNode:XMLNode;
-		private var myPasswordNode:XMLNode;
-	
-		public function MUCExtension( parent:XMLNode=null )
-		{
-			super(parent);
-		}
-	
-		public function getNS():String
-		{
-			return MUCExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return MUCExtension.ELEMENT;
-		}
-	
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			if (exists(getNode().parentNode)) {
-				return false;
-			}
-			var node:XMLNode = getNode().cloneNode(true);
-			for each(var ext:IExtension in getAllExtensions()) {
-				if (ext is ISerializable) {
-					ISerializable(ext).serialize(node);
-				}
-			}
-			parent.appendChild(node);
-			return true;
-		}
-	
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode(node);
-	
-			for each( var child:XMLNode in node.childNodes ) {
-				switch( child.nodeName )
-				{
-					case "history":
-						myHistoryNode = child;
-						break;
-						
-					case "password":
-						myPasswordNode = child;
-						break;
-				}
-			}
-			return true;
-		}
-		
-		public function addChildNode(childNode:XMLNode):void {
-			getNode().appendChild(childNode);
-		}
-	
-		/**
-		 * If a room is password protected, add this extension and set the password
-		 */
-		public function get password():String
-		{
-			if(myPasswordNode && myPasswordNode.firstChild)
-				return myPasswordNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		public function set password(val:String):void
-		{
-			myPasswordNode = replaceTextNode(getNode(), myPasswordNode, "password", val);
-		}
-	
-		/**
-		 * This is property allows a user to retrieve a server defined collection of previous messages.
-		 * Set this property to "true" to retrieve a history of the dicussions.
-		 */
-		public function get history():Boolean
-		{
-			return exists(myHistoryNode);
-		}
-	
-		public function set history(val:Boolean):void
-		{
-			if (val) {
-				myHistoryNode = ensureNode(myHistoryNode, "history");
-			} else {
-				myHistoryNode.removeNode();
-				myHistoryNode = null;
-				//delete myHistoryNode;
-			}
-		}
-	
-		/**
-		 * Size based condition to evaluate by the server for the maximum characters to return during history retrieval
-		 */
-		public function get maxchars():Number
-		{
-			return Number(myHistoryNode.attributes.maxchars);
-		}
-	
-		public function set maxchars(val:Number):void
-		{
-			myHistoryNode = ensureNode(myHistoryNode, "history");
-			myHistoryNode.attributes.maxchars = val.toString();
-		}
-	
-		/**
-		 * Protocol based condition for the number of stanzas to return during history retrieval
-		 */
-		public function get maxstanzas():Number
-		{
-			return Number(myHistoryNode.attributes.maxstanzas);
-		}
-	
-		public function set maxstanzas(val:Number):void
-		{
-			myHistoryNode = ensureNode(myHistoryNode, "history");
-			myHistoryNode.attributes.maxstanzas = val.toString();
-		}
-	
-		/**
-		 * Time based condition to retrive all messages for the last N seconds.
-		 */
-		public function get seconds():Number
-		{
-			return Number(myHistoryNode.attributes.seconds);
-		}
-	
-		public function set seconds(val:Number):void
-		{
-			myHistoryNode = ensureNode(myHistoryNode, "history");
-			myHistoryNode.attributes.seconds = val.toString();
-		}
-	
-		/**
-		 * Time base condition to retrieve all messages from a given time formatted in the format described in 
-		 * <a href="http://www.jabber.org/jeps/jep-0082.html">JEP-0082</a>.
-		 *
-		 */
-		public function get since():String
-		{
-			return myHistoryNode.attributes.since;
-		}
-	
-		public function set since(val:String):void
-		{
-			myHistoryNode = ensureNode(myHistoryNode, "history");
-			myHistoryNode.attributes.since = val;
-		}
-	}
-}
Index: org/jivesoftware/xiff/data/muc/MUCItem.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCItem.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCItem.as	(working copy)
@@ -1,159 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	/**
-	 * This class is used by the MUCExtension for internal representation of
-	 * information pertaining to occupants in a multi-user conference room.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	public class MUCItem extends XMLStanza implements ISerializable
-	{
-		public static var ELEMENT:String = "item";
-	
-		private var myActorNode:XMLNode;
-		private var myReasonNode:XMLNode;
-	
-		public function MUCItem(parent:XMLNode=null)
-		{
-			super();
-	
-			getNode().nodeName = ELEMENT;
-	
-			if (exists(parent)) {
-				parent.appendChild(getNode());
-			}
-		}
-	
-		public function serialize(parent:XMLNode):Boolean
-		{
-			if (parent != getNode().parentNode) {
-				parent.appendChild(getNode().cloneNode(true));
-			}
-	
-			return true;
-		}
-	
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-	
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-				switch( children[i].nodeName )
-				{
-					case "actor":
-						myActorNode = children[i];
-						break;
-						
-					case "reason":
-						myReasonNode = children[i];
-						break;
-				}
-			}
-			return true;
-		}
-	
-		public function get actor():EscapedJID
-		{
-			return new EscapedJID(myActorNode.attributes.jid);
-		}
-	
-		public function set actor(val:EscapedJID):void
-		{
-			myActorNode = ensureNode(myActorNode, "actor");
-			myActorNode.attributes.jid = val.toString();
-		}
-	
-		public function get reason():String
-		{
-			if(myReasonNode && myReasonNode.firstChild)
-				return myReasonNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		public function set reason(val:String):void
-		{
-			myReasonNode = replaceTextNode(getNode(), myReasonNode, "reason", val);
-		}
-	
-		public function get affiliation():String
-		{
-			return getNode().attributes.affiliation;
-		}
-	
-		public function set affiliation(val:String):void
-		{
-			getNode().attributes.affiliation = val;
-		}
-	
-		public function get jid():EscapedJID
-		{
-			if(getNode().attributes.jid == null)
-				return null;
-			return new EscapedJID(getNode().attributes.jid);
-		}
-	
-		public function set jid(val:EscapedJID):void
-		{
-			getNode().attributes.jid = val.toString();
-		}
-	
-		/**
-		 * The nickname of the conference occupant.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get nick():String
-		{
-			return getNode().attributes.nick;
-		}
-	
-		public function set nick(val:String):void
-		{
-			getNode().attributes.nick = val;
-		}
-	
-		public function get role():String
-		{
-			return getNode().attributes.role;
-		}
-	
-		public function set role(val:String):void
-		{
-			getNode().attributes.role = val;
-		}
-	}
-}
Index: org/jivesoftware/xiff/data/muc/MUCOwnerExtension.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCOwnerExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCOwnerExtension.as	(working copy)
@@ -1,103 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.IExtension;
-	
-	/**
-	 * Implements the administration command data model in <a href="http://www.jabber.org/jeps/jep-0045.html">JEP-0045<a> for multi-user chat.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The containing XMLNode for this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	public class MUCOwnerExtension extends MUCBaseExtension implements IExtension
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "http://jabber.org/protocol/muc#owner";
-		public static var ELEMENT:String = "query";
-	
-		private var myDestroyNode:XMLNode;
-	
-		public function MUCOwnerExtension( parent:XMLNode=null )
-		{
-			super(parent);
-		}
-	
-		public function getNS():String
-		{
-			return MUCOwnerExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return MUCOwnerExtension.ELEMENT;
-		}
-	
-		override public function deserialize( node:XMLNode ):Boolean
-		{
-			super.deserialize(node);
-	
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-				switch( children[i].nodeName )
-				{
-					case "destroy":
-						myDestroyNode = children[i];
-						break;
-				}
-			}
-			return true;
-		}
-	
-	    override public function serialize( parent:XMLNode ):Boolean
-	    {
-	        return super.serialize(parent);
-	    }
-	
-	    /**
-	     * Replaces the <code>destroy</code> node with a new node and sets
-	     * the <code>reason</code> element and <code>jid</code> attribute
-	     *
-	     * @param reason A string describing the reason for room destruction
-	     * @param alternateJID A string containing a JID that room members can use instead of this room
-	     * @availability Flash Player 7
-	     */
-	    public function destroy(reason:String, alternateJID:EscapedJID):void
-	    {
-	        myDestroyNode = ensureNode(myDestroyNode, "destroy");
-	        for each(var child:XMLNode in myDestroyNode.childNodes) {
-	            child.removeNode();
-	        }
-	
-	        if( exists(reason) ) { replaceTextNode(myDestroyNode, undefined, "reason", reason); }
-	        if( exists(alternateJID) ) { myDestroyNode.attributes.jid = alternateJID.toString(); }
-	    }
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/muc/MUCStatus.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCStatus.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCStatus.as	(working copy)
@@ -1,47 +0,0 @@
-package org.jivesoftware.xiff.data.muc
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	public class MUCStatus
-	{
-		private var node:XMLNode;
-		private var parent:XMLStanza
-		public function MUCStatus(xmlNode:XMLNode, parentStanza:XMLStanza)
-		{
-			super();
-			node = xmlNode ? xmlNode : new XMLNode(1, "status");
-			parent = parentStanza;
-		}
-
-		/**
-		 * Property used to add or retrieve a status code describing the condition that occurs.
-		 */
-		public function get code():Number
-		{
-			return node.attributes.code;
-		}
-		
-		public function set code(newCode:Number):void
-		{
-			node.attributes.code = newCode.toString();
-		}
-		
-		/**
-		 * Property that contains some text with a description of a condition.
-		 */
-		public function get message():String
-		{
-			if(node.firstChild)
-				return node.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		public function set message(val:String):void
-		{
-			node = parent.replaceTextNode(parent.getNode(), node, "status", val);
-		}
-	}
-}
Index: org/jivesoftware/xiff/data/muc/MUCUserExtension.as
===================================================================
--- org/jivesoftware/xiff/data/muc/MUCUserExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/muc/MUCUserExtension.as	(working copy)
@@ -1,227 +0,0 @@
-﻿package org.jivesoftware.xiff.data.muc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.IExtension;
-	
-	/**
-	 * Implements the base MUC user protocol schema from <a href="http://www.xmpp.org/extensions/xep-0045.html">XEP-0045<a> for multi-user chat.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The containing XMLNode for this extension
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Conferencing
-	 * @toc-sort 1/2
-	 */
-	public class MUCUserExtension extends MUCBaseExtension implements IExtension
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "http://jabber.org/protocol/muc#user";
-		public static var ELEMENT:String = "x";
-	
-		public static var DECLINE_TYPE:String = "decline";
-		public static var DESTROY_TYPE:String = "destroy";
-		public static var INVITE_TYPE:String = "invite";
-		public static var OTHER_TYPE:String = "other";
-	
-		private var myActionNode:XMLNode;
-		private var myPasswordNode:XMLNode;
-		private var myStatuses:Array = [];
-	
-		public function MUCUserExtension( parent:XMLNode=null )
-		{
-			super(parent);
-		}
-	
-		public function getNS():String
-		{
-			return MUCUserExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return MUCUserExtension.ELEMENT;
-		}
-	
-		override public function deserialize( node:XMLNode ):Boolean
-		{
-			super.deserialize(node);
-	
-			for each( var child:XMLNode in node.childNodes ) {
-				switch( child.nodeName )
-				{
-					case DECLINE_TYPE:
-						myActionNode = child;
-						break;
-						
-					case DESTROY_TYPE:
-						myActionNode = child;
-						break;
-						
-					case INVITE_TYPE:
-						myActionNode = child;
-						break;
-						
-					case "status":
-						myStatuses.push(new MUCStatus(child, this));
-						break;
-						
-					case "password":
-						myPasswordNode = child;
-						break;
-				}
-			}
-			return true;
-		}
-	
-		/**
-		 * The type of user extension this is
-		 */
-		public function get type():String
-		{
-			if (myActionNode == null)
-				return null;
-			return myActionNode.nodeName == null ? OTHER_TYPE : myActionNode.nodeName;
-		}
-	
-		/**
-		 * The to property for invite and decline action types
-		 */
-		public function get to():EscapedJID
-		{
-			return new EscapedJID(myActionNode.attributes.to);
-		}
-	
-		/**
-		 * The from property for invite and decline action types
-		 */
-		public function get from():EscapedJID
-		{
-			return new EscapedJID(myActionNode.attributes.from);
-		}
-	
-		/**
-		 * The jid property for destroy the action type
-		 */
-		public function get jid():EscapedJID
-		{
-			return new EscapedJID(myActionNode.attributes.jid);
-		}
-	
-	    /**
-	     * The reason for the invite/decline/destroy
-	     */
-	    public function get reason():String
-	    {
-	    	if (myActionNode.firstChild != null) {
-	    		if (myActionNode.firstChild.firstChild != null) {
-	    			return myActionNode.firstChild.firstChild.nodeValue;
-	    		}
-	    	}
-	        return null;
-	    }
-	
-		/**
-		 * Use this extension to invite another user
-		 */
-		public function invite(to:EscapedJID, from:EscapedJID, reason:String):void
-		{
-			updateActionNode(INVITE_TYPE, {to:to.toString(), from:from ? from.toString() : null}, reason);
-		}
-	
-		/**
-		 * Use this extension to destroy a room
-		 */
-		public function destroy(room:EscapedJID, reason:String):void
-		{
-			updateActionNode(DESTROY_TYPE, {jid: room.toString()}, reason);
-		}
-	
-		/**
-		 * Use this extension to decline an invitation
-		 */
-		public function decline(to:EscapedJID, from:EscapedJID, reason:String):void
-		{
-			updateActionNode(DECLINE_TYPE, {to:to.toString(), from:from ? from.toString() : null}, reason);
-		}
-	
-		/**
-		 * Property to use if the concerned room is password protected
-		 */
-		public function get password():String
-		{
-			if (myPasswordNode == null) return null;
-			return myPasswordNode.firstChild.nodeValue;
-		}
-	
-		public function set password(val:String):void
-		{
-			myPasswordNode = replaceTextNode(getNode(), myPasswordNode, "password", val);
-		}
-	
-		
-		public function get statuses():Array
-		{
-			return myStatuses;
-		}
-		
-		public function set statuses(newStatuses:Array):void
-		{
-			myStatuses = newStatuses;
-		}
-		
-		public function hasStatusCode(code:Number):Boolean
-		{
-			for each(var status:MUCStatus in statuses)
-			{
-				if(status.code == code)
-					return true;
-			}
-			return false;
-		}
-			
-		/**
-		 * Internal method that manages the type of node that we will use for invite/destroy/decline messages
-		 */
-		private function updateActionNode(type:String, attrs:Object, reason:String) : void
-		{
-			if (myActionNode != null) myActionNode.removeNode();
-	
-			myActionNode = XMLFactory.createElement(type);
-			for (var i:String in attrs) {
-				if (exists(attrs[i])) {
-					myActionNode.attributes[i] = attrs[i];
-				}
-			}
-			getNode().appendChild(myActionNode);
-	
-			if (reason.length > 0) {
-				replaceTextNode(myActionNode, undefined, "reason", reason);
-			}
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/Presence.as
===================================================================
--- org/jivesoftware/xiff/data/Presence.as	(revision 11020)
+++ org/jivesoftware/xiff/data/Presence.as	(working copy)
@@ -1,195 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	
-	/**
-	 * This class provides encapsulation for manipulation of presence data for sending and receiving.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @param recipient The recipient of the presence, usually in the form of a JID.
-	 * @param sender The sender of the presence, usually in the form of a JID.
-	 * @param presenceType The type of presence as a string. There are predefined static variables for this.
-	 * @param showVal What to show for this presence (away, online, etc.) There are predefined static variables for this.
-	 * @param statusVal The status; usually used for the "away message."
-	 * @param priorityVal The priority of this presence; usually on a scale of 1-5.
-	 * @toc-path Data
-	 * @toc-sort 1
-	 */
-	public class Presence extends XMPPStanza implements ISerializable 
-	{
-		// Static constants for specific type strings
-		public static const UNAVAILABLE_TYPE:String = "unavailable";
-		public static const PROBE_TYPE:String = "probe";
-		public static const SUBSCRIBE_TYPE:String = "subscribe";
-		public static const UNSUBSCRIBE_TYPE:String = "unsubscribe";
-		public static const SUBSCRIBED_TYPE:String = "subscribed";
-		public static const UNSUBSCRIBED_TYPE:String = "unsubscribed";
-		public static const ERROR_TYPE:String = "error";
-		
-		// Static constants for show values
-		public static const SHOW_AWAY:String = "away";
-		public static const SHOW_CHAT:String = "chat";
-		public static const SHOW_DND:String = "dnd";
-		public static const SHOW_XA:String = "xa";
-	
-		// Private node references for property lookups
-		private var myShowNode:XMLNode;
-		private var myStatusNode:XMLNode;
-		private var myPriorityNode:XMLNode;
-	
-	
-		public function Presence( recipient:EscapedJID=null, sender:EscapedJID=null, presenceType:String=null, showVal:String=null, statusVal:String=null, priorityVal:Number=0 ) 
-		{		
-			super( recipient, sender, presenceType, null, "presence" );
-			
-			show = showVal;
-			status = statusVal;
-			priority = priorityVal;
-		}
-		
-		/**
-		 * Serializes the Presence into XML form for sending to a server.
-		 *
-		 * @return An indication as to whether serialization was successful
-		 * @availability Flash Player 7
-		 */
-		override public function serialize( parentNode:XMLNode ):Boolean 
-		{
-			return super.serialize( parentNode );
-		}
-		
-		/**
-		 * Deserializes an XML object and populates the Presence instance with its data.
-		 *
-		 * @param xmlNode The XML to deserialize
-		 * @return An indication as to whether deserialization was sucessful
-		 * @availability Flash Player 7
-		 */
-		override public function deserialize( xmlNode:XMLNode ):Boolean 
-		{	
-			var isDeserialized:Boolean = super.deserialize( xmlNode );
-			
-			if (isDeserialized) { 
-				var children:Array = xmlNode.childNodes;
-				for( var i:String in children ) 
-				{
-					switch( children[i].nodeName ) 
-					{
-						case "show":
-							myShowNode = children[i];
-							break;
-							
-						case "status":
-							myStatusNode = children[i];
-							break;
-							
-						case "priority":
-							myPriorityNode = children[i];
-							break;
-					}
-				}
-			}
-			return isDeserialized;
-		}
-		
-		/**
-		 * The show value; away, online, etc. There are predefined static variables in the Presence
-		 * class for this:
-		 * <ul>
-		 * <li>Presence.SHOW_AWAY</li>
-		 * <li>Presence.SHOW_CHAT</li>
-		 * <li>Presence.SHOW_DND</li>
-		 * <li>Presence.SHOW_XA</li>
-		 * </ul>
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get show():String 
-		{
-			if (!myShowNode || !exists(myShowNode.firstChild)) return null;
-			
-			return myShowNode.firstChild.nodeValue;
-		}
-		
-		public function set show( showVal:String ):void 
-		{
-			if(showVal != SHOW_AWAY
-			&& showVal != SHOW_CHAT
-			&& showVal != SHOW_DND
-			&& showVal != SHOW_XA
-			&& showVal != null
-			&& showVal != "")
-				throw new Error("Invalid show value: " + showVal + " for presence");
-			
-			if(myShowNode && (showVal == null || showVal == ""))
-			{
-				myShowNode.removeNode();
-				myShowNode = null;
-			}
-			myShowNode = replaceTextNode(getNode(), myShowNode, "show", showVal);
-		}
-		
-		/**
-		 * The status; usually used for "away messages."
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get status():String  {
-			if (myStatusNode == null || myStatusNode.firstChild == null) return null;
-			return myStatusNode.firstChild.nodeValue;
-		}
-		
-		public function set status( statusVal:String ):void 
-		{
-			myStatusNode = replaceTextNode(getNode(), myStatusNode, "status", statusVal);
-		}
-		
-		/**
-		 * The priority of the presence, usually on a scale of 1-5.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get priority():Number 
-		{
-			if (myPriorityNode == null) return NaN;
-			var p:Number = Number(myPriorityNode.firstChild.nodeValue);
-			if( isNaN( p ) ) {
-				return NaN;
-			}
-			else {
-				return p;
-			}
-		}
-		
-		public function set priority( priorityVal:Number ):void 
-		{
-			myPriorityNode = replaceTextNode(getNode(), myPriorityNode, "priority", priorityVal.toString());
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/privatedata/PrivateDataExtension.as
===================================================================
--- org/jivesoftware/xiff/data/privatedata/PrivateDataExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/privatedata/PrivateDataExtension.as	(working copy)
@@ -1,90 +0,0 @@
-package org.jivesoftware.xiff.data.privatedata
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.privatedata.IPrivatePayload;
-
-	public class PrivateDataExtension implements IExtension, ISerializable
-	{
-		private var _extension:XMLNode;
-		private var _payload:IPrivatePayload;
-		
-		public function PrivateDataExtension(privateName:String = null, privateNamespace:String = null, payload:IPrivatePayload = null) {
-			this._extension = new XMLNode(1, privateName);
-			this._extension.attributes["xmlns"] = privateNamespace;
-			this._payload = payload;
-		}
-		
-		public function getNS():String
-		{
-			return "jabber:iq:private";
-		}
-		
-		public function getElementName():String
-		{
-			return "query";
-		}
-		
-		public function get privateName():String {
-			return this._extension.nodeName;
-		}
-		
-		public function get privateNamespace():String {
-			return this._extension.attributes["xmlns"];
-		}
-		
-		public function get payload():IPrivatePayload {
-			return _payload;
-		}
-		
-		public function serialize(parentNode:XMLNode):Boolean
-		{
-			var extension:XMLNode = this._extension.cloneNode(true);
-			var query:XMLNode = new XMLNode(1, "query");
-			query.attributes.xmlns = "jabber:iq:private";
-			query.appendChild(extension);
-			parentNode.appendChild(query);
-
-			return _serializePayload(extension);
-		}
-		
-		private function _serializePayload(parentNode:XMLNode):Boolean {
-			if(_payload == null) {
-				return true;
-			}
-			else {
-				return _payload.serialize(parentNode);
-			}
-		}
-		
-		public function deserialize(node:XMLNode):Boolean
-		{
-			var payloadNode:XMLNode = node.firstChild;
-			var ns:String = payloadNode.attributes["xmlns"];
-			if(ns == null) {
-				return false;
-			}	
-			
-			this._extension = new XMLNode(1, payloadNode.nodeName);
-			this._extension.attributes["xmlns"] = ns;
-			
-			var extClass:Class = ExtensionClassRegistry.lookup(ns);
-			if(extClass == null) {
-				return false;
-			}
-			var ext:IPrivatePayload = new extClass();
-			if (ext != null && ext is IPrivatePayload) {
-				ext.deserialize(payloadNode);
-				this._payload = ext;
-				return true;
-			}
-			else {
-				return false;
-			}
-		}
-		
-	}
-}
Index: org/jivesoftware/xiff/data/register/RegisterExtension.as
===================================================================
--- org/jivesoftware/xiff/data/register/RegisterExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/register/RegisterExtension.as	(working copy)
@@ -1,228 +0,0 @@
-﻿package org.jivesoftware.xiff.data.register{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-		
-	/**
-	 * Implements jabber:iq:register namespace.  Use this to create new accounts on the jabber server.
-	 * Send an empty IQ.GET_TYPE packet with this extension and the return will either be a conflict, or the fields you will need to fill out.  
-	 * Send a IQ.SET_TYPE packet to the server and with the fields that are listed in getRequiredFieldNames set on this extension.  
-	 * Check the result and re-establish the connection with the new account.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @param parent (Optional) The parent node used to build the XML tree.
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Registration
-	 * @toc-sort 1/2
-	 */
-	public class RegisterExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "jabber:iq:register";
-		public static var ELEMENT:String = "query";
-	
-		private var myFields:Object;
-		private var myKeyNode:XMLNode;
-		private var myInstructionsNode:XMLNode;
-		private var myRemoveNode:XMLNode;
-	
-	    private static var staticDepends:Class = ExtensionClassRegistry;
-	
-		public function RegisterExtension( parent:XMLNode=null )
-		{
-			super(parent);
-			myFields = new Object();
-		}
-	
-		public function getNS():String
-		{
-			return RegisterExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return RegisterExtension.ELEMENT;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(RegisterExtension);
-	    }
-		
-		public function serialize( parentNode:XMLNode ):Boolean
-		{
-			if (!exists(getNode().parentNode)) {
-				parentNode.appendChild(getNode().cloneNode( true ));
-			}
-			return true;
-		}
-	
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode(node);
-	
-			var children:Array = getNode().childNodes;
-			for (var i:String in children) {
-	
-				switch (children[i].nodeName) {
-					case "key":
-						myKeyNode = children[i];
-						break;
-	
-					case "instructions":
-						myInstructionsNode = children[i];
-						break;
-	
-					case "remove":
-						myRemoveNode = children[i];
-						break;
-	
-					default:
-						myFields[children[i].nodeName] = children[i];
-						break;
-				}
-			}
-			return true;
-	
-		}
-	
-		public function get unregister():Boolean 
-		{
-			return exists(myRemoveNode);
-		}
-	
-		public function set unregister(val:Boolean):void
-		{
-			myRemoveNode = replaceTextNode(getNode(), myRemoveNode, "remove", "");
-		}
-	
-		public function getRequiredFieldNames():Array
-		{
-			var fields:Array = new Array();
-	
-			for (var i:String in myFields) {
-				fields.push(i);
-			}
-	
-			return fields;
-		}
-	
-	
-		public function get key():String 
-		{ 
-			if(myKeyNode && myKeyNode.firstChild)
-				return myKeyNode.firstChild.nodeValue;
-			
-			return null; 
-		}
-	
-		public function set key(val:String):void
-		{
-			myKeyNode = replaceTextNode(getNode(), myKeyNode, "key", val);
-		}
-	
-		public function get instructions():String 
-		{
-			if(myInstructionsNode && myInstructionsNode.firstChild)
-				return myInstructionsNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		public function set instructions(val:String):void
-		{
-			myInstructionsNode = replaceTextNode(getNode(), myInstructionsNode, "instructions", val);
-		}
-	
-		public function getField(name:String):String
-		{
-			var node:XMLNode = myFields[name];
-			if(node && node.firstChild)
-				return node.firstChild.nodeValue;
-				
-			return null;
-		}
-	
-		public function setField(name:String, val:String):void
-		{
-			myFields[name] = replaceTextNode(getNode(), myFields[name], name, val);
-		}
-	
-		public function get username():String { return getField("username"); }
-		public function set username(val:String):void { setField("username", val); }
-	
-		public function get nick():String { return getField("nick"); }
-		public function set nick(val:String):void { setField("nick", val); }
-	
-		public function get password():String { return getField("password"); }
-		public function set password(val:String):void { setField("password", val); }
-	
-		public function get first():String { return getField("first"); }
-		public function set first(val:String):void { setField("first", val); }
-	
-		public function get last():String { return getField("last"); }
-		public function set last(val:String):void { setField("last", val); }
-	
-		public function get email():String { return getField("email"); }
-		public function set email(val:String):void { setField("email", val); }
-	
-		public function get address():String { return getField("address"); }
-		public function set address(val:String):void { setField("address", val); }
-	
-		public function get city():String { return getField("city"); }
-		public function set city(val:String):void { setField("city", val); }
-	
-		public function get state():String { return getField("state"); }
-		public function set state(val:String):void { setField("state", val); }
-	
-		public function get zip():String { return getField("zip"); }
-		public function set zip(val:String):void { setField("zip", val); }
-	
-		public function get phone():String { return getField("phone"); }
-		public function set phone(val:String):void { setField("phone", val); }
-	
-		public function get url():String { return getField("url"); }
-		public function set url(val:String):void { setField("url", val); }
-	
-		public function get date():String { return getField("date"); }
-		public function set date(val:String):void { setField("date", val); }
-	
-		public function get misc():String { return getField("misc"); }
-		public function set misc(val:String):void { setField("misc", val); }
-	
-		public function get text():String { return getField("text"); }
-		public function set text(val:String):void { setField("text", val); }
-	}
-}
Index: org/jivesoftware/xiff/data/rpc/RPCExtension.as
===================================================================
--- org/jivesoftware/xiff/data/rpc/RPCExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/rpc/RPCExtension.as	(working copy)
@@ -1,188 +0,0 @@
-﻿package org.jivesoftware.xiff.data.rpc{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.rpc.XMLRPC;
-	import flash.xml.XMLNode;
-	
-	/**
-	 * Implements <a href="http://www.jabber.org/jeps/jep-0009.html">JEP-0009<a> for XML-RPC over XMPP.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/RPC
-	 * @toc-sort 1/2
-	 */
-	public class RPCExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "jabber:iq:rpc";
-		public static var ELEMENT:String = "query";
-	
-	    private static var staticDepends:Class = ExtensionClassRegistry;
-	
-		private var myResult:Array;
-		private var myFault:Object;
-	
-		/**
-		 * Place the remote call.  This method serializes the remote procedure call to XML.  
-		 * The call will be made on the remote machine when the stanza containing this extension is sent to the server.
-		 *
-		 * If this extension is being returned, then check the result property instead.
-		 *
-		 * @param methodName The name of the remote procedure to call
-		 * @param params A collection of parameters of any type
-		 * @see #result
-		 * @availability Flash Player 7
-		 */
-	
-		public function call(methodName:String, params:Array):void
-		{
-			XMLRPC.toXML(getNode(), methodName, params);
-		}
-	
-		/**
-		 * The result of this remote procedure call.  It can contain elements of any type.
-		 *
-		 * @return Array of demarshalled results from the remote procedure
-		 * @availability Flash Player 7
-		 */
-		public function get result():Array
-		{
-			return myResult;
-		}
-	
-		/**
-		 * Check this if property if you wish to determine the remote procedure call produced an error.
-		 * If the XMPP stanza never made it to the RPC service, then the error would be on the stanza object instead of this extension.
-		 *
-		 * @return True if the remote procedure call produced an error
-		 * @availability Flash Player 7
-		 */
-		public function get isFault():Boolean
-		{
-			return myFault.isFault;
-		}
-	
-		/**
-		 * The object containing the fault of the remote procedure call.  This object could have any properties, as fault results are only structurally defined.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get fault():Object
-		{
-			return myFault;
-		}
-	
-		/**
-		 * A common result from most RPC servers to describe a fault
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get faultCode():Number 
-		{
-			return myFault.faultCode;
-		}
-	
-		/**
-		 * A common result from most RPC servers to describe a fault
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get faultString():String
-		{
-			return myFault.faultString;
-		}
-	
-		/**
-		 * Interface method, returning the namespace for this extension
-		 *
-		 * @see org.jivesoftware.xiff.data.IExtension
-		 * @availability Flash Player 7
-		 */
-		public function getNS():String
-		{
-			return RPCExtension.NS;
-		}
-	
-		/**
-		 * Interface method, returning the namespace for this extension
-		 *
-		 * @see org.jivesoftware.xiff.data.IExtension
-		 * @availability Flash Player 7
-		 */
-		public function getElementName():String
-		{
-			return RPCExtension.ELEMENT;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(RPCExtension);
-	    }
-	
-		/**
-		 * Interface method, returning the namespace for this extension
-		 *
-		 * @see org.jivesoftware.xiff.data.ISerializable
-		 * @availability Flash Player 7
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-			if (!exists(getNode().parentNode)) {
-				parent.appendChild(getNode().cloneNode(true));
-			}
-			return true;
-		}
-	
-		/**
-		 * Interface method, returning the namespace for this extension
-		 *
-		 * @see org.jivesoftware.xiff.data.ISerializable
-		 * @availability Flash Player 7
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode(node);
-	
-			var res:Array = XMLRPC.fromXML(node);
-			if (res.isFault) {
-				myFault = res;
-			} else {
-				myResult = res[0];
-			}
-	
-			return true;
-		}
-	
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/rpc/XMLRPC.as
===================================================================
--- org/jivesoftware/xiff/data/rpc/XMLRPC.as	(revision 11020)
+++ org/jivesoftware/xiff/data/rpc/XMLRPC.as	(working copy)
@@ -1,216 +0,0 @@
-﻿package org.jivesoftware.xiff.data.rpc{
-	import flash.xml.XMLDocument;
-	import flash.xml.XMLNode;
-	
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	/**
-	 * Implements client side XML marshalling of methods and parameters into XMLRPC.
-	 * For more information on RPC over XMPP, see <a href="http://www.jabber.org/jeps/jep-0009.html">
-	 * http://www.jabber.org/jeps/jep-0009.html</a>.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/RPC
-	 * @toc-sort 1/2
-	 */
-	public class XMLRPC
-	{
-		private static var XMLFactory:XMLDocument = new XMLDocument();
-	
-		/**
-		 * Extract and marshall the XML-RPC response to Flash types.
-		 *
-		 * @param xml The XML containing the message response
-		 * @return Mixed object of either an array of results from the method call or a fault.
-		 * If the result is a fault, "result.isFault" will evaulate as true.
-		 * @availability Flash Player 7
-		 */
-		public static function fromXML(xml:XMLNode):Array
-		{
-			var result:Array;
-			var response:XMLNode = findNode("methodResponse", xml);
-	
-			if (response.firstChild.nodeName == "fault") {
-				// methodResponse/fault/value/struct
-				result = extractValue(response.firstChild.firstChild.firstChild);
-				result.isFault = true;
-			} else {
-				result = new Array();
-				var params:XMLNode = findNode("params", response);
-				if (params != null) {
-					for (var param_idx:int=0; param_idx < params.childNodes.length; param_idx++) {
-						var param:Array = params.childNodes[param_idx].firstChild;
-	
-						for (var type_idx:int=0; type_idx < param.childNodes.length; type_idx++) {
-							result.push(extractValue(param.childNodes[type_idx]));
-						}
-					}
-				}
-			}
-			return result;
-		}
-	
-		/**
-		 * The marshalling process, accepting a block of XML, a string description of the remote method, and an array of flash typed parameters.
-		 *
-		 * @return XMLNode containing the XML marshalled result
-		 */
-		public static function toXML(parent:XMLNode, method:String, params:Array):XMLNode
-		{
-			var mc:XMLNode = addNode(parent, "methodCall");
-			addText(addNode(mc, "methodName"), method);
-	
-			var p:XMLNode = addNode(mc, "params");
-			for (var i:int=0; i < params.length; i++) {
-				addParameter(p, params[i]);
-			}
-	
-			return mc;
-		}
-	
-		private static function extractValue(value:XMLNode):*
-		{
-			var result:* = null;
-	
-			switch (value.nodeName) { 
-				case "int":
-				case "i4":
-				case "double":
-					result = Number(value.firstChild.nodeValue);
-					break;
-	
-				case "boolean":
-					result = Number(value.firstChild.nodeValue) ? true : false;
-					break;
-	
-				case "array":
-					var value_array:Array = new Array();
-					var next_value:*;
-					for (var data_idx:int=0; data_idx < value.firstChild.childNodes.length; data_idx++) {
-						next_value = value.firstChild.childNodes[data_idx];
-						value_array.push(extractValue(next_value.firstChild));
-					}
-					result = value_array;
-					break;
-	
-				case "struct":
-					var value_object:Object = new Object();
-					for (var member_idx:int=0; member_idx < value.childNodes.length; member_idx++) {
-						var member:Array = value.childNodes[member_idx];
-						var m_name:String = member.childNodes[0].firstChild.nodeValue;
-						var m_value:* = extractValue(member.childNodes[1].firstChild);
-						value_object[m_name] = m_value;
-					}
-					result = value_object;
-					break;
-	
-				case "dateTime.iso8601":
-				case "Base64":
-				case "string":
-				default:
-					result = value.firstChild.nodeValue.toString();
-					break;
-	
-			}
-	
-			return result;
-		}
-	
-		private static function addParameter(node:XMLNode, param:*):XMLNode
-		{
-			return addValue(addNode(node, "param"), param);
-		}
-	
-		private static function addValue(node:XMLNode, value:*):XMLNode
-		{
-			var value_node:XMLNode = addNode(node, "value");
-	
-			if (typeof(value) == "string") {
-				addText(addNode(value_node, "string"), value);
-	
-			} else if (typeof(value) == "number") {
-				if (Math.floor(value) != value) {
-					addText(addNode(value_node, "double"), value);
-				} else {
-					addText(addNode(value_node, "int"), value.toString());
-				}
-	
-			} else if (typeof(value) == "boolean") {
-				addText(addNode(value_node, "boolean"), value == false ? "0" : "1");
-	
-			} else if (value is Array) {
-				var data:XMLNode = addNode(addNode(value_node, "array"), "data");
-				for (var i:int=0; i < value.length; i++) {
-					addValue(data, value[i]);
-				}
-			} else if (typeof(value) == "object") {
-				// Special case where type is simple custom type is defined
-				if (value.type != undefined && value.value != undefined) {
-					addText(addNode(value_node, value.type), value.value);
-				} else {
-					var struct:XMLNode = addNode(value_node, "struct");
-					for (var attr:String in value) {
-						var member:XMLNode = addNode(struct, "member");
-						addText(addNode(member, "name"), attr);
-						addValue(member, value[attr]);
-					}
-				}
-			}
-	
-			return node;
-		}
-	
-		private static function addNode(parent:XMLNode, name:String):XMLNode
-		{
-			var child:XMLNode = XMLRPC.XMLFactory.createElement(name);
-			parent.appendChild(child);
-			return parent.lastChild;
-		}
-	
-		private static function addText(parent:XMLNode, value:String):XMLNode
-		{
-			var child:XMLNode = XMLRPC.XMLFactory.createTextNode(value);
-			parent.appendChild(child);
-			return parent.lastChild;
-		}
-	
-		private static function findNode(name:String, xml:XMLNode):XMLNode
-		{
-			if (xml.nodeName == name) {
-				return xml;
-			} else {
-				var child:XMLNode = null;
-				for (var i:String in xml.childNodes) {
-					child = findNode(name, xml.childNodes[i]);
-					if (child != null) {
-						return child;
-					}
-				}
-			}
-			return null;
-		}
-	
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/search/SearchExtension.as
===================================================================
--- org/jivesoftware/xiff/data/search/SearchExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/search/SearchExtension.as	(working copy)
@@ -1,149 +0,0 @@
-package org.jivesoftware.xiff.data.search{
-	
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.forms.FormExtension;
-		
-	/**
-	 * Implements jabber:iq:search namespace.  Use this to perform user searches.
-	 * Send an empty IQ.GET_TYPE packet with this extension and the return will either be a conflict, or the fields you will need to fill out.  
-	 * Send a IQ.SET_TYPE packet to the server and with the fields that are listed in getRequiredFieldNames set on this extension.  
-	 * Check the result and re-establish the connection with the new account.
-	 *
-	 * @author Daniel Henninger
-	 * @since 2.0.0
-	 * @param parent (Optional) The parent node used to build the XML tree.
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Search
-	 * @toc-sort 1/2
-	 */
-	public class SearchExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "jabber:iq:search";
-		public static var ELEMENT:String = "query";
-	
-		private var myFields:Object;
-		private var myInstructionsNode:XMLNode;
-		private var myItems:Array = [];
-	
-	    private static var staticDepends:Class = ExtensionClassRegistry;
-	
-		public function SearchExtension( parent:XMLNode=null )
-		{
-			super(parent);
-			myFields = new Object();
-		}
-	
-		public function getNS():String
-		{
-			return SearchExtension.NS;
-		}
-	
-		public function getElementName():String
-		{
-			return SearchExtension.ELEMENT;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(SearchExtension);
-	    }
-		
-		public function serialize( parentNode:XMLNode ):Boolean
-		{
-			if (!exists(getNode().parentNode)) {
-				parentNode.appendChild(getNode().cloneNode( true ));
-			}
-			return true;
-		}
-	
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode(node);
-	
-			var children:Array = getNode().childNodes;
-			for (var i:String in children) {
-	
-				switch (children[i].nodeName) {
-					case "instructions":
-						myInstructionsNode = children[i];
-						break;
-						
-					case "x":
-						if (children[i].namespaceURI == FormExtension.NS) {
-							var dataFormExt:FormExtension = new FormExtension(getNode());
-							dataFormExt.deserialize(children[i]);
-							this.addExtension(dataFormExt);
-						}
-						break;
-						
-					case "item":
-						var item:SearchItem = new SearchItem(getNode());
-						item.deserialize(children[i]);
-						myItems.push(item);
-						break;
-	
-					default:
-						myFields[children[i].nodeName] = children[i];
-						break;
-				}
-			}
-			return true;
-	
-		}
-	
-		public function getRequiredFieldNames():Array
-		{
-			var fields:Array = new Array();
-	
-			for (var i:String in myFields) {
-				fields.push(i);
-			}
-	
-			return fields;
-		}
-		
-		public function getAllItems():Array
-		{
-			return myItems;
-		}
-	
-		public function get instructions():String 
-		{
-			if(myInstructionsNode && myInstructionsNode.firstChild)
-				return myInstructionsNode.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		public function set instructions(val:String):void
-		{
-			myInstructionsNode = replaceTextNode(getNode(), myInstructionsNode, "instructions", val);
-		}
-	
-		public function getField(name:String):String
-		{
-			var node:XMLNode = myFields[name];
-			if(node && node.firstChild)
-				return node.firstChild.nodeValue;
-			
-			return null;
-		}
-	
-		public function setField(name:String, val:String):void
-		{
-			myFields[name] = replaceTextNode(getNode(), myFields[name], name, val);
-		}
-				
-	}
-}
Index: org/jivesoftware/xiff/data/search/SearchItem.as
===================================================================
--- org/jivesoftware/xiff/data/search/SearchItem.as	(revision 11020)
+++ org/jivesoftware/xiff/data/search/SearchItem.as	(working copy)
@@ -1,96 +0,0 @@
-package org.jivesoftware.xiff.data.search{
-	
-	import org.jivesoftware.xiff.data.XMLStanza;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import flash.xml.XMLNode;
-	
-	/**
-	 * This class is used by the SearchExtension for internal representation of
-	 * information pertaining to items matching the search query.
-	 *
-	 * @author Daniel Henninger
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Search
-	 * @toc-sort 1/2
-	 */
-	public class SearchItem extends XMLStanza implements ISerializable
-	{
-		public static var ELEMENT:String = "item";
-	
-		private var myFields:Object;
-	
-		public function SearchItem(parent:XMLNode=null)
-		{
-			super();
-			myFields = new Object();
-	
-			getNode().nodeName = ELEMENT;
-	
-			if (exists(parent)) {
-				parent.appendChild(getNode());
-			}
-		}
-	
-		public function serialize(parent:XMLNode):Boolean
-		{
-			if (parent != getNode().parentNode) {
-				parent.appendChild(getNode().cloneNode(true));
-			}
-	
-			return true;
-		}
-	
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-	
-			var children:Array = node.childNodes;
-			for( var i:String in children ) {
-				myFields[children[i].nodeName.toLowerCase()] = children[i];
-			}
-			return true;
-		}
-
-		public function getField(name:String):String
-		{
-			if (myFields[name] != null && myFields[name].firstChild != null) {
-				return myFields[name].firstChild.nodeValue;
-			}
-			return null;
-		}
-	
-		public function setField(name:String, val:String):void
-		{
-			myFields[name] = replaceTextNode(getNode(), myFields[name], name, val);
-		}
-	
-		public function get jid():String
-		{
-			return getNode().attributes.jid;
-		}
-	
-		public function set jid(val:String):void
-		{
-			getNode().attributes.jid = val;
-		}
-		
-		public function get username():String { return getField("jid"); }
-		public function set username(val:String):void { setField("jid", val); }
-	
-		public function get nick():String { return getField("nick"); }
-		public function set nick(val:String):void { setField("nick", val); }
-	
-		public function get first():String { return getField("first"); }
-		public function set first(val:String):void { setField("first", val); }
-	
-		public function get last():String { return getField("last"); }
-		public function set last(val:String):void { setField("last", val); }
-	
-		public function get email():String { return getField("email"); }
-		public function set email(val:String):void { setField("email", val); }
-		
-		public function get name():String { return getField("name"); }
-		public function set name(val:String):void { setField("name", val); }
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/session/SessionExtension.as
===================================================================
--- org/jivesoftware/xiff/data/session/SessionExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/session/SessionExtension.as	(working copy)
@@ -1,61 +0,0 @@
-package org.jivesoftware.xiff.data.session
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-
-	public class SessionExtension extends Extension implements IExtension, ISerializable
-	{
-		public static var NS:String = "urn:ietf:params:xml:ns:xmpp-session";
-		public static var ELEMENT_NAME:String = "session";
-		private var jid:String;
-		
-		public function getNS():String
-		{
-			return SessionExtension.NS;
-		}
-		
-		public function getElementName():String
-		{
-			return SessionExtension.ELEMENT_NAME;
-		}
-		
-		public function getJID():String
-		{
-			return jid;
-		}
-		
-		public function serialize(parent:XMLNode):Boolean
-		{
-			if (!exists(getNode().parentNode)) {
-				var child:XMLNode = getNode().cloneNode(true);
-				parent.appendChild(child);
-			}
-			return true;
-		}
-		
-		public function SessionExtension( parent:XMLNode = null)
-		{
-			super(parent);
-		}
-		
-		/**
-	     * Registers this extension with the extension registry.  
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(SessionExtension);
-	    }
-		
-		public function deserialize(node:XMLNode):Boolean
-		{
-			setNode(node);
-			return true;
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/sharedgroups/SharedGroupsExtension.as
===================================================================
--- org/jivesoftware/xiff/data/sharedgroups/SharedGroupsExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/sharedgroups/SharedGroupsExtension.as	(working copy)
@@ -1,32 +0,0 @@
-package org.jivesoftware.xiff.data.sharedgroups
-{
-	import flash.xml.XMLNode;
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.IExtension;
-
-	public class SharedGroupsExtension implements IExtension, ISerializable
-	{
-		public function getNS():String
-		{
-			return "http://www.jivesoftware.org/protocol/sharedgroup";
-		}
-		
-		public function getElementName():String
-		{
-			return "sharedgroup";
-		}
-
-		public function serialize(parentNode:XMLNode):Boolean
-		{
-			var xmlNode:XMLNode = new XMLNode(1, getElementName() + " xmlns='" + getNS() + "'");
-			parentNode.appendChild(xmlNode);			
-			return true;
-		}
-		
-		public function deserialize(node:XMLNode):Boolean
-		{
-			return true;
-		}
-		
-	}
-}
Index: org/jivesoftware/xiff/data/vcard/VCardExtension.as
===================================================================
--- org/jivesoftware/xiff/data/vcard/VCardExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/vcard/VCardExtension.as	(working copy)
@@ -1,42 +0,0 @@
-package org.jivesoftware.xiff.data.vcard
-{
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	public class VCardExtension extends Extension implements IExtension, ISerializable {
-		
-		public function getNS():String{
-			return "vcard-temp";
-		}
-		
-		public function getElementName():String {
-			return "vCard";
-		}
-		
-		/**
-		 * Called when the library need to retrieve the state of the instance.  If the instance manages its own state, then the state should be copied into the XMLNode passed.  If the instance also implements INodeProxy, then the parent should be verified against the parent XMLNode passed to determine if the serialization is in the same namespace.
-		 *
-		 * @param parentNode (XMLNode) The container of the XML.
-		 * @returns On success, return true.
-		 */
-		public function serialize( parentNode:XMLNode ):Boolean {
-			parentNode.appendChild(getNode());			
-			return true;
-		}
-	
-		/**
-		 * Called when data is retrieved from the XMLSocket, use this method to extract any state into internal state.
-		 * @param node (XMLNode) The node that should be used as the data container.
-		 * @returns On success, return true.
-		 */
-		public function deserialize( node:XMLNode ):Boolean {
-			return true;
-		}
-		
-		
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/whiteboard/Fill.as
===================================================================
--- org/jivesoftware/xiff/data/whiteboard/Fill.as	(revision 11020)
+++ org/jivesoftware/xiff/data/whiteboard/Fill.as	(working copy)
@@ -1,106 +0,0 @@
-package org.jivesoftware.xiff.data.whiteboard{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import flash.xml.XMLNode;
-	
-	/**
-	 * A helper class that abstracts the serialization of fills and
-	 * provides an interface to access the properties providing defaults
-	 * if no properties were defined in the XML.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Whiteboard
-	 * @toc-sort 1/2
-	*/
-	public class Fill implements ISerializable
-	{
-	    private var myColor:Number;
-	    private var myOpacity:Number;
-	
-	    public function Fill() { }
-	
-		/**
-		 * Serializes the Fill into the parent node.  Because the fill
-	     * serializes into the attributes of the XML node, it will directly modify
-	     * the parent node passed.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-	        if (myColor) { parent.attributes['fill'] = "#" + myColor.toString(16); }
-	        if (myOpacity) { parent.attributes['fill-opacity'] = myOpacity.toString(); }
-	
-	        return true;
-	    }
-	
-		/**
-		 * Extracts the known fill attributes from the node
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-	        if (node.attributes['fill']) {
-	            myColor = new Number('0x' + node.attributes['fill'].slice(1));
-	        }
-	        if (node.attributes['fill-opacity']) {
-	            myOpacity = new Number(node.attributes['fill-opacity']);
-	        }
-	
-	        return true;
-	    }
-	
-	    /**
-	     * The value of the RGB color.  This is the same color format used by
-	     * MovieClip.lineStyle
-	     *
-		 * @availability Flash Player 7
-	     */
-		public function get color():Number 
-		{
-			return myColor ? myColor : 0; 
-		}
-		public function set color(c:Number):void
-		{
-			//myColor = Number(c.valueOf());
-			myColor = c;
-		}
-	
-	    /**
-	     * The opacity of the fill, in percent. 100 is solid, 0 is transparent.
-	     * This property can be used as the alpha parameter of MovieClip.lineStyle
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get opacity():Number { return myOpacity ? myOpacity : 100; }
-	    public function set opacity(v:Number):void { myOpacity = v; }
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/whiteboard/Path.as
===================================================================
--- org/jivesoftware/xiff/data/whiteboard/Path.as	(revision 11020)
+++ org/jivesoftware/xiff/data/whiteboard/Path.as	(working copy)
@@ -1,309 +0,0 @@
-package org.jivesoftware.xiff.data.whiteboard{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	
-	import org.jivesoftware.xiff.data.whiteboard.WhiteboardExtension;
-	import org.jivesoftware.xiff.data.whiteboard.Stroke;
-	import org.jivesoftware.xiff.data.whiteboard.Fill;
-	import flash.xml.XMLNode;
-	 
-	/**
-	 * A message extension for whitboard exchange. This class is the base class
-	 * for other extension classes such as Path
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Whiteboard
-	 * @toc-sort 1/2
-	 */
-	public class Path implements ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var ELEMENT:String = "path";
-	
-	    private var mySegments:Array;
-	    private var myStroke:Stroke;
-	    private var myFill:Fill;
-	
-	    private var _lastLocation:Object;
-		
-		public function Path( parent:XMLNode=null )
-		{
-			//super( parent );
-	        mySegments = new Array();
-			myStroke = new Stroke();
-			myFill = new Fill();
-		}
-	
-		/**
-		 * Serializes the Path data to XML for sending.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-	        var node:XMLNode = XMLStanza.XMLFactory.createElement(Path.ELEMENT);
-			node.attributes['p'] = serializeSegments();
-	        stroke.serialize(node);
-	        fill.serialize(node);
-	        parent.appendChild(node);
-	
-			return true;
-		}
-		
-		/**
-		 * Deserializes the Path data.
-		 *
-		 * @availability Flash Player 7
-		 * @param node The XML node associated this data
-		 * @return true if deserialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			var p:String = node.attributes['p'];
-	
-			// Divide and conquer, using commands as delims, joining
-			// the results in prefix order
-	        mySegments = new Array();
-	        _lastLocation = new Object;
-			loadNextCommand(p);
-	
-	        myStroke = new Stroke();
-	        myStroke.deserialize(node);
-	
-	        myFill = new Fill();
-	        myFill.deserialize(node);
-	
-			return true;
-		}
-	
-		
-		/**
-		 * Creates the compact form of the segments
-		 * in the fomrmat defined by SVG
-		 * Example: M100 200L14 -15 L 125 100L150 200 300 400M10 20L30 40 50 60 z
-	     *
-		 * @returns String containging the compact version
-		 * @availability Flash Player 7
-		 */
-		public function serializeSegments():String
-		{
-			var lastSeg:* = null;
-			var p:String = '';
-			var segs:Array = segments;
-	
-			for (var i:int=0; i < segs.length; i++) {
-				var seg:* = segs[i];
-	
-				// Serialize the compact form (don't repeat command ids, remove extra spaces)
-				if (lastSeg.to.x != seg.from.x && lastSeg.to.y != seg.from.y) {
-					p += 'M' + seg.from.x + ' ' + seg.from.y + 'l';
-				} else {
-					p += ' ';
-				}
-	
-				p += (seg.to.x - seg.from.x) + ' ' + (seg.to.y - seg.from.y);
-	
-				lastSeg = seg;
-			}
-			return p;
-		}
-	
-	    /**
-	     * Adds a start point and end point to this path.  The points will be rounded
-	     * to the nearest integer to save serialization space.  10.0000001 takes 
-	     * 4 times as much spaces as 10
-	     *
-	     * @param seg An object containing the properties "from" and "to" which
-	     * are objects with the properties "x" and "y".  An example would 
-	     * be { from: { x: 100, y: 200 }, to: { x: 200, y: 300 } }
-	     * @return the segment parameter with the rounded values
-	     * @see #addPoints
-		 * @availability Flash Player 7
-	     */
-		public function addSegment(seg:Object):Object
-		{
-			seg.from.x = Math.round(seg.from.x);
-			seg.from.y = Math.round(seg.from.y);
-			seg.to.x = Math.round(seg.to.x);
-			seg.to.y = Math.round(seg.to.y);
-	
-			if (mySegments.addItem) {
-				mySegments.addItem(seg);
-			} else {
-				mySegments.push(seg);
-			}
-	        return seg;
-		}
-	
-	    /**
-	     * Another interface to add segments to this extension.  Instead of passing
-	     * an object, you can pass parameters that will be converted into a segment
-	     * and passed to addSegment
-	     *
-	     * @param from_x the start x coordinate
-	     * @param from_y the start y coordinate
-	     * @param to_x the destination x coordinate
-	     * @param to_y the destination y coordinate
-	     * @return the segment object created from the parameters with the rounded values
-	     * from being modified in addSegment
-		 * @availability Flash Player 7
-	     */
-		public function addPoints(from_x:Number, from_y:Number, to_x:Number, to_y:Number):Object
-		{
-	        return addSegment({from: {x: from_x, y: from_y}, to: {x: to_x, y: to_y}});
-		}
-	
-	    /**
-	     * The read-only list of start and end points encoded as an array of objects with the 
-	     * format { from: { x: ###, y: ### }, to: { x: ###, y: ### } }
-	     *
-	     * You should not modify this list.  Segments should be added with addSegment
-	     *
-	     * @see #addSegment
-		 * @availability Flash Player 7
-	     */
-	    public function get segments():Array { return mySegments; }
-	
-	    /**
-	     * The Stroke object that contains the properties describing the stroke of this
-	     * path
-	     *
-	     * @see org.jivesoftware.xiff.data.whiteboard.Stroke
-		 * @availability Flash Player 7
-	     */
-	    public function get stroke():Stroke { return myStroke; }
-	
-	    /**
-	     * The Fill object that contains the properties describing the fill of this
-	     * path
-	     *
-	     * @see org.jivesoftware.xiff.data.whiteboard.Fill
-		 * @availability Flash Player 7
-	     */
-	    public function get fill():Fill { return myFill; }
-	
-	    // PRIVATE METHODS
-	
-		private static function indexOfNextCommand(str:String):Number
-		{
-			for (var i:int=0; i < str.length; i++) {
-				if (str.charAt(i) >= 'A' && str.charAt(i) <= 'Z' ||
-					str.charAt(i) >= 'a' && str.charAt(i) <= 'z')
-				{
-					return i;
-				}
-			}
-			return -1;
-		}
-	
-		private function loadNextCommand(str:String):void
-		{
-			// Example
-			// M100 200L14 -15 L 125 100L150 200 300 400M10 20L30 40 50 60 z
-			// Command ID or space acts as delimeter
-			// Parameter tuples inherit last command
-	
-			// Find the next command to split on, so we preserve order
-			var idx:Number = indexOfNextCommand(str);
-			if (idx >= 0) {
-				var cmd:String = str.charAt(idx);
-				var commands:Array = str.split(cmd);
-				for (var i:int=0; i < commands.length; i++) {
-					if (commands[i].length > 0) {
-						loadCommand(cmd, commands[i]);
-					}
-				}
-			}
-		}
-	
-		private function loadCommand(cmd:String, str:String):void
-		{
-			// We have a command, with possible other commands embedded
-			// split out the other commands, and process our parameters
-	
-			var idx:Number = indexOfNextCommand(str);
-			var params:Array;
-	
-			if (idx > 0) {
-				params = str.slice(0, idx).split(' ');
-			} else {
-				params = str.split(' ');
-			}
-	
-			// Handle any parameterless commands here like closepath
-	
-	
-			// We have our parameters, now pull them out 
-			// depending on the command
-	
-			while (params.length > 0) {
-				if (params[0].length == 0) {
-					params.shift();
-				} else {
-					var current:Object;
-	
-					switch (cmd) {
-						case "M":
-							_lastLocation = {
-								x: Number(params.shift()), 
-								y: Number(params.shift())
-							};
-							break;
-	
-						case "L":
-							current = {
-								x: Number(params.shift()), 
-								y: Number(params.shift())
-							};
-							addSegment({from: _lastLocation, to: current });
-							_lastLocation = current;
-							break;
-	
-						case "l":
-							current = {
-								x: _lastLocation.x + Number(params.shift()), 
-								y: _lastLocation.y + Number(params.shift())
-							};
-							addSegment({from: _lastLocation, to: current});
-							_lastLocation = current;
-							break;
-							
-						default:
-							trace("Unknown parameter for command: " + cmd);
-							params.shift();
-							break;
-					}
-				}
-			}
-	
-			loadNextCommand(str.slice(idx));
-		}
-	
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/whiteboard/Stroke.as
===================================================================
--- org/jivesoftware/xiff/data/whiteboard/Stroke.as	(revision 11020)
+++ org/jivesoftware/xiff/data/whiteboard/Stroke.as	(working copy)
@@ -1,112 +0,0 @@
-package org.jivesoftware.xiff.data.whiteboard{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.ISerializable;
-	import flash.xml.XMLNode;
-	
-	/**
-	 * A helper class that abstracts the serialization of strokes and
-	 * provides an interface to access the properties
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Whiteboard
-	 * @toc-sort 1/2
-	*/
-	public class Stroke implements ISerializable
-	{
-		private var myColor:Number;
-		private var myWidth:Number;
-		private var myOpacity:Number;
-	
-		public function Stroke() { }
-	
-		/**
-		 * Serializes the Stroke into the parent node.  Because the stroke
-	     * serializes into the attributes of the XML node, it will directly modify
-	     * the parent node passed.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-	        if (myColor) { parent.attributes['stroke'] = "#" + myColor.toString(16); }
-	        if (myWidth) { parent.attributes['stroke-width'] = myWidth.toString(); }
-	        if (myOpacity) { parent.attributes['stroke-opacity'] = myOpacity.toString(); }
-	
-	        return true;
-	    }
-	
-		/**
-		 * Extracts the known stroke attributes from the node
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-	        if (node.attributes['stroke']) {
-	            myColor = new Number('0x' + node.attributes['stroke'].slice(1));
-	        }
-	        if (node.attributes['stroke-width']) {
-	            myWidth = new Number(node.attributes['stroke-width']);
-	        }
-	        if (node.attributes['stroke-opacity']) {
-	            myOpacity = new Number(node.attributes['stroke-opacity']);
-	        }
-	
-	        return true;
-	    }
-	
-	    /**
-	     * The value of the RGB color.  This is the same color format used by
-	     * MovieClip.lineStyle
-	     *
-		 * @availability Flash Player 7
-	     */
-		public function get color():Number { return myColor ? myColor : 0; }
-		public function set color(c:Number):void { myColor =c }
-	
-	    /**
-	     * The width of the stroke in pixels.  This is in a format used by
-	     * MovieClip.lineStyle
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get width():Number { return myWidth ? myWidth : 1; }
-	    public function set width(v:Number):void { myWidth = v; }
-	
-	    /**
-	     * The opacity of the stroke, in percent. 100 is solid, 0 is transparent.
-	     * This property can be used as the alpha parameter of MovieClip.lineStyle
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get opacity():Number { return myOpacity ? myOpacity : 100; }
-	    public function set opacity(v:Number):void { myOpacity = v; }
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/whiteboard/WhiteboardExtension.as
===================================================================
--- org/jivesoftware/xiff/data/whiteboard/WhiteboardExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/whiteboard/WhiteboardExtension.as	(working copy)
@@ -1,151 +0,0 @@
-package org.jivesoftware.xiff.data.whiteboard{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 * Media Insites, Inc.
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	
-	import org.jivesoftware.xiff.data.whiteboard.Path;
-	import flash.xml.XMLNode;
-	
-	 
-	/**
-	 * A message extension for whitboard exchange. This class is the base class
-	 * for other extension classes such as Path
-	 *
-	 * All child whiteboard objects are contained and serialized by this class
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Extensions/Whiteboard
-	 * @toc-sort 1/2
-	 */
-	public class WhiteboardExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "xiff:wb";
-		public static var ELEMENT:String = "x";
-	
-	    private static var staticDepends:Class = ExtensionClassRegistry;
-	
-	    private var myPaths:Array;
-		
-		public function WhiteboardExtension( parent:XMLNode=null )
-		{
-			super( parent );
-	        myPaths = new Array();
-		}
-	
-		/**
-		 * Gets the namespace associated with this extension.
-		 * The namespace for the WhiteboardExtension is "xiff:wb".
-		 *
-		 * @return The namespace
-		 * @availability Flash Player 7
-		 */
-		public function getNS():String
-		{
-			return WhiteboardExtension.NS;
-		}
-	
-		/**
-		 * Gets the element name associated with this extension.
-		 * The element for this extension is "x".
-		 *
-		 * @return The element name
-		 * @availability Flash Player 7
-		 */
-		public function getElementName():String
-		{
-			return WhiteboardExtension.ELEMENT;
-		}
-		
-		/**
-		 * Serializes the WhiteboardExtension data to XML for sending.
-		 *
-		 * @availability Flash Player 7
-		 * @param parent The parent node that this extension should be serialized into
-		 * @return An indicator as to whether serialization was successful
-		 */
-		public function serialize( parent:XMLNode ):Boolean
-		{
-	        getNode().removeNode();
-	        var ext_node:XMLNode = XMLFactory.createElement(getElementName());
-	        ext_node.attributes.xmlns = getNS();
-	
-	        for (var i:int=0; i < myPaths.length; i++) {
-	            myPaths[i].serialize(ext_node);
-	        }
-	
-	        parent.appendChild(ext_node);
-	
-			return true;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(WhiteboardExtension);
-	    }
-		
-		/**
-		 * Deserializes the WhiteboardExtension data.
-		 *
-		 * @availability Flash Player 7
-		 * @param node The XML node associated this data
-		 * @return An indicator as to whether deserialization was successful
-		 */
-		public function deserialize( node:XMLNode ):Boolean
-		{
-			setNode( node );
-	        myPaths = new Array();
-			
-	        for (var i:int=0; i < node.childNodes.length; i++) {
-	            var child:XMLNode = node.childNodes[i];
-	            switch (child.nodeName) {
-	                case "path":
-	                    var path:Path = new Path();
-	                    path.deserialize(child);
-	                    myPaths.push(path);
-	                    break;
-	            }
-	        }
-			return true;
-		}
-	
-	    /**
-	     * The paths available in this whiteboard message
-	     *
-		 * @availability Flash Player 7
-	     */
-	    public function get paths():Array { return myPaths; }
-	
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/xhtml/XHTMLExtension.as
===================================================================
--- org/jivesoftware/xiff/data/xhtml/XHTMLExtension.as	(revision 11020)
+++ org/jivesoftware/xiff/data/xhtml/XHTMLExtension.as	(working copy)
@@ -1,125 +0,0 @@
-﻿package org.jivesoftware.xiff.data.xhtml{
-	
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import flash.xml.XMLDocument;
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.data.Extension;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-	
-	/**
-	 * This class provides an extension for XHTML body text in messages.
-	 *
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @param parent The parent node for this extension
-	 * @toc-path Extensions/HTML
-	 * @toc-sort 1/2
-	 */
-	public class XHTMLExtension extends Extension implements IExtension, ISerializable
-	{
-		// Static class variables to be overridden in subclasses;
-		public static var NS:String = "http://www.w3.org/1999/xhtml";
-		public static var ELEMENT:String = "html";
-	
-	    private static var staticDepends:Class = ExtensionClassRegistry;
-	
-		public function XHTMLExtension(parent:XMLNode = null)
-		{
-			super(parent);
-		}
-		
-		public function serialize( parent:XMLNode ):Boolean
-        {
-             return true;
-        }
-          
-        public function deserialize( node:XMLNode ):Boolean
-        {   
-        	return true;
-        }
-	
-		/**
-		 * Gets the namespace associated with this extension.
-		 * The namespace for the XHTMLExtension is "http://www.w3.org/1999/xhtml".
-		 *
-		 * @return The namespace
-		 * @availability Flash Player 7
-		 */
-		public function getNS():String
-		{
-			return XHTMLExtension.NS;
-		}
-	
-		/**
-		 * Gets the element name associated with this extension.
-		 * The element for this extension is "html".
-		 *
-		 * @return The element name
-		 * @availability Flash Player 7
-		 */
-		public function getElementName():String
-		{
-			return XHTMLExtension.ELEMENT;
-		}
-	
-	    /**
-	     * Performs the registration of this extension into the extension registry.  
-	     * 
-		 * @availability Flash Player 7
-	     */
-	    public static function enable():void
-	    {
-	        ExtensionClassRegistry.register(XHTMLExtension);
-	    }
-	
-		/**
-		 * The XHTML body text. Valid XHTML is REQUIRED. Because XMPP operates using
-		 * valid XML, standard HTML, which is not necessarily XML-parser compliant, will
-		 * not work.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get body():String
-		{
-			var html:Array = [];
-			for each(var child:XMLNode in getNode().childNodes) {
-				html.unshift(child.toString());
-			}
-			return html.join();
-		}
-	
-		public function set body(theBody:String):void
-		{
-			for each(var child:XMLNode in getNode().childNodes) {
-				child.removeNode();
-			}
-			getNode().appendChild(new XMLDocument(theBody));
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/XMLStanza.as
===================================================================
--- org/jivesoftware/xiff/data/XMLStanza.as	(revision 11020)
+++ org/jivesoftware/xiff/data/XMLStanza.as	(working copy)
@@ -1,173 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	
-	import org.jivesoftware.xiff.data.INodeProxy;
-	import flash.xml.XMLNode;
-	import flash.xml.XMLDocument;
-	
-	/**
-	 * This is a base class for all classes that encapsulate XML stanza data. It provides
-	 * a set of methods that faciliate easy manipulation of XML data.
-	 * 
-	 * @author Sean Treadway
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Data/Base Classes
-	 * @toc-sort 1/2
-	 */
-	public class XMLStanza extends ExtensionContainer implements INodeProxy, IExtendable
-	{
-	    // Global factory for all XMLNode generation
-		public static var XMLFactory:XMLDocument = new XMLDocument();
-		private var myXML:XMLNode;
-	
-		public function XMLStanza()
-		{
-			super();
-			myXML = XMLStanza.XMLFactory.createElement('');
-		}
-	
-		/**
-		 * A helper method to determine if a value is both not null
-		 * and not undefined.
-		 *
-		 * @availability Flash Player 7
-		 * @param val The value to check for existance
-		 * @return Whether the value checked is both not null and not undefined
-		 */
-		//private static function exists( val:* ):Boolean
-		public static function exists( val:* ):Boolean
-		{
-			if( val != null && val !== undefined )
-				return true;
-			
-			return false;
-		}
-	
-		/**
-		 * Adds a simple text node to the parent node specified.
-		 *
-		 * @param parent The parent node that the newly created node should be appended onto
-		 * @param elementName The element name of the new node
-		 * @param value The value of the new node
-		 * @return A reference to the new node
-		 * @availability Flash Player 7
-		 */
-		public function addTextNode( parent:XMLNode, elementName:String, value:String):XMLNode
-		{
-			var newNode:XMLNode = XMLStanza.XMLFactory.createElement(elementName);
-			newNode.appendChild(XMLFactory.createTextNode(value));
-			parent.appendChild(newNode);
-			return newNode;
-		}
-	
-		/**
-		 * Ensures that a node with a specific element name exists in the stanza. If it doesn't, then
-		 * the node is created and returned.
-		 *
-		 * @param node The node to ensure
-		 * @param elementName The element name to check for existance
-		 * @return The node if it already exists, else a newly created node with the element name provided
-		 * @availability Flash Player 7
-		 */
-		public function ensureNode( node:XMLNode, elementName:String ):XMLNode
-		{
-			if (!exists(node)) {
-				node = XMLStanza.XMLFactory.createElement(elementName);
-	            getNode().appendChild(node);
-			}
-			return node;
-		}
-	
-		/**
-		 * Replaces one node in the stanza with another simple text node.
-		 *
-		 * @param parent The parent node to start at when searching for replacement
-		 * @param original The node to replace
-		 * @param elementName The new node's element name
-		 * @param value The new node's value
-		 * @return The newly created node
-		 * @availability Flash Player 7
-		 */
-		public function replaceTextNode( parent:XMLNode, original:XMLNode, elementName:String, value:String ):XMLNode
-		{
-			var newNode:XMLNode;
-	
-			// XXX Investigate on whether a remove/create is as efficient
-			// as replacing the contents of the first text element nodeValue
-			
-			// Through the magic of AS, this will not fail if the 
-			// original node is undefined
-			
-			//if (original == null) original = XMLStanza.XMLFactory.createElement('');
-			if (original != null){
-				original.removeNode();
-			}
-	
-			if (exists(value)) {
-				newNode = XMLStanza.XMLFactory.createElement(elementName);
-				if (value.length > 0) {
-					newNode.appendChild(XMLStanza.XMLFactory.createTextNode(value));
-				}
-				parent.appendChild(newNode);
-			}
-	
-			return newNode;
-		}
-		
-		/**
-		 * Returns a reference to the stanza in XML form.
-		 *
-		 * @return The stanza as XML
-		 * @availability Flash Player 7
-		 */
-		public function getNode():XMLNode
-		{
-			return myXML;
-		}
-	
-		/**
-		 * Sets the XML node that should be used for this stanza's internal XML representation.
-		 *
-		 * @return Whether the node set was successful
-		 * @availability Flash Player 7
-		 */
-		public function setNode( node:XMLNode ):Boolean
-		{
-			//var oldParent:XMLNode = (myXML.parentNode == null)?(XMLStanza.XMLFactory.createElement('')):(myXML.parentNode);
-			var oldParent:XMLNode = myXML.parentNode;
-			
-			// Transfer ownership from the node's parent to our old parent
-	
-			myXML.removeNode();
-			myXML = node;
-	
-			if (exists(myXML) && oldParent != null) {
-				oldParent.appendChild(myXML);
-			}
-	
-			return true;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/data/XMPPStanza.as
===================================================================
--- org/jivesoftware/xiff/data/XMPPStanza.as	(revision 11020)
+++ org/jivesoftware/xiff/data/XMPPStanza.as	(working copy)
@@ -1,369 +0,0 @@
-﻿package org.jivesoftware.xiff.data{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	 
-	import flash.xml.XMLNode;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.data.id.IIDGenerator;
-	import org.jivesoftware.xiff.data.id.IncrementalGenerator;
-	
-	/**
-	 * The base class for all XMPP stanza data classes.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @availability Flash Player 7
-	 * @toc-path Data/Base Classes
-	 * @toc-sort 1/2
-	 */
-	public dynamic class XMPPStanza extends XMLStanza implements ISerializable, IExtendable
-	{
-		public static var CLIENT_NS:String = "jabber:client";
-
-	
-		private var myErrorNode:XMLNode;
-		private var myErrorConditionNode:XMLNode;
-	
-		//private static var theIDGenerator:IIDGenerator = new IncrementalGenerator();
-		private static var staticDependencies:* = [ IncrementalGenerator, ExtensionContainer ];
-		private static var isStaticConstructed:* = XMPPStanzaStaticConstructor();
-		
-		public function XMPPStanza( recipient:EscapedJID, sender:EscapedJID, theType:String, theID:String, nName:String )
-		{
-			super();
-			
-			getNode().nodeName = nName;
-			to = recipient;
-			from = sender;
-			type = theType;
-			id = theID;
-		}
-	
-		private static function XMPPStanzaStaticConstructor():void
-		{
-			//ExtensionContainer.decorate(XMPPStanza.prototype);
-		}
-	
-		/**
-		 * (Static method) Generates a unique ID for the stanza. ID generation is handled using
-		 * a variety of mechanisms, but the default for the library uses the IncrementalGenerator.
-		 *
-		 * @see org.jivesoftware.xiff.data.id.IncrementalGenerator
-		 * @availability Flash Player 7
-		 * @param prefix The prefix for the ID to be generated
-		 * @return The generated ID
-		 */
-		public static function generateID( prefix:String ):String
-		{
-			var id:String = IncrementalGenerator.getInstance().getID( prefix );
-			return id;
-		}
-	
-		/**
-	 	 * (Static method) Sets the ID generator for this stanza type. ID generators must implement
-		 * the IIDGenerator interface. The XIFF library comes with a few default
-		 * ID generators that have already been implemented (see org.jivesoftware.xiff.data.id.*).
-		 * 
-		 * Setting the ID generator by stanza type is useful if you'd like to use
-		 * different ID generation schemes for each type. For instance, messages could
-		 * use the incremental ID generation scheme provided by the IncrementalGenerator class, while
-		 * IQs could use the shared object ID generation scheme provided by the SharedObjectGenerator class.
-		 *
-		 * @availability Flash Player 7
-		 * @param generator The ID generator class
-		 * @example The following sets the ID generator for the Message stanza type to the IncrementalGenerator
-		 * class found in org.jivesoftware.xiff.data.id.IncrementalGenerator:
-		 * <pre>Message.setIDGenerator( org.jivesoftware.xiff.data.id.IncrementalGenerator );</pre>
-		 */
-		public static function setIDGenerator( generator:IIDGenerator ):void
-		{
-			//XMPPStanza.theIDGenerator = generator;
-		}
-	
-		/**
-		 * Prepares the XML version of the stanza for transmission to the server.
-		 *
-		 * @param parentNode (Optional) The parent node that the stanza should be appended to during serialization
-		 * @return An indication as to whether serialization was successful
-		 * @availability Flash Player 7
-		 */
-		public function serialize( parentNode:XMLNode ):Boolean
-		{		
-			var node:XMLNode = getNode();
-			var exts:Array = getAllExtensions();
-	
-			for each(var ext:ISerializable in exts) {
-				ext.serialize(node);
-			}
-	
-			if (!exists(node.parentNode)) {
-				node = node.cloneNode(true)
-				parentNode.appendChild(node);
-			}
-	
-			return true;
-		}
-		
-		public function deserialize( xmlNode:XMLNode ):Boolean
-		{
-			setNode(xmlNode);
-			
-			var children:Array = xmlNode.childNodes;
-			for( var i:String in children )
-			{
-				
-				var nName:String = children[i].nodeName;
-				var nNamespace:String = children[i].attributes.xmlns;
-				
-				nNamespace = exists( nNamespace ) ? nNamespace : CLIENT_NS;
-				
-				if( nName == "error" ) {
-					myErrorNode = children[i];
-					// If there is an error condition node, then we need that saved as well
-					if( exists( myErrorNode.firstChild.nodeName ) ) {
-						myErrorConditionNode = myErrorNode.firstChild;
-					}
-				}
-				else {
-					var extClass:Class = ExtensionClassRegistry.lookup(nNamespace);
-					if (extClass != null) {
-						var ext:IExtension = new extClass();
-						ISerializable(ext).deserialize(children[i]);
-						addExtension(ext);
-					}
-				}
-			}
-			return true;
-		}
-		
-		/**
-		 * The JID of the recipient.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get to():EscapedJID
-		{
-			return new EscapedJID(getNode().attributes.to);
-		}
-		
-		public function set to( recipient:EscapedJID ):void
-		{
-			delete getNode().attributes.to;
-			if (exists(recipient)) { getNode().attributes.to = recipient.toString(); }
-		}
-		
-		/**
-		 * The JID of the sender. Most, if not all, server implementations follow the specifications
-		 * that prevent this from being falsified. Thus, under normal circumstances, you don't
-		 * need to supply this information because the server will fill it in automatically.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get from():EscapedJID
-		{
-			var jid:String = getNode().attributes.from;
-			return jid ? new EscapedJID(jid) : null;
-		}
-		
-		public function set from( sender:EscapedJID ):void
-		{
-			delete getNode().attributes.from;
-			if (exists(sender)) { getNode().attributes.from = sender.toString(); }
-		}
-		
-		/**
-		 * The stanza type. There are MANY types available, depending on what kind of stanza this is.
-		 * The XIFF Library defines the types for IQ, Presence, and Message in each respective class
-		 * as static string variables. Below is a listing of each:
-		 * 
-		 * <b>IQ</b>
-		 * <ul>
-		 * <li>IQ.SET_TYPE</li>
-		 * <li>IQ.GET_TYPE</li>
-		 * <li>IQ.RESULT_TYPE</li>
-		 * <li>IQ.ERROR_TYPE</li>
-		 * </ul>
-		 *
-		 * <b>Presence</b>
-		 * <ul>
-		 * <li>Presence.AVAILABLE_TYPE</li>
-		 * <li>Presence.UNAVAILABLE_TYPE</li>
-		 * <li>Presence.PROBE_TYPE</li>
-		 * <li>Presence.SUBSCRIBE_TYPE</li>
-		 * <li>Presence.UNSUBSCRIBE_TYPE</li>
-		 * <li>Presence.SUBSCRIBED_TYPE</li>
-		 * <li>Presence.UNSUBSCRIBED_TYPE</li>
-		 * <li>Presence.ERROR_TYPE</li>
-		 * </ul>
-		 *
-		 * <b>Message</b>
-		 * <ul>
-		 * <li>Message.NORMAL_TYPE</li>
-		 * <li>Message.CHAT_TYPE</li>
-		 * <li>Message.GROUPCHAT_TYPE</li>
-		 * <li>Message.HEADLINE_TYPE</li>
-		 * <li>Message.ERROR_TYPE</li>
-		 * </ul>
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get type():String
-		{
-			return getNode().attributes.type;
-		}
-		
-		public function set type( theType:String ):void
-		{
-			delete getNode().attributes.type;
-			if (exists(theType)) { getNode().attributes.type = theType; }
-		}
-		
-		/**
-		 * The unique identifier of this stanza. ID generation is accomplished using
-		 * the static <code>generateID</code> method.
-		 *
-		 * @availability Flash Player 7
-		 * @see #generateID
-		 */
-		public function get id():String
-		{
-			return getNode().attributes.id;
-		}
-		
-		public function set id( theID:String ):void
-		{
-			delete getNode().attributes.id;
-			if (exists(theID)) { getNode().attributes.id = theID; }
-		}
-		
-		/**
-		 * The error message, assuming this stanza contains error information.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get errorMessage():String
-		{
-			
-			if( exists( errorCondition ) ) {
-				//return myErrorConditionNode.firstChild.nodeValue;
-				//return myErrorConditionNode.nextSibling.firstChild.nodeValue;  // fix recommended by bram 7/12/05
-				return errorCondition.toString();
-			}
-			else if(myErrorNode && myErrorNode.firstChild) {
-				return myErrorNode.firstChild.nodeValue;
-			}
-			return null;
-		}
-		
-		public function set errorMessage( theMsg:String ):void
-		{
-			myErrorNode = ensureNode( myErrorNode, "error" );
-			
-			theMsg = exists( theMsg ) ? theMsg : "";
-			
-			if( exists( errorCondition ) ) {
-				myErrorConditionNode = replaceTextNode( myErrorNode, myErrorConditionNode, errorCondition, theMsg );
-			}
-			else {
-				var attributes:Object = myErrorNode.attributes;
-				myErrorNode = replaceTextNode( getNode(), myErrorNode, "error", theMsg );
-				myErrorNode.attributes = attributes;
-			}
-		}
-		
-		/**
-		 * The error condition, assuming this stanza contains error information. For more information
-		 * on error conditions, see <a href="http://www.jabber.org/jeps/jep-0086.html">http://www.jabber.org/jeps/jep-0086.html</a>.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get errorCondition():String
-		{
-			if( exists( myErrorConditionNode ) ) {
-				return myErrorConditionNode.nodeName;
-			}
-			
-			return null;
-		}
-		
-		public function set errorCondition( aCondition:String ):void
-		{
-			myErrorNode = ensureNode( myErrorNode, "error" );
-			
-			// A message might exist, so remove it first
-			var attributes:Object = myErrorNode.attributes;
-			var msg:String = errorMessage;
-			
-			if( exists( aCondition ) ) {
-				myErrorNode = replaceTextNode( getNode(), myErrorNode, "error", "" );
-				myErrorConditionNode = addTextNode( myErrorNode, aCondition, msg );
-			}
-			else {
-				myErrorNode = replaceTextNode( getNode(), myErrorNode, "error", msg );
-			}
-			
-			myErrorNode.attributes = attributes;
-		}
-		
-		/**
-		 * The error type, assuming this stanza contains error information. For more information
-		 * on error types, see <a href="http://www.jabber.org/jeps/jep-0086.html">http://www.jabber.org/jeps/jep-0086.html</a>.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get errorType():String
-		{
-			return myErrorNode.attributes.type;
-		}
-		
-		public function set errorType( aType:String ):void
-		{
-			myErrorNode = ensureNode( myErrorNode, "error" );
-			
-			delete myErrorNode.attributes.type;
-			if( exists( aType ) ) { myErrorNode.attributes.type = aType; }
-		}
-		
-		/**
-		 * The error code, assuming this stanza contains error information. Error codes are 
-		 * deprecated in standard XMPP, but they are commonly used by older Jabber servers 
-		 * like Jabberd 1.4. For more information on error codes, and corresponding error
-		 * conditions, see <a href="http://www.jabber.org/jeps/jep-0086.html">http://www.jabber.org/jeps/jep-0086.html</a>.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get errorCode():Number
-		{
-			return Number( myErrorNode.attributes.code );
-		}
-		
-		public function set errorCode( aCode:Number ):void
-		{
-			myErrorNode = ensureNode( myErrorNode, "error" );
-			
-			delete myErrorNode.attributes.code;
-			if( exists( aCode ) ) { myErrorNode.attributes.code = aCode; }
-		}
-	}
-}
Index: org/jivesoftware/xiff/events/BookmarkChangedEvent.as
===================================================================
--- org/jivesoftware/xiff/events/BookmarkChangedEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/BookmarkChangedEvent.as	(working copy)
@@ -1,25 +0,0 @@
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	
-	import org.jivesoftware.xiff.bookmark.GroupChatBookmark;
-	import org.jivesoftware.xiff.bookmark.UrlBookmark;
-
-	public class BookmarkChangedEvent extends Event
-	{
-		public static const GROUPCHAT_BOOKMARK_ADDED:String = "groupchat bookmark retrieved";
-		public static const GROUPCHAT_BOOKMARK_REMOVED:String = "groupchat bookmark removed";
-		//add url types here when needed
-		
-		public var groupchatBookmark:GroupChatBookmark = null;
-		public var urlBookmark:UrlBookmark = null;
-		
-		public function BookmarkChangedEvent(type:String, bookmark:*) {
-			super(type);
-			if(bookmark is GroupChatBookmark)
-				groupchatBookmark = bookmark as GroupChatBookmark;
-			else
-				urlBookmark = bookmark as UrlBookmark;
-		}
-	}
-}
Index: org/jivesoftware/xiff/events/BookmarkRetrievedEvent.as
===================================================================
--- org/jivesoftware/xiff/events/BookmarkRetrievedEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/BookmarkRetrievedEvent.as	(working copy)
@@ -1,13 +0,0 @@
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-
-	public class BookmarkRetrievedEvent extends Event
-	{
-		public static var BOOKMARK_RETRIEVED:String = "bookmark retrieved";
-		
-		public function BookmarkRetrievedEvent() {
-			super(BOOKMARK_RETRIEVED);
-		}
-	}
-}
Index: org/jivesoftware/xiff/events/ChangePasswordSuccessEvent.as
===================================================================
--- org/jivesoftware/xiff/events/ChangePasswordSuccessEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/ChangePasswordSuccessEvent.as	(working copy)
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{	 
-	import flash.events.Event;
-	public class ChangePasswordSuccessEvent extends Event
-	{
-		public static var PASSWORD_SUCCESS:String = "changePasswordSuccess";
-		
-		public function ChangePasswordSuccessEvent()
-		{
-			super(ChangePasswordSuccessEvent.PASSWORD_SUCCESS, false, false);
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/ConnectionSuccessEvent.as
===================================================================
--- org/jivesoftware/xiff/events/ConnectionSuccessEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/ConnectionSuccessEvent.as	(working copy)
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-
-	public class ConnectionSuccessEvent extends Event
-	{
-		
-		public static var CONNECT_SUCCESS:String = "connection";
-		
-		public function ConnectionSuccessEvent()
-		{
-			super(ConnectionSuccessEvent.CONNECT_SUCCESS, false, false);
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/DisconnectionEvent.as
===================================================================
--- org/jivesoftware/xiff/events/DisconnectionEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/DisconnectionEvent.as	(working copy)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	
-	public class DisconnectionEvent extends Event
-	{
-		public static var DISCONNECT:String = "disconnection";
-		
-		public function DisconnectionEvent()
-		{
-			super(DisconnectionEvent.DISCONNECT, false, false);
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/IncomingDataEvent.as
===================================================================
--- org/jivesoftware/xiff/events/IncomingDataEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/IncomingDataEvent.as	(working copy)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	import flash.xml.XMLDocument;
-
-	public class IncomingDataEvent extends Event
-	{
-		
-		public static var INCOMING_DATA:String = "incomingData";
-		private var _data:XMLDocument;
-		
-		public function IncomingDataEvent()
-		{
-			super(IncomingDataEvent.INCOMING_DATA, false, false);
-		}
-		public function get data():XMLDocument
-		{
-			return _data;
-		}
-		public function set data(x:XMLDocument):void
-		{
-			_data = x;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/InviteEvent.as
===================================================================
--- org/jivesoftware/xiff/events/InviteEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/InviteEvent.as	(working copy)
@@ -1,87 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	
-	import org.jivesoftware.xiff.conference.Room;
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.data.Message;
-
-	public class InviteEvent extends Event
-	{
-		public static var INVITED:String = "invited";
-		private var _from:UnescapedJID;
-		private var _reason:String;
-		private var _room:Room;
-		private var _data:Message;
-		public function InviteEvent()
-		{
-			super(INVITED);
-		}
-		public function get from():UnescapedJID
-		{
-			return _from;
-		}
-		public function set from(s:UnescapedJID) : void
-		{
-			_from = s;
-		}
-		public function get reason() : String
-		{
-			return _reason;
-		}
-		public function set reason(s:String) : void
-		{
-			_reason = s;
-		}
-		public function get room() : Room
-		{
-			return _room;
-		}
-		public function set room(d:Room) : void
-		{
-			_room = d;
-		}
-		public function get data() : Message
-		{
-			return _data;
-		}
-		public function set data(d:Message) : void
-		{
-			_data = d;
-		}
-		
-		public override function clone():Event
-		{
-			var e:InviteEvent = new InviteEvent();
-			e.from = this.from;
-			e.reason = this.reason;
-			e.room = this.room;
-			e.data = this.data;
-			
-			return e;
-		} 
-	}
-}
Index: org/jivesoftware/xiff/events/IQEvent.as
===================================================================
--- org/jivesoftware/xiff/events/IQEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/IQEvent.as	(working copy)
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.IQ;
-	
-	public class IQEvent extends Event
-	{
-		private var _data:IExtension;
-		private var _iq:IQ;
-		
-		public function IQEvent(type:String)
-		{
-			super(type, false, false);
-		}
-		public function get data():IExtension
-		{
-			return _data;
-		}
-		public function set data(x:IExtension):void
-		{
-			_data = x;
-		}
-		
-		public function get iq():IQ
-		{
-			return _iq;
-		}
-		public function set iq(i:IQ):void
-		{
-			_iq = i;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/LoginEvent.as
===================================================================
--- org/jivesoftware/xiff/events/LoginEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/LoginEvent.as	(working copy)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-
-	public class LoginEvent extends Event
-	{
-		public static var LOGIN:String = "login";
-		
-		public function LoginEvent()
-		{
-			super(LoginEvent.LOGIN, false, false);
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/MessageEvent.as
===================================================================
--- org/jivesoftware/xiff/events/MessageEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/MessageEvent.as	(working copy)
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	import org.jivesoftware.xiff.data.Message;
-	
-	public class MessageEvent extends Event
-	{
-		public static var MESSAGE:String = "message";
-		private var _data:Message;
-		
-		public function MessageEvent()
-		{
-			super(MessageEvent.MESSAGE, false, false);
-		}
-		public function get data():Message
-		{
-			return _data;
-		}
-		public function set data(m:Message):void
-		{
-			_data = m;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/ModelChangedEvent.as
===================================================================
--- org/jivesoftware/xiff/events/ModelChangedEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/ModelChangedEvent.as	(working copy)
@@ -1,73 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-
-	public class ModelChangedEvent extends Event
-	{
-		public static var MODEL_CHANGED:String = "modelChanged";
-		private var _firstItem:String;
-		private var _lastItem:String;
-		private var _removedIDs:String;
-		private var _fieldName:String;
-		public function ModelChangedEvent()
-		{
-			super(ModelChangedEvent.MODEL_CHANGED, false, false);
-		}
-		public function set firstItem(s:String):void
-		{
-			_firstItem = s;
-		}
-		public function get firstItem():String
-		{
-			return _firstItem;
-		}
-		public function set lastItem(s:String):void
-		{
-			_lastItem = s;
-		}
-		public function get lastItem():String
-		{
-			return _lastItem;
-		}
-		public function set removedIDs(s:String):void
-		{
-			_removedIDs = s;
-		}
-		public function get removedIDs():String
-		{
-			return _removedIDs;
-		}
-		public function set fieldName(s:String):void
-		{
-			_fieldName = s;
-		}
-		public function get fieldName():String
-		{
-			return _fieldName;
-		}
-	}
-}
-					
\ No newline at end of file
Index: org/jivesoftware/xiff/events/OutgoingDataEvent.as
===================================================================
--- org/jivesoftware/xiff/events/OutgoingDataEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/OutgoingDataEvent.as	(working copy)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	import flash.xml.XMLDocument;
-
-	public class OutgoingDataEvent extends Event
-	{
-		
-		public static var OUTGOING_DATA:String = "outgoingData";
-		private var _data:*;
-		
-		public function OutgoingDataEvent()
-		{
-			super(OutgoingDataEvent.OUTGOING_DATA, false, false);
-		}
-		public function get data():*
-		{
-			return _data;
-		}
-		public function set data(d:*):void
-		{
-			_data = d;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/PresenceEvent.as
===================================================================
--- org/jivesoftware/xiff/events/PresenceEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/PresenceEvent.as	(working copy)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	import org.jivesoftware.xiff.data.Presence;
-
-	public class PresenceEvent extends Event
-	{
-		
-		public static var PRESENCE:String = "presence";
-		private var _data:Array;
-		
-		public function PresenceEvent()
-		{
-			super(PresenceEvent.PRESENCE, bubbles, cancelable);
-		}
-		public function get data():Array
-		{
-			return _data;
-		}
-		public function set data(p:Array):void
-		{
-			_data = p;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/RegistrationFieldsEvent.as
===================================================================
--- org/jivesoftware/xiff/events/RegistrationFieldsEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/RegistrationFieldsEvent.as	(working copy)
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	import org.jivesoftware.xiff.data.register.RegisterExtension;
-
-	public class RegistrationFieldsEvent extends Event
-	{
-		public static var REG_FIELDS:String = "registrationFields";
-		private var _fields:Array;
-		private var _data:RegisterExtension;
-		
-		public function RegistrationFieldsEvent()
-		{
-			super(RegistrationFieldsEvent.REG_FIELDS, false, false);
-		}
-		public function get fields():Array
-		{
-			return _fields;
-		}
-		public function set fields(a:Array):void
-		{
-			_fields = a;
-		}
-		public function get data():RegisterExtension
-		{
-			return _data;
-		}
-		public function set data(r:RegisterExtension):void
-		{
-			_data = r;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/RegistrationSuccessEvent.as
===================================================================
--- org/jivesoftware/xiff/events/RegistrationSuccessEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/RegistrationSuccessEvent.as	(working copy)
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-
-	public class RegistrationSuccessEvent extends Event
-	{
-		
-		public static var REGISTRATION_SUCCESS:String = "registrationSuccess";
-		
-		public function RegistrationSuccessEvent()
-		{
-			super(RegistrationSuccessEvent.REGISTRATION_SUCCESS, false, false);
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/RoomEvent.as
===================================================================
--- org/jivesoftware/xiff/events/RoomEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/RoomEvent.as	(working copy)
@@ -1,154 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-
-	public class RoomEvent extends Event
-	{
-		public static const SUBJECT_CHANGE:String = "subjectChange";
-		public static const GROUP_MESSAGE:String = "groupMessage";
-		public static const PRIVATE_MESSAGE:String = "privateMessage";
-		public static const ROOM_JOIN:String = "roomJoin";
-		public static const ROOM_LEAVE:String = "roomLeave";
-		public static const ROOM_DESTROYED:String = "roomDestroyed";
-		public static const AFFILIATIONS:String = "affiliations";
-		public static const ADMIN_ERROR:String = "adminError";
-		public static const PASSWORD_ERROR:String = "passwordError";
-		public static const REGISTRATION_REQ_ERROR:String = "registrationReqError";
-		public static const BANNED_ERROR:String = "bannedError";
-		public static const MAX_USERS_ERROR:String = "maxUsersError";
-		public static const LOCKED_ERROR:String = "lockedError";
-		public static const USER_JOIN:String = "userJoin";
-		public static const USER_DEPARTURE:String = "userDeparture";
-		public static const USER_KICKED:String = "userKicked";
-		public static const USER_BANNED:String = "userBanned";
-		public static const NICK_CONFLICT:String = "nickConflict";
-		public static const CONFIGURE_ROOM:String = "configureForm";
-		public static const DECLINED:String = "declined";
-		
-		private var _subject:String;
-		private var _data:*;
-		private var _errorCondition:String;
-		private var _errorMessage:String;
-		private var _errorType:String;
-		private var _errorCode:Number;
-		private var _nickname:String;
-		private var _from:String;
-		private var _reason:String;
-		
-		public function RoomEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
-		{
-			super(type, bubbles, cancelable);
-		}
-		public function set subject(s:String) : void
-		{
-			_subject = s;
-		}
-		public function get subject() : String
-		{
-			return _subject;
-		}
-		public function set data(s:*) : void
-		{
-			_data = s;
-		}
-		public function get data() : *
-		{
-			return _data;
-		}
-		public function set errorCondition(s:String) : void
-		{
-			_errorCondition = s;
-		}
-		public function get errorCondition() : String
-		{
-			return _errorCondition;
-		}
-		public function set errorMessage(s:String) : void
-		{
-			_errorMessage = s;
-		}
-		public function get errorMessage() : String
-		{
-			return _errorMessage;
-		}
-		public function set errorType(s:String) : void
-		{
-			_errorType = s;
-		}
-		public function get errorType() : String
-		{
-			return _errorType;
-		}
-		public function set errorCode(s:Number) : void
-		{
-			_errorCode = s;
-		}
-		public function get errorCode() : Number
-		{
-			return _errorCode;
-		}
-		public function set nickname(s:String) : void
-		{
-			_nickname = s;
-		}
-		public function get nickname() : String
-		{
-			return _nickname;
-		}
-		public function set from(s:String) : void
-		{
-			_from = s;
-		}
-		public function get from() : String
-		{
-			return _from;
-		}
-		public function set reason(s:String) : void
-		{
-			_reason = s;
-		}
-		public function get reason() : String
-		{
-			return _reason;
-		}
-		
-		public override function clone():Event
-		{
-			var event:RoomEvent = new RoomEvent(this.type, this.bubbles, this.cancelable);
-			event._subject = this._subject;
-			event._data = this._data;
-			event._errorCondition = this._errorCondition;
-			event._errorMessage = this._errorMessage;
-			event._errorType = this._errorType;
-			event._errorCode = this._errorCode;
-			event._nickname = this._nickname;
-			event._from = this._from;
-			event._reason = this._reason;
-			
-			return event;
-		} 
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/RosterEvent.as
===================================================================
--- org/jivesoftware/xiff/events/RosterEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/RosterEvent.as	(working copy)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-
-	public class RosterEvent extends Event
-	{
-		public static const SUBSCRIPTION_REVOCATION:String = "subscriptionRevocation";
-		public static const SUBSCRIPTION_REQUEST:String = "subscriptionRequest";
-		public static const SUBSCRIPTION_DENIAL:String = "subscriptionDenial";
-		public static const USER_AVAILABLE:String = "userAvailable";
-		public static const USER_UNAVAILABLE:String = "userUnavailable";
-		public static const USER_ADDED:String = 'userAdded';
-		public static const USER_REMOVED:String = 'userRemoved';
-		public static const USER_PRESENCE_UPDATED:String = 'userPresenceUpdated';
-		public static const USER_SUBSCRIPTION_UPDATED:String = 'userSubscriptionUpdated';
-		public static const ROSTER_LOADED:String = "rosterLoaded";
-		
-		private var _data:*;
-		private var _jid:UnescapedJID;
-		
-		public function RosterEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
-		{
-			super(type, bubbles, cancelable);
-		}
-		public function get jid():UnescapedJID
-		{
-			return _jid;
-		}
-		public function set jid(s:UnescapedJID):void
-		{
-			_jid = s;
-		}
-		public function get data():*
-		{
-			return _data;
-		}
-		public function set data(d:*):void
-		{
-			_data = d;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/SearchPrepEvent.as
===================================================================
--- org/jivesoftware/xiff/events/SearchPrepEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/SearchPrepEvent.as	(working copy)
@@ -1,26 +0,0 @@
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	
-	public class SearchPrepEvent extends Event
-	{
-		public static const SEARCH_PREP_COMPLETE:String = "searchPrepComplete";
-		
-		private var _server:String;
-		
-		public function SearchPrepEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
-		{
-			super(type, bubbles, cancelable);
-		}
-
-		public function get server():String
-		{
-			return _server;
-		}
-		public function set server(s:String):void
-		{
-			_server = s;
-		}
-
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/VCardEvent.as
===================================================================
--- org/jivesoftware/xiff/events/VCardEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/VCardEvent.as	(working copy)
@@ -1,29 +0,0 @@
-package org.jivesoftware.xiff.events {
-	
-import flash.events.*;
-
-import org.jivesoftware.xiff.vcard.VCard;
-	
-public class VCardEvent extends Event {
- 
- 	public static const LOADED:String = "vcardLoaded";
- 	public static const AVATAR_LOADED:String = "vcardAvatarLoaded";
- 	public static const ERROR:String = "vcardError";
-    private var _vcard:VCard;
-
-    public function VCardEvent( type:String, vcard:VCard, bubbles:Boolean, cancelable:Boolean ) {
-    	super( type, bubbles, cancelable )
-        _vcard = vcard;
-    }
-
-    public override function clone():Event {
-      return new VCardEvent( type, _vcard, bubbles, cancelable );
-    }
-    
-    public function get vcard():VCard {
-    	return _vcard;
-    }
-    
-    
-  }
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/events/XIFFErrorEvent.as
===================================================================
--- org/jivesoftware/xiff/events/XIFFErrorEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/events/XIFFErrorEvent.as	(working copy)
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.events
-{
-	import flash.events.Event;
-	
-	import org.jivesoftware.xiff.data.Extension;
-
-	public class XIFFErrorEvent extends Event
-	{
-		public static var XIFF_ERROR:String = "error";
-		private var _errorCondition:String;
-		private var _errorMessage:String;
-		private var _errorType:String;
-		private var _errorCode:Number;
-		private var _errorExt:Extension;
-		
-		public function XIFFErrorEvent()
-		{
-			super(XIFFErrorEvent.XIFF_ERROR, false, false);
-		}
-		public function set errorCondition(s:String):void
-		{
-			_errorCondition = s;
-		}
-		public function get errorCondition():String
-		{
-			return _errorCondition;
-		}
-		public function set errorMessage(s:String):void
-		{
-			_errorMessage = s;
-		}
-		public function get errorMessage():String
-		{
-			return _errorMessage;
-		}
-		public function set errorType(s:String):void
-		{
-			_errorType = s;
-		}
-		public function get errorType():String
-		{
-			return _errorType;
-		}
-		public function set errorCode(n:Number):void
-		{
-			_errorCode = n;
-		}
-		public function get errorCode():Number
-		{
-			return _errorCode;
-		}
-		public function set errorExt(ext:Extension):void
-		{
-			_errorExt = ext;
-		}
-		public function get errorExt():Extension
-		{
-			return _errorExt;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/exception/SerializationException.as
===================================================================
--- org/jivesoftware/xiff/exception/SerializationException.as	(revision 11020)
+++ org/jivesoftware/xiff/exception/SerializationException.as	(working copy)
@@ -1,40 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.exception
-{	
-	/**
-	 * This exception is thrown whenever there is a problem serializing or 
-	 * deserializing data for sending to the server.
-	 */
-	public class SerializationException extends Error
-	{
-		private static var MSG:String = "Could not properly serialize/deserialize stanza."
-		
-		public function SerializationException()
-		{
-			super( MSG );
-		}
-	}
-	
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/filter/CallbackPacketFilter.as
===================================================================
--- org/jivesoftware/xiff/filter/CallbackPacketFilter.as	(revision 11020)
+++ org/jivesoftware/xiff/filter/CallbackPacketFilter.as	(working copy)
@@ -1,33 +0,0 @@
-package org.jivesoftware.xiff.filter
-{
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.util.Callback;
-
-	public class CallbackPacketFilter implements IPacketFilter
-	{
-		private var _filterFunction:Function;
-		private var _callback:Callback;
-		private var _processFunction:Function;
-		
-		/**
-		 * 
-		 */
-		public function CallbackPacketFilter(callback:Callback, filterFunction:Function = null, processFunction:Function = null) {
-			this._callback = callback;
-			this._filterFunction = filterFunction;
-			this._processFunction = processFunction;
-		}
-		
-		public function accept(packet:XMPPStanza):void
-		{
-			if(_filterFunction == null || _filterFunction(packet)) {
-				var processed:Object = packet;
-				if(_processFunction != null) {
-					processed = _processFunction(packet);
-				}
-				_callback.call(processed);
-			}
-		}
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/filter/IPacketFilter.as
===================================================================
--- org/jivesoftware/xiff/filter/IPacketFilter.as	(revision 11020)
+++ org/jivesoftware/xiff/filter/IPacketFilter.as	(working copy)
@@ -1,9 +0,0 @@
-package org.jivesoftware.xiff.filter
-{
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	
-	public interface IPacketFilter
-	{
-		function accept(packet:XMPPStanza):void;
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/im/Roster.as
===================================================================
--- org/jivesoftware/xiff/im/Roster.as	(revision 11020)
+++ org/jivesoftware/xiff/im/Roster.as	(working copy)
@@ -1,683 +0,0 @@
-﻿/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.im
-{	
-	import mx.collections.ArrayCollection;
-	import mx.collections.Sort;
-	import mx.collections.SortField;
-	
-	import org.jivesoftware.xiff.core.EscapedJID;
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.Presence;
-	import org.jivesoftware.xiff.data.XMLStanza;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.im.RosterExtension;
-	import org.jivesoftware.xiff.data.im.RosterGroup;
-	import org.jivesoftware.xiff.data.im.RosterItemVO;
-	import org.jivesoftware.xiff.events.*;
-	
-	/**
-	 * Broadcast whenever someone revokes your presence subscription. This is not
-	 * an event that is fired when you revoke a subscription, but rather when one of your
-	 * contacts decides that he/she/it no longer wants you to know about their presence
-	 * status.
-	 *
-	 * The event object contains an attribute <code>jid</code> with the JID of
-	 * the user who revoked your subscription.
-	 *
-	 * @availability Flash Player 7
-	 */
-	[Event("subscriptionRevocation")]
-	
-	/**
-	 * Broadcast whenever someone requests to subscribe to your presence. The event object
-	 * contains an attribute <code>jid</code> with the JID of the user who is requesting
-	 * a presence subscription.
-	 *
-	 * @availability Flash Player 7
-	 */
-	[Event("subscriptionRequest")]
-	
-	/**
-	 * Broadcast whenever a subscription request that you make (via the <code>addContact()</code>
-	 * or <code>requestSubscription()</code> methods) is denied.
-	 *
-	 * The event object contains an attribute <code>jid</code> with the JID of the user who
-	 * denied the request.
-	 *
-	 * @availability Flash Player 7
-	 */
-	[Event("subscriptionDenial")]
-	
-	/**
-	 * Broadcast whenever a contact in the roster becomes unavailable. (Goes from online to offline.)
-	 * The event object contains an attribute <code>jid</code> with the JID of the user who
-	 * became unavailable.
-	 *
-	 * @availability Flash Player 7
-	 */
-	[Event("userUnavailable")]
-	
-	/**
-	 * Broadcast whenever a contact in the roster becomes available. (Goes from offline to online.)
-	 * The event object contains an attribute <code>jid</code> with the JID of the user who
-	 * became available.
-	 *
-	 * @availability Flash Player 7
-	 */
-	[Event("userAvailable")]
-	
-	/**
-	 * Manages a user's server-side instant messaging roster (or "buddy list"). By default,
-	 * this class uses an internal data provider to keep track of roster data locally and
-	 * provides a "read-only" form of the Data Provider API for external use. Non-read operations
-	 * are performed using alternative, roster-specific methods.
-	 *
-	 * You can also use your own, external data provider if you choose, by using the
-	 * <code>setExternalDataProvider()</code> method. This is most useful for applications
-	 * where the data provider might need to be a class other than an array with the Data Provider
-	 * API decorations, like in the case of a Macromedia Central LCDataProvider. Overall,
-	 * however, its probably a rare occurence.
-	 *
-	 * @author Sean Voisen
-	 * @since 2.0.0
-	 * @toc-path Instant Messaging
-	 * @toc-sort 1
-	 * @availability Flash Player 7
-	 * @param aConnection A reference to an XMPPConnection class instance
-	 * @param externalDataProvider (Optional) A reference to an instance of a data provider
-	 */ 
-	public class Roster extends ArrayCollection
-	{
-		private var myConnection:XMPPConnection;
-		//FIXME: does not support multiple pending requests
-		private var pendingSubscriptionRequestJID:UnescapedJID;
-		//FIXME: maps should not be arrays
-		private var _presenceMap:Array = new Array();
-		
-		[Bindable]
-		public var groups:ArrayCollection = new ArrayCollection();
-		
-		private static const staticConstructorDependencies:Array = [			
-			ExtensionClassRegistry,
-			RosterExtension
-		]
-		
-		private static var rosterStaticConstructed:Boolean = RosterStaticConstructor();
-		
-		public function Roster( aConnection:XMPPConnection = null)
-		{	
-			
-			if (aConnection != null){ 
-				connection = aConnection;
-			}
-			var groupSort:Sort = new Sort();
-			groupSort.fields = [new SortField("label", true)];
-			groups.sort = groupSort;
-		}
-		
-		private static function RosterStaticConstructor():Boolean
-		{	
-			ExtensionClassRegistry.register( RosterExtension );
-			return true;
-		}
-		
-		/**
-		 * Adds a contact to the roster. Remember: All roster data is managed on the server-side,
-		 * so this contact is added to the server-side roster first, and upon successful addition,
-		 * reflected in the local client-side copy of the roster.
-		 *
-		 * @param id The JID of the contact to add
-		 * @param displayName A friendly name for use when displaying this contact in the roster
-		 * @param groupName (Optional) The name of the group that this contact should be added to. (Used for
-		 * organization in the roster listing.
-		 * @param requestSubscription (Optional) Determines whether a subscription request should be sent
-		 * to this user. Most of the time you will want this parameter to be true.
-		 * You will be unable to view the contacts presence status until a subscription request is granted.
-		 * @availability Flash Player 7
-		 * @example This example adds a contact to the roster and simultaneously requests a presence subscription
-		 * with the new contact.
-		 * <pre>myRoster.addContact( "homer@springfield.com", "Homer", "Drinking Buddies", true );</pre>
-		 */
-		public function addContact( id:UnescapedJID, displayName:String, groupName:String = null, requestSubscription:Boolean=true ):void
-		{
-			if( displayName == null )
-				displayName = id.toString();
-				
-			var callbackObj:Roster = null;
-			var callbackMethod:String = null;
-			var subscription:String = RosterExtension.SUBSCRIBE_TYPE_NONE;
-			var askType:String = RosterExtension.ASK_TYPE_NONE;
-			
-			if( requestSubscription == true ) {
-				callbackObj = this;
-				callbackMethod = "addContact_result";
-				pendingSubscriptionRequestJID = id;
-				subscription = RosterExtension.SUBSCRIBE_TYPE_TO;
-				askType = RosterExtension.ASK_TYPE_SUBSCRIBE
-			}
-				
-			var tempIQ:IQ = new IQ (null, IQ.SET_TYPE, XMPPStanza.generateID("add_user_"), callbackMethod, callbackObj );
-			var ext:RosterExtension = new RosterExtension( tempIQ.getNode() );
-			ext.addItem( id.escaped, null, displayName, groupName ? [groupName] : null );
-			tempIQ.addExtension( ext );
-			myConnection.send( tempIQ );
-	
-			
-			addRosterItem( id, displayName, RosterExtension.SHOW_PENDING, RosterExtension.SHOW_PENDING, [groupName], subscription, askType );
-		}
-		
-		/**
-		 * Requests subscription authorization with a user or service. In the XMPP-world, you cannot receive
-		 * notifications on changes to a contact's presence until that contact has authorized you to subscribe
-		 * to his/her/its presence.
-		 *
-		 * @param id The JID of the user or service that you wish to subscribe to
-		 * @availability Flash Player 7
-		 * @see #subscriptionDenial
-		 */
-		public function requestSubscription( id:UnescapedJID, isResponse:Boolean=false):void
-		{
-			// Roster length is 0 if it a response to a user request. we must handle this event.
-			var tempPresence:Presence;
-			if (isResponse)
-			{
-				tempPresence = new Presence( id.escaped, null, Presence.SUBSCRIBE_TYPE );
-				myConnection.send( tempPresence );
-				return;
-			}
-			// Only request for items in the roster
-			if(contains(RosterItemVO.get(id, false)))
-			{
-				tempPresence = new Presence( id.escaped, null, Presence.SUBSCRIBE_TYPE );
-				myConnection.send( tempPresence );
-			}
-		}
-		
-		/**
-		 * Removes a contact from the roster and revokes all presence subscriptions for that contact.
-		 * This method will only attempt action if the contact you are trying to remove is currently on the
-		 * roster in the first place.
-		 *
-		 * @param id The JID of the contact to remove
-		 * @availability Flash Player 7
-		 */
-		public function removeContact( rosterItem:RosterItemVO):void
-		{
-			if(contains(rosterItem))
-			{
-				var tempIQ:IQ = new IQ( null, IQ.SET_TYPE, XMPPStanza.generateID("remove_user_"), "unsubscribe_result", this );
-				var ext:RosterExtension = new RosterExtension( tempIQ.getNode() );
-				ext.addItem(new EscapedJID(rosterItem.jid.bareJID), RosterExtension.SUBSCRIBE_TYPE_REMOVE );
-				tempIQ.addExtension( ext );
-				myConnection.send( tempIQ );
-				
-				//the roster item is not actually removed from the roster
-				//until confirmation comes back from the XMPP server
-			}
-		}
-		
-		/**
-		 * Fetches the roster data from the server. Once the data has been fetched, the Roster's data
-		 * provider is populated appropriately. If the Roster-XMPPConnection class dependency has been
-		 * set up before logging in, then this method will be called automatically because the Roster
-		 * listens for "login" events from the XMPPConnection.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function fetchRoster():void
-		{
-			var tempIQ:IQ = new IQ( null, IQ.GET_TYPE, XMPPStanza.generateID("roster_"), "fetchRoster_result", this );
-			tempIQ.addExtension( new RosterExtension( tempIQ.getNode() ) );
-			myConnection.send( tempIQ );
-		}
-		
-		/**
-		 * Grants a user or service authorization for subscribing to your presence. Once authorization
-		 * is granted, the user can see whether you are offline, online, away, etc. Subscriptions can
-		 * be revoked at any time using the <code>denySubscription()</code> method.
-		 *
-		 * @availability Flash Player 7
-		 * @param to The JID of the user or service to grant subscription to
-		 * @param requestAfterGrant Whether or not a reciprocal subscription request should be sent
-		 * to the grantee, so that you may, in turn, subscribe to his/her/its presence.
-		 */
-		public function grantSubscription( tojid:UnescapedJID, requestAfterGrant:Boolean = true ):void
-		{
-			var tempPresence:Presence = new Presence( tojid.escaped, null, Presence.SUBSCRIBED_TYPE );
-			myConnection.send( tempPresence );
-			
-			// Request a return subscription
-			if( requestAfterGrant ) {
-				requestSubscription( tojid, true );
-			}
-		}
-		
-		/**
-		 * Revokes an existing presence subscription or denies a subscription request. If a user
-		 * has sent you a subscription request you can use this method to deny that request. Otherwise,
-		 * if a user already has a granted presence subscription, you can use this method to revoke that
-		 * subscription.
-		 *
-		 * @availability Flash Player 7
-		 * @param to The JID of the user or service that you are denying subscription
-		 */
-		public function denySubscription( tojid:UnescapedJID ):void
-		{
-			var tempPresence:Presence = new Presence( tojid.escaped, null, Presence.UNSUBSCRIBED_TYPE );
-			myConnection.send( tempPresence );
-		}
-		
-		/**
-		 * Updates the information for an existing contact. You can use this method to change the
-		 * display name or associated group for a contact in your roster.
-		 *
-		 * @availability Flash Player 7
-		 * @param id The JID of the contact to update
-		 * @param newName The new display name for this contact
-		 * @param newGroups The new groups to associate the contact with
-		 */
-		private function updateContact( contact:RosterItemVO, newName:String, groupNames:Array ):void
-		{
-			var tempIQ:IQ = new IQ( null, IQ.SET_TYPE, XMPPStanza.generateID("update_contact_") );
-			var ext:RosterExtension = new RosterExtension( tempIQ.getNode() );
-			
-			ext.addItem( contact.jid.escaped, contact.subscribeType, newName, groupNames );
-			tempIQ.addExtension( ext );
-			myConnection.send( tempIQ );
-		}
-		
-		/**
-		 * Updates the display name for an existing contact.
-		 *
-		 * @availability Flash Player 7
-		 * @param id The JID of the contact to update
-		 * @param newName The new display name for this contact
-		 */
-		public function updateContactName( rosterItem:RosterItemVO, newName:String ):void
-		{
-			var groupNames:Array = [];
-			for each(var group:RosterGroup in getContainingGroups(rosterItem))
-			{
-				groupNames.push(group.label);
-			}
-			updateContact( rosterItem, newName, groupNames);
-		}
-		
-		public function getContainingGroups(item:RosterItemVO):Array
-		{
-			var result:Array = [];
-			for each(var group:RosterGroup in groups)
-			{
-				if(group.contains(item))
-					result.push(group);
-			}
-			return result;
-		}
-		
-		/**
-		 * Updates the groups associated with an existing contact.
-		 *
-		 * @availability Flash Player 7
-		 * @param id The JID of the contact to update
-		 * @param newGroups The new groups to associate the contact with
-		 */
-		public function updateContactGroups( rosterItem:RosterItemVO, newGroupNames:Array ):void
-		{
-			updateContact( rosterItem, rosterItem.displayName, newGroupNames );
-		}
-		
-		/**
-		 * Sets your current presence status. Calling this method notifies others who
-		 * are subscribed to your presence of a presence change. You should use this to
-		 * change your status to away, extended-away, etc. There are static variables that
-		 * you can use defined in the presence class for the <code>show</code> parameter:
-		 * <ul>
-		 * <li><code>Presence.SHOW_AWAY</code></li>
-		 * <li><code>Presence.SHOW_CHAT</code></li>
-		 * <li><code>Presence.SHOW_DND</code></li>
-		 * <li><code>Presence.SHOW_NORMAL</code></li>
-		 * <li><code>Presence.SHOW_XA</code></li>
-		 * </ul>
-		 *
-		 * @availability Flash Player 7
-		 * @param show The show type for your presence. This represents what others should see - whether
-		 * you are offline, online, away, etc.
-		 * @param status The status message associated with the show value
-		 * @param priority (Optional) A priority number for the presence
-		 * @see org.jivesoftware.xiff.data.Presence
-		 */
-		public function setPresence( show:String, status:String, priority:Number ):void
-		{
-			//var tempPresence:Presence = new Presence( null, null, Presence.AVAILABLE_TYPE, show, status, priority );
-			var tempPresence:Presence = new Presence( null, null, null, show, status, priority );
-			myConnection.send( tempPresence );
-		}
-		
-		public function fetchRoster_result( resultIQ:IQ ):void
-		{
-			// Clear out the old roster
-			removeAll();
-			try
-			{
-				disableAutoUpdate()
-				for each(var ext:RosterExtension in resultIQ.getAllExtensionsByNS( RosterExtension.NS )) 
-				{
-					for each(var item:* in ext.getAllItems()) 
-					{
-						//var classInfo:XML = flash.utils.describeType(item);
-						if (!item is XMLStanza)
-							continue;
-						
-						addRosterItem( new UnescapedJID(item.jid), item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", item.groupNames, item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE);		
-					}
-				}
-				enableAutoUpdate();
-				
-				// Fire Roster Loaded Event
-				var ev: RosterEvent = new RosterEvent(RosterEvent.ROSTER_LOADED, false, false);
-				dispatchEvent(ev);
-			}
-			catch (e:Error)
-			{
-				trace(e.getStackTrace());
-			}
-		}
-	
-		public function addContact_result( resultIQ:IQ ):void
-		{
-			// Contact was added, request subscription
-			requestSubscription( pendingSubscriptionRequestJID );
-			pendingSubscriptionRequestJID = null;
-		}
-		
-		public function unsubscribe_result( resultIQ:IQ ):void
-		{
-			// Does nothing for now
-		}
-		
-		public override function set filterFunction(f:Function):void
-		{
-			throw new Error("Setting the filterFunction on Roster is not allowed; Wrap it in a ListCollectionView and filter that.");
-		}
-		
-		private function handleEvent( eventObj:* ):void
-		{
-
-			switch( eventObj.type )
-			{	
-				// Handle any incoming presence items
-				case "presence":
-					handlePresences( eventObj.data );
-					break;
-				
-				// Fetch the roster immediately after login
-				case "login":
-					fetchRoster();
-					// Tell the server we are online and available
-					//setPresence( Presence.SHOW_NORMAL, "Online", 5 );
-					setPresence( null, "Online", 5 );
-					break;
-					
-				case RosterExtension.NS:
-					try
-					{
-						var ext:RosterExtension = (eventObj.iq as IQ).getAllExtensionsByNS( RosterExtension.NS )[0] as RosterExtension;
-						for each(var item:* in ext.getAllItems())
-						{
-							var jid:UnescapedJID = new UnescapedJID(item.jid);
-							var rosterItemVO:RosterItemVO = RosterItemVO.get(jid, true);
-							var ev: RosterEvent;
-							
-							if (contains(rosterItemVO))
-							{
-								switch (item.subscription.toLowerCase())
-								{
-									case RosterExtension.SUBSCRIBE_TYPE_NONE:
-										ev = new RosterEvent(RosterEvent.SUBSCRIPTION_REVOCATION);
-										ev.jid = jid;
-										dispatchEvent( ev );
-										break;
-									
-									case RosterExtension.SUBSCRIBE_TYPE_REMOVE:
-										ev = new RosterEvent(RosterEvent.USER_REMOVED);
-										for each(var group:RosterGroup in getContainingGroups(rosterItemVO))
-										{
-											group.removeItem(rosterItemVO);
-										}
-										//should be impossible for getItemIndex to return -1, since we just looked it up
-										ev.data = removeItemAt(getItemIndex(rosterItemVO));
-										ev.jid = jid;
-										dispatchEvent(ev);
-										break;
-														
-									default:
-										updateRosterItemSubscription(rosterItemVO, item.subscription.toLowerCase(), item.name, item.groupNames);
-										break;
-								}
-							} 
-							else 
-							{
-								var groups:Array = item.groupNames;
-
-								if( item.subscription.toLowerCase() != RosterExtension.SUBSCRIBE_TYPE_REMOVE &&  item.subscription.toLowerCase() != RosterExtension.SUBSCRIBE_TYPE_NONE) 
-								{
-									// Add this item to the roster if it's not there and if the subscription type is not equal to 'remove' or 'none'
-									addRosterItem( jid, item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", groups, item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
-								}
-								else if( (item.subscription.toLowerCase() == RosterExtension.SUBSCRIBE_TYPE_NONE || item.subscription.toLowerCase() == RosterExtension.SUBSCRIBE_TYPE_FROM) && item.askType == RosterExtension.ASK_TYPE_SUBSCRIBE ) 
-								{
-									// A contact was added to the roster, and its authorization is still pending.
-									addRosterItem( jid, item.name, RosterExtension.SHOW_PENDING, "Pending", groups, item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
-								}
-							}
-						}
-					}
-					catch (e:Error)
-					{
-						trace(e.getStackTrace());
-					}
-					break;
-			}
-		}
-		
-		private function handlePresences( presenceArray:Array):void
-		{
-			for each(var aPresence:Presence in presenceArray)
-			{
-				var type:String = aPresence.type ? aPresence.type.toLowerCase() : null;
-				
-				switch( type )
-				{
-					case Presence.SUBSCRIBE_TYPE:
-						var sReq:RosterEvent = new RosterEvent(RosterEvent.SUBSCRIPTION_REQUEST);
-						sReq.jid = aPresence.from.unescaped;
-						dispatchEvent(sReq);
-						break;
-						
-					case Presence.UNSUBSCRIBED_TYPE:
-						var sDeny:RosterEvent = new RosterEvent(RosterEvent.SUBSCRIPTION_DENIAL);
-						sDeny.jid = aPresence.from.unescaped;
-						dispatchEvent(sDeny);
-						break;
-					
-					case Presence.UNAVAILABLE_TYPE:
-						var unavailEv:RosterEvent = new RosterEvent(RosterEvent.USER_UNAVAILABLE);
-						unavailEv.jid = aPresence.from.unescaped;
-						dispatchEvent(unavailEv);
-	
-						var unavailableItem:RosterItemVO = RosterItemVO.get(aPresence.from.unescaped, false);
-						if(!unavailableItem) return;
-						updateRosterItemPresence( unavailableItem, aPresence );
-						
-						break;
-					
-					// null means available
-					default:
-						var availEv:RosterEvent = new RosterEvent(RosterEvent.USER_AVAILABLE);
-						// from can sometimes not be set
-						if(aPresence.from)
-							availEv.jid = aPresence.from.unescaped;
-						availEv.data = aPresence;
-						dispatchEvent(availEv);
-						
-						// Change the item on the roster
-						var availableItem:RosterItemVO;
-						if(aPresence.from)
-							availableItem = RosterItemVO.get(aPresence.from.unescaped, false);
-						
-						if(!availableItem) return;
-						updateRosterItemPresence( availableItem, aPresence );
-						
-						break;
-				}
-			}	
-		}
-		
-		private function addRosterItem( jid:UnescapedJID, displayName:String, show:String, status:String, groupNames:Array, type:String, askType:String="none" ):Boolean
-		{
-			if(!jid) 
-				return false;
-			
-			var rosterItem:RosterItemVO = RosterItemVO.get(jid, true);
-			if(!contains(rosterItem))
-				addItem( rosterItem );
-			if(displayName)
-				rosterItem.displayName = displayName;
-			rosterItem.subscribeType = type;
-			rosterItem.askType = askType;
-			rosterItem.status = status;
-			rosterItem.show = show;
-			setContactGroups(rosterItem, groupNames);
-			
-			var event:RosterEvent = new RosterEvent(RosterEvent.USER_ADDED);
-			event.jid = jid;
-			event.data = rosterItem;
-			dispatchEvent(event);
-
-			return true;
-		}
-		
-		private function setContactGroups(contact:RosterItemVO, groupNames:Array):void
-		{
-			groups.disableAutoUpdate();
-			if(!groupNames || groupNames.length == 0)
-			{
-				groupNames = ["General"];
-			}
-			for each(var name:String in groupNames)
-			{
-				//if there's no group by this name already, we need to make one
-				if(!getGroup(name))
-					groups.addItem(new RosterGroup(name));
-			}
-			for each(var group:RosterGroup in groups)
-			{
-				if(groupNames.indexOf(group.label) >= 0)
-					group.addItem(contact);
-				else
-					group.removeItem(contact);
-			}
-			groups.enableAutoUpdate();
-		}
-		
-		private function updateRosterItemSubscription( item:RosterItemVO, type:String, name:String, newGroupNames:Array ):void
-		{
-			item.subscribeType = type;
-			
-			setContactGroups(item, newGroupNames);
-
-			if(name)
-				item.displayName = name;
-			
-			var event:RosterEvent = new RosterEvent(RosterEvent.USER_SUBSCRIPTION_UPDATED);
-			event.jid = item.jid;
-			event.data = item;
-			dispatchEvent(event);
-		}
-		
-		private function updateRosterItemPresence( item:RosterItemVO, presence:Presence ):void
-		{
-			try
-			{	
-				item.status = presence.status;
-				item.show = presence.show;
-				item.priority = presence.priority;
-				if(!presence.type)
-					item.online = true;
-				else if(presence.type == Presence.UNAVAILABLE_TYPE)
-					item.online = false;
-				
-				var event:RosterEvent = new RosterEvent(RosterEvent.USER_PRESENCE_UPDATED);
-				event.jid = item.jid;
-				event.data = item;
-				_presenceMap[item.jid.toString()] = presence;
-				dispatchEvent(event);
-			}
-			catch (e:Error)
-			{
-				trace(e.getStackTrace());
-			}
-		}
-		
-		public function getPresence(jid:UnescapedJID):String {
-			return _presenceMap[jid.toString()];
-		}
-		
-		/**
-		 * The instance of the XMPPConnection class to use for the roster to use for
-		 * sending and receiving data.
-		 *
-		 * @availability Flash Player 7
-		 */
-		public function get connection():XMPPConnection
-		{
-			return myConnection;
-		}
-		
-		private static var counter:int = 0;
-		public function set connection( aConnection:XMPPConnection ):void
-		{
-			trace(++counter);
-			myConnection = aConnection;
-			// Set up listeners
-			myConnection.addEventListener(PresenceEvent.PRESENCE, handleEvent);
-			myConnection.addEventListener(LoginEvent.LOGIN, handleEvent);
-			myConnection.addEventListener( RosterExtension.NS, handleEvent );
-		}
-		
-		public function getGroup(name:String):RosterGroup
-		{
-			for each(var group:RosterGroup in groups)
-			{
-				if(group.label == name)
-					return group;
-			}
-			return null;
-		}
-	}
-}
Index: org/jivesoftware/xiff/logging/LoggerFactory.as
===================================================================
--- org/jivesoftware/xiff/logging/LoggerFactory.as	(revision 11020)
+++ org/jivesoftware/xiff/logging/LoggerFactory.as	(working copy)
@@ -1,37 +0,0 @@
-package org.jivesoftware.xiff.logging
-{
-	import mx.logging.ILogger;
-	import mx.logging.Log;
-	import mx.logging.LogEventLevel;
-	import mx.logging.targets.TraceTarget;
-  import mx.logging.targets.LineFormattedTarget;
-  import mx.controls.TextArea;
-	
-	public final class LoggerFactory
-	{
-		public static function configureDefault( filters:Array, level:int ):void
-		{
-			configureTarget( new TraceTarget(), filters, level );
-		}
-
-    public static function configureTextAreaTarget( textArea:TextArea, filters:Array, level:int ):void
-    {
-      configureTarget( new TextAreaTarget( textArea ), filters, level );
-    }
-
-    private static function configureTarget( logTarget:LineFormattedTarget, filters:Array, level:int ):void
-    {
-      logTarget.filters = new Array(["org.jivesoftware.*"]).concat(filters);
-			logTarget.level = level;
-			logTarget.includeTime = true;
-			logTarget.includeLevel = true;
-
-			Log.addTarget(logTarget);
-    }
-		
-		public static function getLogger(category:String):ILogger
-		{
-			return Log.getLogger(category);
-		}
-	}
-}
Index: org/jivesoftware/xiff/logging/TextAreaTarget.as
===================================================================
--- org/jivesoftware/xiff/logging/TextAreaTarget.as	(revision 11020)
+++ org/jivesoftware/xiff/logging/TextAreaTarget.as	(working copy)
@@ -1,25 +0,0 @@
-package org.jivesoftware.xiff.logging
-{
-  import mx.controls.TextArea;
-  import mx.core.mx_internal;
-  import mx.logging.targets.LineFormattedTarget;
-
-  use namespace mx_internal;
-  
-  public class TextAreaTarget extends LineFormattedTarget
-  {
-    private var textArea:TextArea;
-
-    public function TextAreaTarget( textArea:TextArea )
-    {
-      super();
-
-      this.textArea = textArea;
-    }
-
-    override mx_internal function internalLog( message:String ):void
-    {
-      textArea.text += message + "\n";
-    }
-  }
-}
Index: org/jivesoftware/xiff/privatedata/IPrivatePayload.as
===================================================================
--- org/jivesoftware/xiff/privatedata/IPrivatePayload.as	(revision 11020)
+++ org/jivesoftware/xiff/privatedata/IPrivatePayload.as	(working copy)
@@ -1,10 +0,0 @@
-package org.jivesoftware.xiff.privatedata
-{
-	import org.jivesoftware.xiff.data.IExtension;
-	import org.jivesoftware.xiff.data.ISerializable;
-
-	public interface IPrivatePayload extends ISerializable, IExtension
-	{
-		
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/privatedata/PrivateDataManager.as
===================================================================
--- org/jivesoftware/xiff/privatedata/PrivateDataManager.as	(revision 11020)
+++ org/jivesoftware/xiff/privatedata/PrivateDataManager.as	(working copy)
@@ -1,44 +0,0 @@
-package org.jivesoftware.xiff.privatedata
-{
-	import flash.events.EventDispatcher;
-	
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.ExtensionClassRegistry;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.privatedata.PrivateDataExtension;
-	import org.jivesoftware.xiff.filter.CallbackPacketFilter;
-	import org.jivesoftware.xiff.filter.IPacketFilter;
-	import org.jivesoftware.xiff.util.Callback;
-
-	public class PrivateDataManager extends EventDispatcher
-	{
-		private static var privateDataManagerConstructed:Boolean = privateDataManagerStaticConstructor();
-		
-		private static function privateDataManagerStaticConstructor():Boolean
-		{
-			ExtensionClassRegistry.register( PrivateDataExtension );
-			return true;
-		}
-		
-		private var _connection:XMPPConnection;
-		
-		public function PrivateDataManager(connection:XMPPConnection) {
-			this._connection = connection;
-		}
-		
-		public function getPrivateData(elementName:String, elementNamespace:String, callback:Callback):void {
-			var packetFilter:IPacketFilter = new CallbackPacketFilter(callback);
-			var privateDataGet:IQ = new IQ(null, IQ.GET_TYPE, null, "accept", packetFilter);
-			privateDataGet.addExtension(new PrivateDataExtension(elementName, elementNamespace));
-			
-			this._connection.send(privateDataGet);
-		}
-		
-		public function setPrivateData(elementName:String, elementNamespace:String, payload:IPrivatePayload):void {
-			var privateDataSet:IQ = new IQ(null, IQ.SET_TYPE);
-			privateDataSet.addExtension(new PrivateDataExtension(elementName, elementNamespace, payload));
-			
-			this._connection.send(privateDataSet);
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/util/Callback.as
===================================================================
--- org/jivesoftware/xiff/util/Callback.as	(revision 11020)
+++ org/jivesoftware/xiff/util/Callback.as	(working copy)
@@ -1,25 +0,0 @@
-package org.jivesoftware.xiff.util
-{
-	public class Callback
-	{
-		
-		private var _scope:Object;
-		private var _callback:Function;
-		private var _args:Array;
-		
-		public function Callback(scope:Object, callback:Function, ... args) {
-			this._scope = scope;
-			this._callback = callback;
-			this._args = args.slice();
-		}
-		
-		public function call(... args):Object {
-			var callbackArgs:Array = _args.slice();
-			for each(var arg:Object in args) {
-				callbackArgs.push(arg);
-			}
-
-			return _callback.apply(_scope, callbackArgs);
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/util/SocketConn.as
===================================================================
--- org/jivesoftware/xiff/util/SocketConn.as	(revision 11020)
+++ org/jivesoftware/xiff/util/SocketConn.as	(working copy)
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2003-2007 
- * Nick Velloff <nick.velloff@gmail.com>
- * Derrick Grigg <dgrigg@rogers.com>
- * Sean Voisen <sean@voisen.org>
- * Sean Treadway <seant@oncotype.dk>
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
- *
- */
-	 
-package org.jivesoftware.xiff.util
-{
-	import flash.net.Socket;
-	import flash.events.ProgressEvent;
-
-	public class SocketConn extends Socket
-	{
-		
-		private var input: String;
-		
-		public function SocketConn(host:String=null, port:int=0.0)
-		{
-			super(host, port);
-			addEventListener(ProgressEvent.SOCKET_DATA, onRead);		
-			input = '';
-		}
-		
-		private function onRead( event: ProgressEvent ): void
-		{
-			var s:String = readUTFBytes(bytesAvailable);
-			onSockRead( s );
-		}
-		
-		public function sendString( output: String ): void
-		{
-			writeUTFBytes( output );
-			flush();
-		}
-		
-		private function onSockRead( s:String ) : void
-		{
-			var e:SocketDataEvent = new SocketDataEvent();
-			e.data = s;
-			dispatchEvent(e);
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/util/SocketDataEvent.as
===================================================================
--- org/jivesoftware/xiff/util/SocketDataEvent.as	(revision 11020)
+++ org/jivesoftware/xiff/util/SocketDataEvent.as	(working copy)
@@ -1,45 +0,0 @@
-package org.jivesoftware.xiff.util
-{
-	/*
-	 * Copyright (C) 2003-2007 
-	 * Nick Velloff <nick.velloff@gmail.com>
-	 * Derrick Grigg <dgrigg@rogers.com>
-	 * Sean Voisen <sean@voisen.org>
-	 * Sean Treadway <seant@oncotype.dk>
-	 *
-	 * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
-	 *
-	 */
-	import flash.events.Event;
-
-	public class SocketDataEvent extends Event
-	{
-		public static var SOCKET_DATA_RECEIVED:String = "socketDataReceived";
-		private var _data:String;
-		
-		public function SocketDataEvent()
-		{
-			super(SOCKET_DATA_RECEIVED, false, false);
-		}
-		public function get data() : String
-		{
-			return _data;
-		}
-		public function set data( s:String ) : void
-		{
-			_data = s;
-		}
-	}
-}
\ No newline at end of file
Index: org/jivesoftware/xiff/vcard/VCard.as
===================================================================
--- org/jivesoftware/xiff/vcard/VCard.as	(revision 11020)
+++ org/jivesoftware/xiff/vcard/VCard.as	(working copy)
@@ -1,575 +0,0 @@
-package org.jivesoftware.xiff.vcard
-{
-	import flash.display.*;
-	import flash.events.*;
-	import flash.utils.ByteArray;
-	import flash.utils.Timer;
-	import flash.xml.XMLNode;
-	
-	import mx.utils.Base64Decoder;
-	
-	import org.jivesoftware.xiff.core.UnescapedJID;
-	import org.jivesoftware.xiff.core.XMPPConnection;
-	import org.jivesoftware.xiff.data.IQ;
-	import org.jivesoftware.xiff.data.XMPPStanza;
-	import org.jivesoftware.xiff.data.im.RosterItemVO;
-	import org.jivesoftware.xiff.data.vcard.VCardExtension;
-	import org.jivesoftware.xiff.events.VCardEvent;
-	
-	[Bindable]
-	public class VCard extends EventDispatcher {
-		private var _loader:Loader;
-		
-		private var contact:RosterItemVO;
-		public var jid:UnescapedJID;
-		public var firstName:String;
-		public var middleName:String;
-		public var lastName:String;
-		public var nickname:String;
-		public var email:String;
-		public var fullName:String;
-		public var company:String;
-		public var department:String;
-		public var title:String;
-		public var url:String;
-		public var workPostalCode:String;
-		public var workStateProvince:String;
-		public var workAddress:String;
-		public var workCountry:String;
-		public var workCity:String;
-		public var homePostalCode:String;
-		public var homeStateProvince:String;
-		public var homeAddress:String;
-		public var homeCountry:String;
-		public var homeCity:String;
-		public var workVoiceNumber:String;
-		public var workFaxNumber:String;
-		public var workPagerNumber:String;
-		public var workCellNumber:String;
-		public var homeVoiceNumber:String;
-		public var homeFaxNumber:String;
-		public var homePagerNumber:String;
-		public var homeCellNumber:String;
-		private static var cache:Object = {};
-		public var loaded:Boolean = false;
-		private var _avatar:DisplayObject;
-		private var _imageBytes:ByteArray;
-		
-		private static var requestQueue:Array = [];
-		private static var requestTimer:Timer;
-		//flush the vcard cache every 6 hours
-		private static var cacheFlushTimer:Timer = new Timer(21600000, 0);
-		public static function getVCard(con:XMPPConnection, user:RosterItemVO):VCard
-		{
-			if(!cacheFlushTimer.running)
-			{
-				cacheFlushTimer.start();
-				cacheFlushTimer.addEventListener(TimerEvent.TIMER, function(evt:TimerEvent):void {
-					var tempCache:Object = cache;
-					cache = {};
-					for each(var cachedCard:VCard in tempCache)
-					{
-						pushRequest(con, vcard);
-					}
-				});
-			}
-			
-			var jidString:String = user.jid.toString();
-			
-			var cachedCard:VCard = cache[jidString];
-			if(cachedCard)
-				return cachedCard;
-			
-			var vcard:VCard = new VCard();
-			vcard.contact = user;
-			cache[jidString] = vcard;
-			
-			pushRequest(con, vcard);
-
-		    return vcard;
-		}
-		
-		private static function pushRequest(con:XMPPConnection, vcard:VCard):void
-		{
-			if(!requestTimer)
-			{
-				requestTimer = new Timer(1, 1);
-				requestTimer.addEventListener(TimerEvent.TIMER_COMPLETE, sendRequest);
-			}
-			requestQueue.push({connection:con, card:vcard});
-			requestTimer.reset();
-			requestTimer.start();
-		}
-		
-		private static function sendRequest(evt:TimerEvent):void
-		{
-			if(requestQueue.length == 0)
-				return;
-			var req:Object = requestQueue.pop();
-			var con:XMPPConnection = req.connection;
-			var vcard:VCard = req.card;
-			var user:RosterItemVO = vcard.contact;	
-			
-			var iq:IQ = new IQ(user.jid.escaped, IQ.GET_TYPE);
-			vcard.jid = user.jid;
-			
-			iq.callbackName = "handleVCard";
-			iq.callbackScope = vcard;
-			iq.addExtension(new VCardExtension());
-			
-			con.send(iq);
-			requestTimer.reset();
-			requestTimer.start();
-		}
-		
-		public function saveVCard(con:XMPPConnection, user:RosterItemVO):void
-		{
-			var iq:IQ = new IQ(null, IQ.SET_TYPE, XMPPStanza.generateID("save_vcard_"), null, this, _vCardSent);
-			var vcardExt:VCardExtension = new VCardExtension();
-			var vcardExtNode:XMLNode = vcardExt.getNode();
-			
-			if (firstName || middleName || lastName)
-			{
-				var nameNode:XMLNode = new XMLNode(1, 'N');
-
-				if (firstName)
-				{
-					var firstNameNode:XMLNode = new XMLNode(1, 'GIVEN');
-					firstNameNode.appendChild(new XMLNode(3, firstName));
-					
-					nameNode.appendChild(firstNameNode);
-				}
-				
-				if (middleName)
-				{
-					var middleNameNode:XMLNode = new XMLNode(1, 'MIDDLE');
-					middleNameNode.appendChild(new XMLNode(3, middleName));
-					
-					nameNode.appendChild(middleNameNode);
-				}
-				
-				if (lastName)
-				{
-					var lastNameNode:XMLNode = new XMLNode(1, 'FAMILY');
-					lastNameNode.appendChild(new XMLNode(3, lastName));
-					
-					nameNode.appendChild(lastNameNode);
-				}
-
-				vcardExtNode.appendChild(nameNode);
-			}
-			
-			if (fullName)
-			{
-				var fullnameNode:XMLNode = new XMLNode(1, 'FN');
-				fullnameNode.appendChild(new XMLNode(3, fullName));
-				
-				vcardExtNode.appendChild(fullnameNode);
-			}
-			
-			if (nickname)
-			{
-				var nicknameNode:XMLNode = new XMLNode(1, 'NICKNAME');
-				nicknameNode.appendChild(new XMLNode(3, nickname));
-				
-				vcardExtNode.appendChild(nicknameNode);
-			}
-			
-			if (email)
-			{
-				var emailNode:XMLNode = new XMLNode(1, 'EMAIL');
-				emailNode.appendChild(new XMLNode(3, 'INTERNET'));
-				emailNode.appendChild(new XMLNode(3, 'PREF'));
-				var userIdNode:XMLNode = new XMLNode(1, 'USERID');
-				userIdNode.appendChild(new XMLNode(3, email));
-				emailNode.appendChild(userIdNode);
-				
-				vcardExtNode.appendChild(emailNode);
-			}
-			
-			if (company || department)
-			{
-				var organizationNode:XMLNode = new XMLNode(1, 'ORG');
-				
-				if (company)
-				{
-					var companyNode:XMLNode = new XMLNode(1, 'ORGNAME');
-					companyNode.appendChild(new XMLNode(3, company));
-					
-					organizationNode.appendChild(companyNode);
-				}
-				
-				if (department)
-				{
-					var departmentNode:XMLNode = new XMLNode(1, 'ORGUNIT');
-					departmentNode.appendChild(new XMLNode(3, department));
-					
-					organizationNode.appendChild(departmentNode);
-				}
-				
-				vcardExtNode.appendChild(organizationNode);
-			}
-			
-			if (title)
-			{
-				var titleNode:XMLNode = new XMLNode(1, 'TITLE');
-				titleNode.appendChild(new XMLNode(3, title));
-				
-				vcardExtNode.appendChild(titleNode);
-			}
-			
-			if (url)
-			{
-				var urlNode:XMLNode = new XMLNode(1, 'URL');
-				urlNode.appendChild(new XMLNode(3, url));
-				
-				vcardExtNode.appendChild(urlNode);
-			}
-			
-			if (workAddress || workCity || workCountry || workPostalCode || workStateProvince)
-			{
-				var workAddressNode:XMLNode = new XMLNode(1, 'ADR');
-				workAddressNode.appendChild(new XMLNode(1, 'WORK'));
-				
-				if (workAddress)
-				{
-					var workStreetNode:XMLNode = new XMLNode(1, 'STREET');
-					workStreetNode.appendChild(new XMLNode(3, workAddress));
-					
-					workAddressNode.appendChild(workStreetNode);
-				}
-				
-				if (workCity)
-				{
-					var workCityNode:XMLNode = new XMLNode(1, 'LOCALITY');
-					workCityNode.appendChild(new XMLNode(3, workCity));
-					
-					workAddressNode.appendChild(workCityNode);
-				}
-				
-				if (workCountry)
-				{
-					var workCountryNode:XMLNode = new XMLNode(1, 'CTRY');
-					workCountryNode.appendChild(new XMLNode(3, workCountry));
-					
-					workAddressNode.appendChild(workCountryNode);
-				}
-				
-				if (workPostalCode)
-				{
-					var workPostalCodeNode:XMLNode = new XMLNode(1, 'PCODE');
-					workPostalCodeNode.appendChild(new XMLNode(3, workPostalCode));
-					
-					workAddressNode.appendChild(workPostalCodeNode);
-				}
-				
-				if (workStateProvince)
-				{
-					var workStateProvinceNode:XMLNode = new XMLNode(1, 'REGION');
-					workStateProvinceNode.appendChild(new XMLNode(3, workStateProvince));
-					
-					workAddressNode.appendChild(workStateProvinceNode);
-				}
-				
-				vcardExtNode.appendChild(workAddressNode);
-			}
-			
-			if (homeAddress || homeCity || homeCountry || homePostalCode || homeStateProvince)
-			{
-				var homeAddressNode:XMLNode = new XMLNode(1, 'ADR');
-				homeAddressNode.appendChild(new XMLNode(1, 'HOME'));
-				
-				if (homeAddress)
-				{
-					var homeStreetNode:XMLNode = new XMLNode(1, 'STREET');
-					homeStreetNode.appendChild(new XMLNode(3, homeAddress));
-					
-					homeAddressNode.appendChild(homeStreetNode);
-				}
-				
-				if (homeCity)
-				{
-					var homeCityNode:XMLNode = new XMLNode(1, 'LOCALITY');
-					homeCityNode.appendChild(new XMLNode(3, homeCity));
-					
-					homeAddressNode.appendChild(homeCityNode);
-				}
-				
-				if (homeCountry)
-				{
-					var homeCountryNode:XMLNode = new XMLNode(1, 'CTRY');
-					homeCountryNode.appendChild(new XMLNode(3, homeCountry));
-					
-					homeAddressNode.appendChild(homeCountryNode);
-				}
-				
-				if (homePostalCode)
-				{
-					var homePostalCodeNode:XMLNode = new XMLNode(1, 'PCODE');
-					homePostalCodeNode.appendChild(new XMLNode(3, homePostalCode));
-					
-					homeAddressNode.appendChild(homePostalCodeNode);
-				}
-				
-				if (homeStateProvince)
-				{
-					var homeStateProvinceNode:XMLNode = new XMLNode(1, 'REGION');
-					homeStateProvinceNode.appendChild(new XMLNode(3, homeStateProvince));
-					
-					homeAddressNode.appendChild(homeStateProvinceNode);
-				}
-				
-				vcardExtNode.appendChild(homeAddressNode);
-			}
-			
-			if (workCellNumber)
-			{
-				var workCellNode:XMLNode = new XMLNode(1, 'TEL');
-				workCellNode.appendChild(new XMLNode(1, 'WORK'));
-				workCellNode.appendChild(new XMLNode(1, 'CELL'));
-				var workCellNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workCellNumberNode.appendChild(new XMLNode(3, workCellNumber));
-				workCellNode.appendChild(workCellNumberNode);
-				
-				vcardExtNode.appendChild(workCellNode); 
-			}
-			
-			if (workFaxNumber)
-			{
-				var workFaxNode:XMLNode = new XMLNode(1, 'TEL');
-				workFaxNode.appendChild(new XMLNode(1, 'WORK'));
-				workFaxNode.appendChild(new XMLNode(1, 'FAX'));
-				var workFaxNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workFaxNumberNode.appendChild(new XMLNode(3, workFaxNumber));
-				workFaxNode.appendChild(workFaxNumberNode);
-				
-				vcardExtNode.appendChild(workFaxNode); 
-			}
-			
-			if (workPagerNumber)
-			{
-				var workPagerNode:XMLNode = new XMLNode(1, 'TEL');
-				workPagerNode.appendChild(new XMLNode(1, 'WORK'));
-				workPagerNode.appendChild(new XMLNode(1, 'PAGER'));
-				var workPagerNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workPagerNumberNode.appendChild(new XMLNode(3, workPagerNumber));
-				workPagerNode.appendChild(workPagerNumberNode);
-				
-				vcardExtNode.appendChild(workPagerNode); 
-			}
-			
-			if (workVoiceNumber)
-			{
-				var workVoiceNode:XMLNode = new XMLNode(1, 'TEL');
-				workVoiceNode.appendChild(new XMLNode(1, 'WORK'));
-				workVoiceNode.appendChild(new XMLNode(1, 'VOICE'));
-				var workVoiceNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				workVoiceNumberNode.appendChild(new XMLNode(3, workVoiceNumber));
-				workVoiceNode.appendChild(workVoiceNumberNode);
-				
-				vcardExtNode.appendChild(workVoiceNode); 
-				
-			}
-			
-			if (homeCellNumber)
-			{
-				var homeCellNode:XMLNode = new XMLNode(1, 'TEL');
-				homeCellNode.appendChild(new XMLNode(1, 'HOME'));
-				homeCellNode.appendChild(new XMLNode(1, 'CELL'));
-				var homeCellNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homeCellNumberNode.appendChild(new XMLNode(3, homeCellNumber));
-				homeCellNode.appendChild(homeCellNumberNode);
-				
-				vcardExtNode.appendChild(homeCellNode); 
-			}
-			
-			if (homeFaxNumber)
-			{
-				var homeFaxNode:XMLNode = new XMLNode(1, 'TEL');
-				homeFaxNode.appendChild(new XMLNode(1, 'HOME'));
-				homeFaxNode.appendChild(new XMLNode(1, 'FAX'));
-				var homeFaxNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homeFaxNumberNode.appendChild(new XMLNode(3, homeFaxNumber));
-				homeFaxNode.appendChild(homeFaxNumberNode);
-				
-				vcardExtNode.appendChild(homeFaxNode); 
-			}
-			
-			if (homePagerNumber)
-			{
-				var homePagerNode:XMLNode = new XMLNode(1, 'TEL');
-				homePagerNode.appendChild(new XMLNode(1, 'HOME'));
-				homePagerNode.appendChild(new XMLNode(1, 'PAGER'));
-				var homePagerNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homePagerNumberNode.appendChild(new XMLNode(3, homePagerNumber));
-				homePagerNode.appendChild(homePagerNumberNode);
-				
-				vcardExtNode.appendChild(homePagerNode); 
-			}
-			
-			if (homeVoiceNumber)
-			{
-				var homeVoiceNode:XMLNode = new XMLNode(1, 'TEL');
-				homeVoiceNode.appendChild(new XMLNode(1, 'HOME'));
-				homeVoiceNode.appendChild(new XMLNode(1, 'VOICE'));
-				var homeVoiceNumberNode:XMLNode = new XMLNode(1, 'NUMBER');
-				homeVoiceNumberNode.appendChild(new XMLNode(3, homeVoiceNumber));
-				homeVoiceNode.appendChild(homeVoiceNumberNode);
-				
-				vcardExtNode.appendChild(homeVoiceNode); 
-			}
-			
-			iq.addExtension(vcardExt);
-			con.send(iq);
-		}
-		
-		public function _vCardSent(resultIQ:IQ):void
-		{
-			if (resultIQ.type == IQ.ERROR_TYPE)
-			{
-				dispatchEvent(new VCardEvent(VCardEvent.ERROR, cache[resultIQ.to.unescaped.toString()], true, true));
-			}
-			else
-				delete cache[resultIQ.to.unescaped.toString()];		// Force profile refresh on next view
-		}
-		
-		public function handleVCard(iq:IQ):void 
-		{
-			var node:XMLNode = iq.getNode();
-			var vCardNode:XMLNode = node.childNodes[0];
-			if (!vCardNode) 
-				return;
-			
-		    for each(var child:XMLNode in vCardNode.childNodes) 
-		    {
-	            switch (child.nodeName) 
-	            {
-	            	case "PHOTO":
-						for each(var sChild:XMLNode in child.childNodes)
-						{
-							if(sChild.nodeName != 'BINVAL')
-								continue;
-							try
-		            		{
-		            			//sometimes we get a packet with just <BINVAL/> ... no idea why
-		            			if(sChild.childNodes.length == 0)
-		            				continue;
-		            			var value:String = sChild.childNodes[0].nodeValue;
-		            			if(value.length > 0)
-		            			{
-		                			_loader = new Loader();
-									var decoder:Base64Decoder = new Base64Decoder();
-									decoder.decode(value);
-									_imageBytes = decoder.flush();
-									dispatchEvent(new VCardEvent(VCardEvent.AVATAR_LOADED, this, true, false));
-								}
-							}
-							catch(e:Error)
-							{
-								trace("Error loading vcard image: " + e.message);
-							}
-						}
-						break;
-	                
-	                case "N":
-		                // Get Family Name.
-		                var xml:XML = new XML(child.toString());
-		                firstName = xml.GIVEN;
-		                middleName = xml.MIDDLE;
-		                lastName = xml.FAMILY;
-		                break;
-	                
-	                case "FN":
-		                var fullnameNode:XMLNode = child.childNodes[0];
-		                if(fullnameNode)
-		                	fullName = fullnameNode.nodeValue;
-		                break;
-	                
-	                case "NICKNAME":
-		                var nicknameNode:XMLNode = child.childNodes[0];
-		                if(nicknameNode)
-		                	nickname = nicknameNode.nodeValue;
-		                break;
-	                
-	                case "EMAIL":
-		                for each(var emailChild:XMLNode in child.childNodes)
-		                {
-		                	if(emailChild.nodeName == 'USERID')
-		                	{
-		                		if(emailChild.firstChild != null)
-		                			email = emailChild.firstChild.nodeValue;
-		                	}
-		                }
-		                break;
-					case "ORG":
-						var orgXML:XML = new XML(child.toString());
-						company = orgXML.ORGNAME;
-						department = orgXML.ORGUNIT;
-						break;
-					case "TITLE":
-						var titleNode:XMLNode = child.childNodes[0];
-		                if(titleNode)
-		                	title = titleNode.nodeValue;
-		                break;
-					case "URL":
-						var urlNode:XMLNode = child.childNodes[0];
-						if(urlNode)
-							url = urlNode.nodeValue;
-						break;
-					case "ADR":
-						var adrXML:XML = new XML(child.toString());
-						if(adrXML.WORK == '')
-						{
-							workPostalCode = adrXML.PCODE;
-							workStateProvince = adrXML.REGION;
-							workAddress = adrXML.STREET;
-							workCountry = adrXML.CTRY;
-							workCity = adrXML.LOCALITY;
-						}
-						else if(adrXML.HOME == '')
-						{
-							homePostalCode = adrXML.PCODE;
-							homeStateProvince = adrXML.REGION;
-							homeAddress = adrXML.STREET;
-							homeCountry = adrXML.CTRY;
-							homeCity = adrXML.LOCALITY;
-						}
-						break;
-					case "TEL":
-						var telXML:XML = new XML(child.toString());
-						if(telXML.WORK == '')
-						{
-							if(telXML.VOICE == '')
-								workVoiceNumber = telXML.NUMBER;
-							else if(telXML.FAX == '')
-								workFaxNumber = telXML.NUMBER;
-							else if(telXML.PAGER == '')
-								workPagerNumber = telXML.NUMBER;
-							else if(telXML.CELL == '')
-								workCellNumber = telXML.NUMBER;
-						}
-						else if(telXML.HOME == '')
-						{
-							if(telXML.VOICE == '')
-								homeVoiceNumber = telXML.NUMBER;
-							else if(telXML.FAX == '')
-								homeFaxNumber = telXML.NUMBER;
-							else if(telXML.PAGER == '')
-								homePagerNumber = telXML.NUMBER;
-							else if(telXML.CELL == '')
-								homeCellNumber = telXML.NUMBER;
-						}
-						break;
-                }
-	     	}	     
-	     	
-	     	loaded = true;
-	     	dispatchEvent(new VCardEvent(VCardEvent.LOADED, this, true, false));
-		}
-		
-		public function get avatar():ByteArray
-		{
-			return _imageBytes;
-		}
-	}
-}
\ No newline at end of file
