Examples of GOIMRosterEvent


Examples of net.sphene.goim.rcp.beans.GOIMRosterEvent

  public void changeStatus(Presence.Type type, Presence.Mode mode, boolean byuser) {
    if(type == Presence.Type.UNAVAILABLE) {
      Presence previousPresence = lastPresenceSent;
      conn.close();conn = null;lastPresenceSent = null;roster = null;
      ownPresenceChanged.fireEvent(new StatusChangedEvent(this,previousPresence));
      rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_MODIFIED, null));
      return;
    }
    Presence presence = new Presence(type);
    presence.setMode(mode);
    StringBuffer status = new StringBuffer();
View Full Code Here

Examples of net.sphene.goim.rcp.beans.GOIMRosterEvent

    changeStatus(type,mode,true);
    roster = conn.getRoster();
    roster.addRosterListener(new RosterListener(){
      public void rosterModified() {
//        System.out.println("rosterModified()");
        rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_MODIFIED,null));
      }
      public void presenceChanged(String jid) {
//        System.out.println("Presence Changed: " + jid);
        rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_PRESENCE_CHANGED,jid));
      }
      // TODO Find a better solution for this .. maybe forward all of the three events !
      // (Since smack 2.1 the rosterModified() method is split up in the following three methods)
      public void entriesAdded(Collection arg0) {
        rosterModified();
      }
      public void entriesUpdated(Collection arg0) {
        rosterModified();
      }
      public void entriesDeleted(Collection arg0) {
        rosterModified();
      }});
    rosterListener.fireEvent(new GOIMRosterEvent(XMPPManager.this,GOIMRosterEvent.TYPE_MODIFIED,null));
    GOIMPlugin.gameStatusChanged.addListener(new SpheneListener<GameStatusChangeEvent>() {
      public void handleEvent(GameStatusChangeEvent event) {
        changeStatus(lastPresenceSent.getType(),lastPresenceSent.getMode(),false);
      }
    });
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.