Package org.jivesoftware.smackx.packet

Examples of org.jivesoftware.smackx.packet.VCard.load()


                if(connection == null || !connection.isAuthenticated())
                    return null;

                VCard card = new VCard();
                card.load(connection, contactAddress);

                String tmp = null;

                tmp = checkForFullName(card);
                if(tmp != null)
View Full Code Here


    messageField.setText("Retrieving vCard information ...");
    new Thread() {
      public void run() {
        try{
          VCard newVCard = new VCard();
          newVCard.load(account.xmpp.getConnection(), user);
          vCard = newVCard;
          System.out.println("vCard Loaded Successfully");
          vCShell.getDisplay().asyncExec(new Runnable() {
            public void run() {
              messageField.setText("vCard Retrieved Successfully");
View Full Code Here

            public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
              monitor.beginTask("Retrieving VCard.",2);
              monitor.worked(1);
              VCard vCard = new VCard();
              try {
                vCard.load(account.xmpp.getConnection(),lastJid);
              } catch (XMPPException e) {
                // ignored for now ...
                //throw new RuntimeException(e);
              }
              String nickname = vCard.getNickName();
View Full Code Here

        assertEquals("Should load own VCard successfully", origVCard.toString(), loaded.toString());

        loaded = new VCard();
        try {
            loaded.load(getConnection(1), getBareJID(0));
        } catch (XMPPException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

        card.save(getConnection(0));
        System.out.println(card.getChildElementXML());

        VCard loaded = new VCard();
        try {
            loaded.load(getConnection(0));
        }
        catch (XMPPException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

        System.out.println(StringUtils.encodeBase64(loaded.getAvatar()));
        assertEquals("Should load own Avatar successfully", card.getAvatar(), loaded.getAvatar());

        loaded = new VCard();
        try {
            loaded.load(getConnection(1), getBareJID(0));
        }
        catch (XMPPException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

        origVCard.save(getConnection(0));

        VCard loaded = new VCard();
        try {
            loaded.load(getConnection(0));
        } catch (XMPPException e) {
            e.printStackTrace();
            fail(e.getMessage());
        }
View Full Code Here

        for (RosterEntry entry : entries) {
            String entryName = entry.getName();
            VCard vCard = new VCard();
            try {
                if (!domain[1].equalsIgnoreCase("gmail.com") && !domain[1].equalsIgnoreCase("chat.facebook.com")) {
                    vCard.load(connection, entry.getUser()); // load someone's VCard
                    entryName = vCard.getFirstName();
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
View Full Code Here

  public VCardInfo getVCard(String jabberId) {
    assert isConnectedAndAuthenticated() : "Not connected or authenticated";
    VCard vCard = new VCard();
    try {
      if (jabberId == null) {
        vCard.load(myConnection);
      } else {
        vCard.load(myConnection, jabberId);
      }
    } catch (XMPPException e) {
      return new VCardInfo("N/A", "N/A", "N/A");
View Full Code Here

    VCard vCard = new VCard();
    try {
      if (jabberId == null) {
        vCard.load(myConnection);
      } else {
        vCard.load(myConnection, jabberId);
      }
    } catch (XMPPException e) {
      return new VCardInfo("N/A", "N/A", "N/A");
    }
    return new VCardInfo(vCard.getFirstName(), vCard.getLastName(), vCard.getNickName());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.