[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/, /sip-communicator/src/net/java/sip/communicator/impl/protocol...

yanas at dev.java.net yanas at dev.java.net
Wed May 30 18:46:34 CEST 2007


User: yanas   
Date: 2007-05-30 16:46:34+0000
Added:
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberNewAccountDialog.java
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources/servercomments.xml

Modified:
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistration.java
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources.properties
   sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf
   sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
   sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
   sip-communicator/build.xml

Log:
 "Register new account for Jabber" - a plugin from Nicolas Grandclaude

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/
===================================================================================

File [changed]: JabberAccountRegistrationWizard.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistrationWizard.java?r1=1.10&r2=1.11
Delta lines:  +15 -4
--------------------
--- JabberAccountRegistrationWizard.java	2007-02-27 15:33:00+0000	1.10
+++ JabberAccountRegistrationWizard.java	2007-05-30 16:46:31+0000	1.11
@@ -6,14 +6,17 @@
  */
 package net.java.sip.communicator.plugin.jabberaccregwizz;
 
+import java.awt.*;
 import java.util.*;
 
-import org.osgi.framework.*;
+import javax.swing.*;
+
 import net.java.sip.communicator.impl.gui.customcontrols.*;
-import net.java.sip.communicator.plugin.gibberishaccregwizz.*;
 import net.java.sip.communicator.service.gui.*;
 import net.java.sip.communicator.service.protocol.*;
 
+import org.osgi.framework.*;
+
 /**
  * The <tt>JabberAccountRegistrationWizard</tt> is an implementation of the
  * <tt>AccountRegistrationWizard</tt> for the Jabber protocol. It should allow
@@ -121,6 +124,7 @@
 
     /**
      * Installs the account created through this wizard.
+     * 
      * @return ProtocolProviderService
      */
     public ProtocolProviderService finish()
@@ -136,6 +140,7 @@
 
     /**
      * Creates an account for the given user and password.
+     * 
      * @param providerFactory the ProtocolProviderFactory which will create
      * the account
      * @param user the user identifier
@@ -164,6 +169,12 @@
         accountProperties.put("SEND_KEEP_ALIVE",
                               String.valueOf(registration.isSendKeepAlive()));
 
+        accountProperties.put("RESOURCE",
+                              registration.getResource());
+
+        accountProperties.put("PRIORITY",
+                              String.valueOf(registration.getPriority()));
+
         if (isModification)
         {
             providerFactory.uninstallAccount(protocolProvider.getAccountID());
@@ -202,11 +213,11 @@
      */
     public void loadAccount(ProtocolProviderService protocolProvider)
     {
-
         this.protocolProvider = protocolProvider;
 
         this.firstWizardPage.loadAccount(protocolProvider);
 
         isModification = true;
     }
+
 }

File [added]: JabberNewAccountDialog.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberNewAccountDialog.java?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 372
----------------
/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.plugin.jabberaccregwizz;

import java.awt.*;
import java.awt.event.*;
import java.io.*;

import javax.imageio.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;

import net.java.sip.communicator.util.*;

import org.jivesoftware.smack.*;

/**
 * Dialog for adding a new Jabber account.
 * 
 * @author Nicolas Grandclaude
 */
public class JabberNewAccountDialog
    extends JDialog
    implements
    DocumentListener
{
    private static final Logger logger = Logger
        .getLogger(JabberNewAccountDialog.class);

    private JabberServerChooserDialog jabberServerChooserDialog;

    // Panels
    private JPanel userIDPassPanel = new JPanel(new BorderLayout(10, 10));

    private JPanel labelsPanel = new JPanel(new GridLayout(0, 1, 10, 10));

    private JPanel valuesPanel = new JPanel(new GridLayout(0, 1, 10, 10));

    private JPanel serverPanel = new JPanel(new BorderLayout(10, 10));

    private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));

    private Box buttonBox = new Box(BoxLayout.X_AXIS);

    private JPanel mainPanel = new JPanel(new BorderLayout());

    private JPanel westPanel = new JPanel(new BorderLayout(10, 10));

    // Labels
    private JLabel serverLabel = new JLabel(Resources.getString("cserver"));

    private JLabel userIDLabel = new JLabel(Resources.getString("userID"));

    private JLabel passLabel = new JLabel(Resources.getString("password"));

    private JLabel pass2Label = new JLabel(Resources.getString("password2"));

    private JLabel portLabel = new JLabel(Resources.getString("port"));

    private JLabel westIconLabel = new JLabel();

    // Textfield
    private JTextField serverField = new JTextField();

    private JTextField userIDField = new JTextField();

    private JPasswordField passField = new JPasswordField();

    private JPasswordField pass2Field = new JPasswordField();

    private JTextField portField = new JTextField("5222");

    // Button
    private JButton chooseButton = new JButton();

    private JButton okButton = new JButton();

    private JButton cancelButton = new JButton();

    // Smack objects
    private XMPPConnection xmppConnection = null;

    private AccountManager accountManager = null;

    // Variables for FirstWizardPage
    public boolean isOK = false;

    public String userID = null;

    public String password = null;

    public String server = null;

    public String port = null;

    private LoadingAccountGlassPane loadingAccountGlassPane
        = new LoadingAccountGlassPane();
    
    /**
     * Creates an instance of <tt>JabberNewAccountDialog</tt>.
     */
    public JabberNewAccountDialog()
    {
        this.setSize(new Dimension(450, 250));
        this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        this.setTitle(Resources.getString("newAccountTitle"));
        this.setModal(true);
        this.setGlassPane(loadingAccountGlassPane);

        // Place the window in the screen center
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        this.setLocation(screenSize.width / 2 - this.getWidth() / 2,
            screenSize.height / 2 - this.getHeight() / 2);

        this.init();
    }

    /**
     * Connect to the choose server and create a new account with Smack
     * 
     * @param server the server domain
     * @param port TCP port to connect
     * @param username username
     * @param password password
     */
    private boolean addNewAccount(String server, int port, String username,
        String password)
    {
        try
        {
            ConnectionConfiguration config = new ConnectionConfiguration(
                server, port);

            xmppConnection = new XMPPConnection(config);
            xmppConnection.connect();

            accountManager = new AccountManager(xmppConnection);
            accountManager.createAccount(username, password);
            return true;
        }
        catch (XMPPException exc)
        {
            if (exc.getXMPPError().getCode() == 409)
            {
                JOptionPane.showMessageDialog(null, Resources
                    .getString("userExist"), Resources.getString("xmppError"),
                    JOptionPane.ERROR_MESSAGE);
                
                logger.error(
                    "Error when created a new Jabber account : user already exist");
            }
            else
            {
                JOptionPane.showMessageDialog(null, Resources
                    .getString("unknownXmppError"), Resources
                    .getString("xmppError"), JOptionPane.ERROR_MESSAGE);
            }
            return false;
        }
    }

    /**
     * Initializes all panels, buttons, etc.
     */
    private void init()
    {

        labelsPanel.add(serverLabel);
        labelsPanel.add(userIDLabel);
        labelsPanel.add(passLabel);
        labelsPanel.add(pass2Label);
        labelsPanel.add(portLabel);

        userIDField.setColumns(30);

        serverPanel.add(serverField, BorderLayout.CENTER);
        serverPanel.add(chooseButton, BorderLayout.EAST);
        valuesPanel.add(serverPanel);
        valuesPanel.add(userIDField);
        valuesPanel.add(passField);
        valuesPanel.add(pass2Field);
        valuesPanel.add(portField);

        serverField.getDocument().addDocumentListener(this);
        userIDField.getDocument().addDocumentListener(this);
        passField.getDocument().addDocumentListener(this);
        pass2Field.getDocument().addDocumentListener(this);
        portField.getDocument().addDocumentListener(this);

        userIDPassPanel.add(labelsPanel, BorderLayout.WEST);
        userIDPassPanel.add(valuesPanel, BorderLayout.CENTER);

        chooseButton.setText(Resources.getString("chooseLabel"));
        chooseButton.setMnemonic(Resources.getMnemonic("chooseLabel"));

        westIconLabel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(20, 20, 20, 20), BorderFactory
                .createTitledBorder("")));
        try
        {
            westIconLabel.setIcon(new ImageIcon(ImageIO
                .read(new ByteArrayInputStream(Resources
                    .getImage(Resources.PAGE_IMAGE)))));
        }
        catch (IOException e)
        {
            logger.error("Could not read image.", e);
        }

        westPanel.add(westIconLabel, BorderLayout.NORTH);
        this.mainPanel.add(westPanel, BorderLayout.WEST);

        // Choose button open the JabberServerChooserDialog
        chooseButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent evt)
            {
                jabberServerChooserDialog = new JabberServerChooserDialog();
                if (jabberServerChooserDialog.isOK) // OK pressed in
                                                    // JabberServerChooserDialog
                {
                    serverField
                        .setText(jabberServerChooserDialog.serverSelected);
                }
            }
        });

        // Ok button
        okButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent evt)
            {
                if (new String(passField.getPassword()).equals(new String(
                    pass2Field.getPassword())))                    
                { // the two password fields are the same
                    new Thread()
                    {
                        public void run()
                        {
                            boolean result = addNewAccount(serverField.getText(),
                               Integer.parseInt(portField.getText()),
                               userIDField.getText(),
                               new String(passField.getPassword()));
                            
                            if (result == true)
                            {
                                // Update FirstWizardDialog field
                                isOK = true;
                                userID = new String(userIDField.getText());
                                password = new String(passField.getPassword());
                                server = new String(serverField.getText());
                                port = new String(portField.getText());
                                dispose();
                            }
                        }
                    }.start();
                    
                    loadingAccountGlassPane.setVisible(true);
                }
                else
                {
                    JOptionPane.showMessageDialog(null, Resources
                        .getString("notSamePassword"), Resources
                        .getString("xmppError"), JOptionPane.ERROR_MESSAGE);
                }
            }
        });

        // Cancel button
        cancelButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent evt)
            {
                dispose();
            }
        });

        okButton.setText(Resources.getString("okLabel"));
        okButton.setMnemonic(Resources.getMnemonic("okLabel"));
        okButton.setEnabled(false);

        cancelButton.setText(Resources.getString("cancelLabel"));
        cancelButton.setMnemonic(Resources.getMnemonic("cancelLabel"));

        buttonBox.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
        buttonBox.add(okButton);
        buttonBox.add(Box.createHorizontalStrut(10));
        buttonBox.add(cancelButton);

        buttonPanel.add(buttonBox);

        this.mainPanel.add(userIDPassPanel, BorderLayout.CENTER);
        this.mainPanel.add(buttonPanel, BorderLayout.SOUTH);

        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        this.getContentPane().add(mainPanel, BorderLayout.NORTH);

        this.setVisible(true);
    }

    /**
     * Sets the "Ok" button enabled if all fields are filled.
     */ 
    private void enableOKButton()
    {
        okButton.setEnabled(false);
        try
        {
            Integer.parseInt(portField.getText());
        }
        catch (NumberFormatException ex)
        {
            okButton.setEnabled(false);
            return;
        }

        if (serverField.getText().equals("")
            || userIDField.getText().equals("")
            || (new String(passField.getPassword())).equals("")
            || (new String(pass2Field.getPassword())).equals(""))
        {
            okButton.setEnabled(false);
        }
        else
        {
            okButton.setEnabled(true);
        }
    }

    public void insertUpdate(DocumentEvent evt)
    {
        this.enableOKButton();
    }

    public void removeUpdate(DocumentEvent evt)
    {
        this.enableOKButton();
    }

    public void changedUpdate(DocumentEvent evt)
    {
    }

    public void pageHiding()
    {
    }

    public void pageShown()
    {
    }

    public void pageBack()
    {
    }
    
    /**
     * A GlassPane that would change the cursor to a waiting cursor until the
     * new account is registered.
     */
    private class LoadingAccountGlassPane extends JComponent
    {
        public LoadingAccountGlassPane()
        {
            this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        }
    }
}

File [changed]: FirstWizardPage.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/FirstWizardPage.java?r1=1.9&r2=1.10
Delta lines:  +167 -57
----------------------
--- FirstWizardPage.java	2007-02-22 12:38:51+0000	1.9
+++ FirstWizardPage.java	2007-05-30 16:46:31+0000	1.10
@@ -15,23 +15,32 @@
 
 import net.java.sip.communicator.service.gui.*;
 import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
 
 /**
- * The <tt>FirstWizardPage</tt> is the page, where user could enter the user ID
- * and the password of the account.
+ * The <tt>FirstWizardPage</tt> is the page, where user could enter the user
+ * ID and the password of the account.
  *
  * @author Yana Stamcheva
  * @author Damian Minkov
  */
 public class FirstWizardPage
-    extends JPanel implements WizardPage, DocumentListener
+    extends JPanel
+    implements
+    WizardPage,
+    DocumentListener
 {
+    private static final Logger logger = Logger
+        .getLogger(FirstWizardPage.class);
 
     public static final String FIRST_PAGE_IDENTIFIER = "FirstPageIdentifier";
 
     private static final String GOOGLE_USER_SUFFIX = "gmail.com";
+
     private static final String GOOGLE_CONNECT_SRV = "talk.google.com";
 
+    private JabberNewAccountDialog jabberNewAccountDialog;
+
     private JPanel userIDPassPanel = new JPanel(new BorderLayout(10, 10));
 
     private JPanel labelsPanel = new JPanel();
@@ -42,8 +51,8 @@
 
     private JLabel passLabel = new JLabel(Resources.getString("password"));
 
-    private JLabel existingAccountLabel
-        = new JLabel(Resources.getString("existingAccount"));
+    private JLabel existingAccountLabel = new JLabel(Resources
+        .getString("existingAccount"));
 
     private JPanel emptyPanel = new JPanel();
 
@@ -53,8 +62,8 @@
 
     private JPasswordField passField = new JPasswordField();
 
-    private JCheckBox rememberPassBox = new JCheckBox(
-        Resources.getString("rememberPassword"));
+    private JCheckBox rememberPassBox = new JCheckBox(Resources
+        .getString("rememberPassword"));
 
     private JPanel advancedOpPanel = new JPanel(new BorderLayout(10, 10));
 
@@ -62,18 +71,38 @@
 
     private JPanel valuesAdvOpPanel = new JPanel(new GridLayout(0, 1, 10, 10));
 
-    private JCheckBox sendKeepAliveBox = new JCheckBox(
-        Resources.getString("sendKeepAlive"));
+    private JCheckBox sendKeepAliveBox = new JCheckBox(Resources
+        .getString("sendKeepAlive"));
+
+    private JCheckBox enableAdvOpButton = new JCheckBox(Resources
+        .getString("ovverideServerOps"), false);
+
+    private JLabel resourceLabel = new JLabel("Resource");
 
-    private JCheckBox enableAdvOpButton = new JCheckBox(
-        Resources.getString("ovverideServerOps"), false);
+    private JTextField resourceField = new JTextField("sip-comm");
+
+    private JLabel priorityLabel = new JLabel("Priority");
+
+    private JTextField priorityField = new JTextField("10");
 
     private JLabel serverLabel = new JLabel(Resources.getString("server"));
+
     private JTextField serverField = new JTextField();
 
     private JLabel portLabel = new JLabel(Resources.getString("port"));
+
     private JTextField portField = new JTextField("5222");
 
+    private JPanel registerPanel = new JPanel(new GridLayout(0, 1));
+
+    private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
+
+    private JTextArea registerArea = new JTextArea(Resources
+        .getString("registerNewAccountText"));
+
+    private JButton registerButton = new JButton(Resources
+        .getString("registerNewAccount"));
+
     private JPanel mainPanel = new JPanel();
 
     private Object nextPageIdentifier = WizardPage.SUMMARY_PAGE_IDENTIFIER;
@@ -84,10 +113,10 @@
 
     /**
      * Creates an instance of <tt>FirstWizardPage</tt>.
-     * @param registration the <tt>JabberAccountRegistration</tt>, where
-     * all data through the wizard are stored
-     * @param wizardContainer the wizardContainer, where this page will
-     * be added
+     * 
+     * @param registration the <tt>JabberAccountRegistration</tt>, where all
+     *            data through the wizard are stored
+     * @param wizardContainer the wizardContainer, where this page will be added
      */
     public FirstWizardPage(JabberAccountRegistration registration,
                            WizardContainer wizardContainer)
@@ -99,7 +128,7 @@
 
         this.registration = registration;
 
-        this.setPreferredSize(new Dimension(300, 150));
+        this.setPreferredSize(new Dimension(300, 480));
 
         mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));
 
@@ -107,9 +136,11 @@
 
         this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
 
-        this.labelsPanel.setLayout(new BoxLayout(labelsPanel, BoxLayout.Y_AXIS));
+        this.labelsPanel
+            .setLayout(new BoxLayout(labelsPanel, BoxLayout.Y_AXIS));
 
-        this.valuesPanel.setLayout(new BoxLayout(valuesPanel, BoxLayout.Y_AXIS));
+        this.valuesPanel
+            .setLayout(new BoxLayout(valuesPanel, BoxLayout.Y_AXIS));
     }
 
     /**
@@ -118,13 +149,14 @@
     private void init()
     {
         this.userIDField.getDocument().addDocumentListener(this);
+        this.resourceField.getDocument().addDocumentListener(this);
         this.rememberPassBox.setSelected(true);
 
         this.existingAccountLabel.setForeground(Color.RED);
 
         this.userIDExampleLabel.setForeground(Color.GRAY);
-        this.userIDExampleLabel.setFont(userIDExampleLabel.getFont().deriveFont(
-            8));
+        this.userIDExampleLabel.setFont(userIDExampleLabel.getFont()
+            .deriveFont(8));
         this.emptyPanel.setMaximumSize(new Dimension(40, 35));
         this.userIDExampleLabel.setBorder(BorderFactory.createEmptyBorder(0, 0,
             8, 0));
@@ -141,14 +173,15 @@
         userIDPassPanel.add(valuesPanel, BorderLayout.CENTER);
         userIDPassPanel.add(rememberPassBox, BorderLayout.SOUTH);
 
-        userIDPassPanel.setBorder(BorderFactory
-                                  .createTitledBorder(Resources.getString(
-                                      "userIDAndPassword")));
+        userIDPassPanel.setBorder(BorderFactory.createTitledBorder(Resources
+            .getString("userIDAndPassword")));
 
         mainPanel.add(userIDPassPanel);
 
         serverField.setEditable(false);
         portField.setEditable(false);
+        resourceField.setEditable(false);
+        priorityField.setEditable(false);
 
         enableAdvOpButton.addActionListener(new ActionListener()
         {
@@ -159,30 +192,54 @@
 
                 serverField.setEditable(cb.isSelected());
                 portField.setEditable(cb.isSelected());
+                resourceField.setEditable(cb.isSelected());
+                priorityField.setEditable(cb.isSelected());
             }
         });
 
         portField.getDocument().addDocumentListener(new DocumentListener()
         {
             public void changedUpdate(DocumentEvent evt)
-            {}
+            {
+            }
 
             public void insertUpdate(DocumentEvent evt)
             {
-                setNextButtonAccordingToPort();
+                setNextButtonAccordingToPortAndPriority();
             }
 
             public void removeUpdate(DocumentEvent evt)
             {
-                setNextButtonAccordingToPort();
+                setNextButtonAccordingToPortAndPriority();
+            }
+        });
+
+        priorityField.getDocument().addDocumentListener(new DocumentListener()
+        {
+            public void changedUpdate(DocumentEvent evt)
+            {
+            }
+
+            public void insertUpdate(DocumentEvent evt)
+            {
+                setNextButtonAccordingToPortAndPriority();
+            }
+
+            public void removeUpdate(DocumentEvent evt)
+            {
+                setNextButtonAccordingToPortAndPriority();
             }
         });
 
         labelsAdvOpPanel.add(serverLabel);
         labelsAdvOpPanel.add(portLabel);
+        labelsAdvOpPanel.add(resourceLabel);
+        labelsAdvOpPanel.add(priorityLabel);
 
         valuesAdvOpPanel.add(serverField);
         valuesAdvOpPanel.add(portField);
+        valuesAdvOpPanel.add(resourceField);
+        valuesAdvOpPanel.add(priorityField);
 
         JPanel checkBoxesPanel = new JPanel(new GridLayout(0, 1, 10, 10));
         checkBoxesPanel.add(sendKeepAliveBox);
@@ -192,18 +249,57 @@
         advancedOpPanel.add(labelsAdvOpPanel, BorderLayout.WEST);
         advancedOpPanel.add(valuesAdvOpPanel, BorderLayout.CENTER);
 
-        advancedOpPanel.setBorder(BorderFactory
-                                  .createTitledBorder(Resources.getString(
-                                      "advancedOptions")));
+        advancedOpPanel.setBorder(BorderFactory.createTitledBorder(Resources
+            .getString("advancedOptions")));
 
         mainPanel.add(advancedOpPanel);
 
+        registerButton.addActionListener(new ActionListener()
+        {
+            public void actionPerformed(ActionEvent evt)
+            {
+                logger.debug("Reg OK");
+                
+                // Open the new account dialog.
+                
+                jabberNewAccountDialog = new JabberNewAccountDialog(); 
+                
+                if (jabberNewAccountDialog.isOK == true)
+                {
+                    serverField.setText(jabberNewAccountDialog.server);
+                    portField.setText(jabberNewAccountDialog.port);
+                    
+                    // This userIDField contains the username "@" the server.
+                    userIDField.setText(jabberNewAccountDialog.userID + "@"
+                        + jabberNewAccountDialog.server);
+                    
+                    passField.setText(jabberNewAccountDialog.password);
+                }
+                logger.debug("Reg End");
+            }
+        });
+
+        buttonPanel.add(registerButton);
+
+        registerArea.setEditable(false);
+        registerArea.setOpaque(false);
+        registerArea.setLineWrap(true);
+        registerArea.setWrapStyleWord(true);
+
+        registerPanel.add(registerArea);
+        registerPanel.add(buttonPanel);
+
+        registerPanel.setBorder(BorderFactory.createTitledBorder(Resources
+            .getString("registerNewAccount")));
+
+        mainPanel.add(registerPanel);
+
         this.add(mainPanel, BorderLayout.NORTH);
     }
 
     /**
-     * Implements the <code>WizardPage.getIdentifier</code> to return
-     * this page identifier.
+     * Implements the <code>WizardPage.getIdentifier</code> to return this
+     * page identifier.
      *
      * @return the id of the first wizard page.
      */
@@ -235,8 +331,8 @@
     }
 
     /**
-     * Implements the <code>WizardPage.getWizardForm</code> to return
-     * this panel.
+     * Implements the <code>WizardPage.getWizardForm</code> to return this
+     * panel.
      *
      * @return this wizard page.
      */
@@ -251,7 +347,7 @@
      */
     public void pageShowing()
     {
-        this.setNextButtonAccordingToUserID();
+        this.setNextButtonAccordingToUserIDAndResource();
     }
 
     /**
@@ -278,12 +374,16 @@
 
             registration.setServerAddress(serverField.getText());
             registration.setSendKeepAlive(sendKeepAliveBox.isSelected());
+            registration.setResource(resourceField.getText());
             try
             {
                 registration.setPort(Integer.parseInt(portField.getText()));
+                registration.setPriority(Integer.parseInt(priorityField
+                    .getText()));
             }
             catch (NumberFormatException ex)
-            {}
+            {
+            }
         }
     }
 
@@ -291,9 +391,11 @@
      * Enables or disables the "Next" wizard button according to whether the
      * UserID field is empty.
      */
-    private void setNextButtonAccordingToUserID()
+    private void setNextButtonAccordingToUserIDAndResource()
     {
-        if (userIDField.getText() == null || userIDField.getText().equals(""))
+        if (userIDField.getText() == null || userIDField.getText().equals("")
+            || resourceField.getText() == null
+            || resourceField.getText().equals(""))
         {
             wizardContainer.setNextFinishButtonEnabled(false);
         }
@@ -312,7 +414,7 @@
      */
     public void insertUpdate(DocumentEvent evt)
     {
-        this.setNextButtonAccordingToUserID();
+        this.setNextButtonAccordingToUserIDAndResource();
         this.setServerFieldAccordingToUserID();
     }
 
@@ -325,7 +427,7 @@
      */
     public void removeUpdate(DocumentEvent evt)
     {
-        this.setNextButtonAccordingToUserID();
+        this.setNextButtonAccordingToUserIDAndResource();
         this.setServerFieldAccordingToUserID();
     }
 
@@ -348,14 +450,15 @@
     /**
      * Fills the User ID and Password fields in this panel with the data comming
      * from the given protocolProvider.
-     * @param protocolProvider The <tt>ProtocolProviderService</tt> to load the
-     * data from.
+     * 
+     * @param protocolProvider The <tt>ProtocolProviderService</tt> to load
+     *            the data from.
      */
     public void loadAccount(ProtocolProviderService protocolProvider)
     {
         AccountID accountID = protocolProvider.getAccountID();
-        String password = (String) accountID.getAccountProperties()
-            .get(ProtocolProviderFactory.PASSWORD);
+        String password = (String) accountID.getAccountProperties().get(
+            ProtocolProviderFactory.PASSWORD);
 
         this.userIDField.setText(accountID.getUserID());
 
@@ -367,8 +470,8 @@
     }
 
     /**
-     * Parse the server part from the jabber id and set it to server
-     * as default value. If Advanced option is enabled Do nothing.
+     * Parse the server part from the jabber id and set it to server as default
+     * value. If Advanced option is enabled Do nothing.
      */
     private void setServerFieldAccordingToUserID()
     {
@@ -394,12 +497,12 @@
     /**
      * Disables Next Button if Port field value is incorrect
      */
-    private void setNextButtonAccordingToPort()
+    private void setNextButtonAccordingToPortAndPriority()
     {
         try
         {
-            String portValue = portField.getText();
             new Integer(portField.getText());
+            new Integer(priorityField.getText());
             wizardContainer.setNextFinishButtonEnabled(true);
         }
         catch (NumberFormatException ex)
@@ -408,10 +511,17 @@
         }
     }
 
+    /**
+     * Checks if the accountName corresponds to an already existing account.
+     * 
+     * @param accountName the name of the account to check
+     * @return TRUE if an account with the specified name already exists, FALSE -
+     * otherwise. 
+     */
     private boolean isExistingAccount(String accountName)
     {
-        ProtocolProviderFactory factory
-            = JabberAccRegWizzActivator.getJabberProtocolProviderFactory();
+        ProtocolProviderFactory factory = JabberAccRegWizzActivator
+            .getJabberProtocolProviderFactory();
 
         ArrayList registeredAccounts = factory.getRegisteredAccounts();
 

File [changed]: Resources.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/Resources.java?r1=1.3&r2=1.4
Delta lines:  +43 -5
--------------------
--- Resources.java	2007-02-27 15:33:00+0000	1.3
+++ Resources.java	2007-05-30 16:46:31+0000	1.4
@@ -39,16 +39,54 @@
      */
     public static String getString(String key)
     {
+        String resourceString;
         try
         {
-            return RESOURCE_BUNDLE.getString(key);
+            resourceString = RESOURCE_BUNDLE.getString(key);
 
+            int mnemonicIndex = resourceString.indexOf('&');
+            
+            if(mnemonicIndex > -1)
+            {                
+                String firstPart = resourceString.substring(0, mnemonicIndex);
+                String secondPart = resourceString.substring(mnemonicIndex + 1);
+                
+                resourceString = firstPart.concat(secondPart);
+            }
         }
         catch (MissingResourceException e)
         {
+            resourceString = '!' + key + '!';
+        }
 
-            return '!' + key + '!';
+        return resourceString;
         }
+
+    /**
+     * Returns an internationalized string corresponding to the given key.
+     * @param key The key of the string.
+     * @return An internationalized string corresponding to the given key.
+     */
+    public static char getMnemonic(String key)
+    {
+        String resourceString;
+        try {
+            resourceString = RESOURCE_BUNDLE.getString(key);
+            
+            int mnemonicIndex = resourceString.indexOf('&');
+            
+            if(mnemonicIndex > -1)
+            {
+                return resourceString.charAt(mnemonicIndex + 1);
+            }
+
+        }
+        catch (MissingResourceException e)
+        {            
+            return '!';
+        }
+        
+        return '!';
     }
 
     /**

File [changed]: JabberAccountRegistration.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccountRegistration.java?r1=1.5&r2=1.6
Delta lines:  +24 -0
--------------------
--- JabberAccountRegistration.java	2007-02-22 12:39:00+0000	1.5
+++ JabberAccountRegistration.java	2007-05-30 16:46:31+0000	1.6
@@ -25,6 +25,10 @@
 
     private int port;
 
+	private String resource;
+
+	private int priority;
+
     private boolean sendKeepAlive;
 
     /**
@@ -135,4 +139,24 @@
     {
         this.sendKeepAlive = sendKeepAlive;
     }
+
+    public String getResource()
+    {
+        return resource;
+    }
+
+    public void setResource(String resource)
+	{
+		this.resource = resource;
+	}
+
+    public int getPriority()
+    {
+        return priority;
+    }
+
+    public void setPriority(int priority)
+	{
+		this.priority = priority;
+	}
 }

File [changed]: resources.properties
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources.properties?r1=1.7&r2=1.8
Delta lines:  +22 -2
--------------------
--- resources.properties	2007-02-27 15:33:00+0000	1.7
+++ resources.properties	2007-05-30 16:46:31+0000	1.8
@@ -1,15 +1,35 @@
 protocolName=Jabber
 protocolDescription=The Jabber protocol
-userID=Jabber id:
-password=Password:
+userID=Jabber id
+username=Jabber username
+password=Password
+password2=Confirm password
 rememberPassword=Remember password
 userIDAndPassword=ID and Password
 advancedOptions=Advanced Options
 ovverideServerOps=Override server default options
+cserver=Server
 server=Connect Server
 port=Port
 sendKeepAlive=Send keep alive packets
 existingAccount=* The account you entered is already installed.
+newAccountTitle=Jabber new account registration
+registerNewAccount=Register new account
+registerNewAccountText=In case you don't have a Jabber account, click on this button to create a new one.
+chooseTitle=Jabber new account server chooser
+chooseServerText=Choose the server for your new account in the list below.
+okLabel=&Ok
+cancelLabel=C&ancel
+chooseLabel=&Choose
+serverColumn=Server
+commentColumn=Comment
+
+xmppError=XMPP Error
+userExist=This user already exist on this server. Choose another user or server.
+unknownXmppError=Unknown XMPP error. Verify that the server name is correct.
+notSamePassword=The two entered password aren't the same.
+
+commentsFile=classes/net/java/sip/communicator/plugin/jabberaccregwizz/resources/servercomments.xml
 
 protocolIcon=resources/images/jabber/jabber16x16-online.png
 pageImage=resources/images/jabber/jabber48x48.png

File [changed]: jabberaccregwizz.manifest.mf
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf?r1=1.2&r2=1.3
Delta lines:  +8 -1
-------------------
--- jabberaccregwizz.manifest.mf	2006-11-22 13:15:49+0000	1.2
+++ jabberaccregwizz.manifest.mf	2007-05-30 16:46:31+0000	1.3
@@ -14,6 +14,12 @@
  net.java.sip.communicator.service.contactlist.event,
  net.java.sip.communicator.service.gui,
  net.java.sip.communicator.service.gui.event,
+ net.java.sip.communicator.service.fileaccess,
+ javax.naming,
+ javax.naming.directory,
+ javax.xml.parsers,
+ org.w3c.dom,
+ org.xml.sax,
  javax.swing,
  javax.swing.event,
  javax.swing.table,
@@ -27,4 +33,5 @@
  javax.swing.filechooser,
  javax.swing.tree,
  javax.swing.undo,
- javax.swing.border
+ javax.swing.border,
+ javax.net.ssl

File [added]: JabberServerChooserDialog.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberServerChooserDialog.java?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 378
----------------
/*
 * SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package net.java.sip.communicator.plugin.jabberaccregwizz;

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.util.*;

import javax.imageio.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.xml.parsers.*;

import net.java.sip.communicator.service.fileaccess.*;
import net.java.sip.communicator.util.*;

import org.osgi.framework.*;
import org.w3c.dom.*;
import org.xml.sax.*;

/**
 * A dialog that shows the list of available Jabber servers.
 * 
 * @author Nicolas Grandclaude
 */
public class JabberServerChooserDialog
    extends JDialog
    implements ListSelectionListener
{
    private static final Logger logger = Logger
        .getLogger(JabberServerChooserDialog.class);

    private static final String DEFAULT_FILE_NAME = "jabberservers.xml";

    // Servers Table
    private JTable serversTable;

    private JTextArea chooseArea = new JTextArea(Resources
        .getString("chooseServerText"));

    // Panel
    private JPanel mainPanel = new JPanel(new BorderLayout());

    private JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));

    private Box buttonBox = new Box(BoxLayout.X_AXIS);

    private JPanel chooseAreaPanel = new JPanel(new BorderLayout());

    private JPanel westPanel = new JPanel(new BorderLayout(10, 10));

    private JPanel eastPanel = new JPanel(new BorderLayout(10, 10));

    private JLabel westIconLabel = new JLabel();

    private JButton okButton = new JButton(Resources.getString("okLabel"));

    private JButton cancelButton = new JButton(Resources
        .getString("cancelLabel"));

    private Vector servers = new Vector();
    
    private FileAccessService faService = null;

    private String[] columnNames =
    { Resources.getString("serverColumn"), Resources.getString("commentColumn") };

    public boolean isOK = false;

    public String serverSelected;

    /**
     * Creates an instance of <tt>JabberServerChooserDialog</tt>.
     */
    public JabberServerChooserDialog()
    {        
        this.setSize(new Dimension(550, 450));
        this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
        this.setTitle(Resources.getString("chooseTitle"));
        this.setModal(true);

        // Place the window in the center
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        this.setLocation(screenSize.width / 2 - this.getWidth() / 2,
            screenSize.height / 2 - this.getHeight() / 2);

        this.init();        
    }
    /**
     * Initializes all panels, buttons, etc.
     */
    private void init()
    {
        chooseArea.setEditable(false);
        chooseArea.setOpaque(false);
        chooseArea.setLineWrap(true);
        chooseArea.setWrapStyleWord(true);

        chooseAreaPanel
            .setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 10));
        
        chooseAreaPanel.add(chooseArea, BorderLayout.NORTH);

        eastPanel.add(chooseAreaPanel, BorderLayout.NORTH);

        // West Jabber icon
        westIconLabel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createEmptyBorder(20, 20, 20, 20), BorderFactory
                .createTitledBorder("")));
        try
        {
            westIconLabel.setIcon(new ImageIcon(ImageIO
                .read(new ByteArrayInputStream(Resources
                    .getImage(Resources.PAGE_IMAGE)))));
        }
        catch (IOException e)
        {
            logger.error("Could not read image.", e);
        }
        
        this.westPanel.add(westIconLabel, BorderLayout.NORTH);
        this.mainPanel.add(westPanel, BorderLayout.WEST);
        
        // Table with servers and comments
        serversTable = new JTable(new ServerChooserTableModel());
        serversTable.setRowHeight(22);
        serversTable.getSelectionModel().addListSelectionListener(this);
        serversTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        serversTable.setPreferredScrollableViewportSize(new Dimension(500, 70));

        // Fill the servers array with servers from servers.xml
        fillTable();

        JScrollPane scrollPane = new JScrollPane(serversTable);
        eastPanel.add(scrollPane, BorderLayout.CENTER);

        // Ok button
        okButton.setText(Resources.getString("okLabel"));
        okButton.setMnemonic(Resources.getMnemonic("okLabel"));
        okButton.setEnabled(false);

        // Cancel button
        cancelButton.setText(Resources.getString("cancelLabel"));
        cancelButton.setMnemonic(Resources.getMnemonic("cancelLabel"));

        // Box with Ok and Cancel
        buttonBox.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
        buttonBox.add(okButton);
        buttonBox.add(Box.createHorizontalStrut(10));
        buttonBox.add(cancelButton);
        buttonPanel.add(buttonBox);

        okButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent evt)
            {
                isOK = true;
                dispose();
            }
        });

        cancelButton.addActionListener(new ActionListener()
        {
            public void actionPerformed(ActionEvent evt)
            {
                dispose();
            }
        });

        this.mainPanel.add(eastPanel, BorderLayout.CENTER);
        this.mainPanel.add(buttonPanel, BorderLayout.SOUTH);

        mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        this.getContentPane().add(mainPanel, BorderLayout.CENTER);

        this.setVisible(true);
    }


    /**
     * Fill the servers array variable with data from the remote servers.xml
     */
    public void fillTable()
    {
        BundleContext bc = JabberAccRegWizzActivator.bundleContext;

        ServiceReference faServiceReference = bc
            .getServiceReference(FileAccessService.class.getName());

        faService = (FileAccessService) bc.getService(faServiceReference);

        try
        {
            File localServersListFile = faService
                .getPrivatePersistentFile(DEFAULT_FILE_NAME);

            // Get the file containing the servers list.
            if (!localServersListFile.exists())
            {
                try
                {
                    localServersListFile.createNewFile();
                }
                catch (IOException e)
                {
                    logger.error("Failed to create file"
                        + localServersListFile.getAbsolutePath(), e);
                }
            }
            
            try
            {
                URL file = new URL("http://www.jabber.org/servers.xml");
                InputStream stream = file.openStream();
                
                try
                {
                    // Copy the remote file to the disk
                    byte[] buf = new byte[2048];
                    int len;
                    if (stream.available() > 0)
                    {
                        FileOutputStream fos
                            = new FileOutputStream(localServersListFile);
                        
                        while ((len = stream.read(buf)) > 0)
                        {
                            fos.write(buf, 0, len);
                        }
                        fos.close();
                    }
                } finally
                {
                    stream.close();
                }
            }
            catch (Exception e)
            {
                logger.error("");
            }

            FileInputStream fis = new FileInputStream(localServersListFile);
            DocumentBuilderFactory factory = DocumentBuilderFactory
                .newInstance();
            DocumentBuilder constructor = factory.newDocumentBuilder();
            Document document = constructor.parse(fis);
            Element root = document.getDocumentElement();

            NodeList list = root.getElementsByTagName("item");

            // Read the xml and fill servers variable for the JTable
            for (int i = 0; i < list.getLength(); i++)
            {
                Element e = (Element) list.item(i);
                servers.add(new String(e.getAttribute("jid")));
            }
            fis.close();

        }
        catch (Exception e)
        {
            logger.error(
                "Failed to get a reference to the Jabber servers list file.", e);
        }
    }

    /**
     * When a table row is selected enable the "Ok" button, otherwise disable it.
     */
    public void valueChanged(ListSelectionEvent e)
    {
        int row = serversTable.getSelectedRow();
        if (row != -1)
        {
            okButton.setEnabled(true);
            serverSelected = (String) serversTable.getValueAt(row, 0);
        }
        else
        {
            okButton.setEnabled(false);
        }

    }
    
    /**
     * The table model used for the table containing all servers. 
     */
    private class ServerChooserTableModel extends AbstractTableModel
    {
        private Document serverComments;
        
        private NodeList commentsList;
        
        public ServerChooserTableModel()
        {    
            try
            {
                // Create a builder factory
                DocumentBuilderFactory factory
                    = DocumentBuilderFactory.newInstance();
                
                // Create the builder and parse the file
                serverComments = factory.newDocumentBuilder()
                    .parse(new File(Resources.getString("commentsFile")));   
            }
            catch (SAXException e)
            {
                logger.error("Failed to parse: " + DEFAULT_FILE_NAME, e);
            }
            catch (ParserConfigurationException e)
            {
                logger.error("Failed to parse: " + DEFAULT_FILE_NAME, e);
            }
            catch (IOException e)
            {
                logger.error("Failed to parse: " + DEFAULT_FILE_NAME, e);
            }
            

            Element root = serverComments.getDocumentElement();

            commentsList = root.getElementsByTagName("item");

        }
            
        public int getColumnCount()
        {
            return 2;
        }

        public int getRowCount()
        {
            return servers.size();
        }

        public String getColumnName(int col)
        {
            return columnNames[col];
        }

        public Object getValueAt(int row, int col)
        {
            String commentString = new String("");
            if (col == 0) // Column 1 (Server name)
            {
                return servers.get(row);
            }
            else
            { // Column 2 (Comment)
                
                int i = 0;
                Element e = (Element) commentsList.item(i);

                while ((i < commentsList.getLength())
                    && (e.getAttribute("jid").equals(servers.get(row)) == false))
                {
                    e = (Element) commentsList.item(i);
                    i++;
                }

                if (e.getAttribute("jid").equals(servers.get(row)))
                {
                    commentString = e.getAttribute("comment");
                }
                
                return commentString;
            }
        }
    }
}

Directory: /sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/
================================================================================

File [changed]: OperationSetPersistentPresenceJabberImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java?r1=1.17&r2=1.18
Delta lines:  +23 -1
--------------------
--- OperationSetPersistentPresenceJabberImpl.java	2007-05-15 09:01:02+0000	1.17
+++ OperationSetPersistentPresenceJabberImpl.java	2007-05-30 16:46:31+0000	1.18
@@ -107,6 +107,8 @@
 
     private JabberSubscriptionListener subscribtionPacketListener = null;
 
+    private int resourcePriority = 10;
+    
     public OperationSetPersistentPresenceJabberImpl(
         ProtocolProviderServiceJabberImpl provider)
     {
@@ -416,7 +418,7 @@
         {
             presence = new Presence(Presence.Type.available);
             presence.setMode(presenceStatusToJabberMode((JabberStatusEnum)status));
-
+            presence.setPriority(resourcePriority);
             presence.setStatus(statusMessage);
             presence.addExtension(new Version());
 
@@ -1167,4 +1169,24 @@
             }
         }
     }
+    
+    /**
+     * Returns the jabber account resource priority property value.
+     * 
+     * @return the jabber account resource priority property value
+     */
+    public int getResourcePriority()
+    {
+        return resourcePriority;
+    }
+
+    /**
+     * Updates the jabber account resource priority property value.
+     * 
+     * @param resourcePriority the new priority to set
+     */
+    public void setResourcePriority(int resourcePriority)
+    {
+        this.resourcePriority = resourcePriority;
+    }
 }

File [changed]: ProtocolProviderServiceJabberImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java?r1=1.31&r2=1.32
Delta lines:  +20 -2
--------------------
--- ProtocolProviderServiceJabberImpl.java	2007-04-23 18:12:23+0000	1.31
+++ ProtocolProviderServiceJabberImpl.java	2007-05-30 16:46:31+0000	1.32
@@ -11,6 +11,7 @@
 
 import org.jivesoftware.smack.*;
 import org.jivesoftware.smack.util.*;
+import org.jivesoftware.smack.packet.*;
 
 import net.java.sip.communicator.impl.protocol.gibberish.*;
 import net.java.sip.communicator.service.protocol.*;
@@ -261,6 +262,10 @@
                     getAccountProperties().get(
                             ProtocolProviderFactory.SERVER_PORT);
 
+				String accountResource = (String)getAccountID().
+                    getAccountProperties().get(
+                            ProtocolProviderFactory.RESOURCE);
+
                 // check to see is there SRV records for this server domain
                 try
                 {
@@ -314,7 +319,11 @@
                         , RegistrationState.REGISTERING
                         , RegistrationStateChangeEvent.REASON_NOT_SPECIFIED
                         , null);
-                connection.login(userID, password, "sip-comm");
+
+                if(accountResource == null || accountResource == "")
+                    accountResource = "sip-comm";
+                
+                connection.login(userID, password, accountResource);
 
                 if(connection.isAuthenticated())
                 {
@@ -447,10 +456,19 @@
             String keepAliveStrValue = (String)accountID.getAccountProperties().
                                 get("SEND_KEEP_ALIVE");
 
+            String resourcePriority = (String)accountID.getAccountProperties().
+                get(ProtocolProviderFactory.RESOURCE_PRIORITY);
+
             //initialize the presence operationset
-            OperationSetPersistentPresence persistentPresence =
+            OperationSetPersistentPresenceJabberImpl persistentPresence =
                 new OperationSetPersistentPresenceJabberImpl(this);
 
+            if(resourcePriority != null)
+            {
+                persistentPresence.setResourcePriority(
+                    new Integer(resourcePriority).intValue());
+            }
+            
             supportedOperationSets.put(
                 OperationSetPersistentPresence.class.getName(),
                 persistentPresence);

Directory: /sip-communicator/
=============================

File [changed]: build.xml
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/build.xml?r1=1.140&r2=1.141
Delta lines:  +8 -0
-------------------
--- build.xml	2007-04-26 21:39:52+0000	1.140
+++ build.xml	2007-05-30 16:46:31+0000	1.141
@@ -751,6 +751,9 @@
             <sysproperty key="java.net.preferIPv6Addresses"
                 value="false"/>
 
+        	<!--sysproperty key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
+        	        	                value="${user.home}"/-->
+        	
             <!-- Setting properties necessary for dependencies on native libs.-->
             <sysproperty key="java.library.path" path="${ld.library.path}:${path}:${dyld.library.path}"/>
             <env key="LD_LIBRARY_PATH" path="${ld.library.path}"/>
@@ -1367,6 +1370,11 @@
             manifest="src/net/java/sip/communicator/plugin/jabberaccregwizz/jabberaccregwizz.manifest.mf">
             <zipfileset dir="${dest}/net/java/sip/communicator/plugin/jabberaccregwizz"
                 prefix="net/java/sip/communicator/plugin/jabberaccregwizz"/>
+			<zipfileset src="${lib.noinst}/smack.jar" prefix=""/>
+			<zipfileset src="${lib.noinst}/smackx.jar" prefix=""/>
+			<zipfileset src="${lib.noinst}/smackx-jingle.jar" prefix=""/>
+            <zipfileset src="${lib.noinst}/retroweaver-rt-2.0.jar" prefix=""/>
+            <zipfileset src="${lib.noinst}/backport-util-concurrent.jar" prefix=""/>
             <zipfileset dir="resources/images/jabber"
                             prefix="resources/images/jabber"/>
         </jar>

Directory: /sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources/
=============================================================================================

File [added]: servercomments.xml
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/plugin/jabberaccregwizz/resources/servercomments.xml?rev=1.1&content-type=text/vnd.viewcvs-markup
Added lines: 5
--------------
<!-- This file lists the open Jabber servers registered with the XMPP Federation. The format of this file is defined by the Service Discovery protocol: http://www.xmpp.org/extensions/xep-0030.html ... To add your server to the list, register at https://www.xmpp.net/ -->

<query xmlns='http://jabber.org/protocol/disco#items'>
  <item jid='jabber.org' comment='Jabber Software Foundation Server'/>
</query>




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net





More information about the commits mailing list