Examples of Buddy


Examples of hamsam.api.Buddy

    }

    if(who == null)
      return;

    Buddy buddy = new Buddy(this, who, where);

    if(status == 0)
      listener.buddyAdded(buddy);
    else if(status == 2)
      listener.buddyAddFailed(buddy, "This user is already present in your buddy list");
View Full Code Here

Examples of hamsam.api.Buddy

    }

    if(who == null)
      return;

    Buddy buddy = new Buddy(this, who, where);

    if(success)
      listener.buddyDeleted(buddy);
    else
      listener.buddyDeleteFailed(buddy, "This user is not in your buddy list");
View Full Code Here

Examples of hamsam.api.Buddy

    }

    if(who == null)
      return;

    Buddy buddy = new Buddy(this, who);

    /*
     * status
     *   0  - ok
     *   2  - already in ignore list, could not add
View Full Code Here

Examples of hamsam.api.Buddy

  private SwitchboardServer startSBSession(Buddy buddy) throws IllegalStateException
  {
    try
    {
      NotificationServer ns = checkValidNotificationServer();
      Buddy host = new Buddy(this, username);
      Buddy[] participants = new Buddy[2];
      participants[0] = host;
      participants[1] = buddy;
      Conference conf = new Conference(this, host, participants);
      ns.startSBSession(conf);
View Full Code Here

Examples of hamsam.api.Buddy

    if (source == ok) {
      //if buddy name is given
      if (checkValues()) {
        //if no group is defined
        if (groupField.equals("")) {
          newBuddy = new Buddy(ConnectionInfos.currentProtocol,
                               nameField.getText());
        }
        else {
          newBuddy = new Buddy(ConnectionInfos.currentProtocol,
                     nameField.getText(),
                     groupField.getText());
        }
        Traces.printTraces("New buddy created");
        Traces.printTraces("name     : " + newBuddy.getUsername());
View Full Code Here

Examples of net.kano.joustsim.oscar.oscar.service.ssi.Buddy

      MutableBuddyList buddyList = ssiService.getBuddyList();
      List groups = buddyList.getGroups();
      Iterator groupsIter = groups.iterator();
      while (groupsIter.hasNext()) {
        MutableGroup group = (MutableGroup) groupsIter.next();
        Buddy matchingBuddy = null;
        Iterator buddiesIter = group.getBuddiesCopy().iterator();
        while (matchingBuddy == null && buddiesIter.hasNext()) {
          Buddy buddy = (Buddy) buddiesIter.next();
          if (buddy.getScreenname().equals(buddyScreenName)) {
            matchingBuddy = buddy;
          }
        }
        if (matchingBuddy != null) {
          group.deleteBuddy(matchingBuddy);
View Full Code Here

Examples of net.solosky.maplefetion.bean.Buddy

      if(buddy.getUri().equals(this.mainBuddy.getUri())) {
              this.closeDialog();
      }else {    //移除对应离开的好友
        Iterator<Buddy> it = this.buddyList.iterator();
        while(it.hasNext()) {
          Buddy b = it.next();
          if(b.getUri().equals(buddy.getUri())) {
            it.remove();
            break;
          }
        }
      }
View Full Code Here

Examples of net.solosky.maplefetion.bean.Buddy

  @Override
  public void handle(SipcNotify notify) throws FetionException {
    Element root = XMLHelper.build(notify.getBody().toSendString());
    Element node = XMLHelper.find(root, "/is-composing/state");
    String  state = node.getText();
    Buddy   from  = context.getFetionStore().getBuddyByUri(notify.getFrom());
    ChatDialogProxy chatDialogProxy = this.context.getChatDialogProxyFactoy().create(from);
    if("nudge".equals(state)){
      this.tryFireNotifyEvent(new ChatNudgeEvent(chatDialogProxy));
    }else if("input".equals(state)){
      this.tryFireNotifyEvent(new ChatInputEvent(chatDialogProxy));
View Full Code Here

Examples of net.solosky.maplefetion.bean.Buddy

      .createDefaultReceipt(notify.getFrom(), Integer.toString(notify.getCallID()), notify.getSequence());
      this.dialog.process(receipt);
     
      //查找消息是哪个好友发送的
        FetionStore store = this.context.getFetionStore();
      Buddy from   = store.getBuddyByUri(notify.getFrom());
      String body  = notify.getBody()!=null?notify.getBody().toSendString():""//防止产生NULL错误
      Message msg  = this.parseMessage(notify);
     
      //如果好友没有找到,可能是陌生人发送的信息,
      if(from==null) {
View Full Code Here

Examples of net.solosky.maplefetion.bean.Buddy

     */
    @Override
    public void sendSMS(String uri, final String msg)
    {
      try{
          Buddy buddy = this.client.getFetionStore().getBuddyByUri(uri);
          ChatDialogProxy dialog = this.client.getChatDialogProxyFactory().create(buddy);
        dialog.sendChatMessage(new Message(msg), new DefaultActionListener("发送消息[ "+msg+" ]给"+buddy.getDisplayName()));
        } catch (FetionException e) {
          println("建立对话框时出错"+e.getMessage());
        }
    }
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.