Examples of BuddyInfoManager


Examples of net.kano.joustsim.oscar.BuddyInfoManager

  }

  public String[] getGroupNames() {
    String[] groupNames;
    if (_connected && _conn != null) {
      BuddyInfoManager buddyInfoManager = _conn.getBuddyInfoManager();
      SsiService ssiService = _conn.getSsiService();
      MutableBuddyList buddyList = ssiService.getBuddyList();
      List groupsList = buddyList.getGroups();
      groupNames = new String[groupsList.size()];
      int groupNum = 0;
View Full Code Here

Examples of net.kano.joustsim.oscar.BuddyInfoManager

  }

  public String[] getBuddiesInGroupNamed(String groupName) {
    String[] buddyNames = null;
    if (_connected && _conn != null) {
      BuddyInfoManager buddyInfoManager = _conn.getBuddyInfoManager();
      SsiService ssiService = _conn.getSsiService();
      MutableBuddyList buddyList = ssiService.getBuddyList();
      List groupsList = buddyList.getGroups();
      Iterator groupsIter = groupsList.iterator();
      while (groupsIter.hasNext()) {
View Full Code Here

Examples of net.kano.joustsim.oscar.BuddyInfoManager

  }

  public void removeBuddy(String buddyName) {
    if (_connected && _conn != null) {
      Screenname buddyScreenName = new Screenname(buddyName);
      BuddyInfoManager buddyInfoManager = _conn.getBuddyInfoManager();
      SsiService ssiService = _conn.getSsiService();
      MutableBuddyList buddyList = ssiService.getBuddyList();
      List groups = buddyList.getGroups();
      Iterator groupsIter = groups.iterator();
      while (groupsIter.hasNext()) {
View Full Code Here

Examples of net.kano.joustsim.oscar.BuddyInfoManager

  public BuddyInfo _addBuddyIfNecessary(String buddyName) {
    BuddyInfo buddyInfo = null;
    if (_connected && _conn != null) {
      Screenname buddy = new Screenname(buddyName);
      BuddyInfoManager buddyInfoManager = _conn.getBuddyInfoManager();
      buddyInfo = buddyInfoManager.getBuddyInfo(buddy);
      boolean isOnBuddyList = false;
      if (buddyInfo != null) {
        isOnBuddyList = buddyInfo.isOnBuddyList();
      }
      if (!isOnBuddyList) {
        SsiService ssiService = _conn.getSsiService();
        MutableBuddyList buddyList = ssiService.getBuddyList();
        List groups = buddyList.getGroups();
        if (groups.size() == 0) {
          buddyList.addGroup("Buddies");
          groups = buddyList.getGroups();
        }
        MutableGroup group = (MutableGroup) groups.get(0);
        group.addBuddy(buddyName);

        for (int attempt = 0; attempt < 10 && !buddyInfo.isOnBuddyList(); attempt++) {
          try {
            Thread.sleep(100);
          }
          catch (Throwable t) {
            // ignore
          }
          buddyInfo = buddyInfoManager.getBuddyInfo(buddy);
        }
      }
    }
    return buddyInfo;
  }
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.