Exemple #1
0
  /**
   * Handles adding a chat room provider.
   *
   * @param provider the provider.
   * @param addQueryResult indicates whether we should add the chat room to the query results or
   *     fire an event without adding it to the results.
   */
  private void providerAdded(ChatRoomProviderWrapper provider, boolean addQueryResult) {

    for (int i = 0; i < provider.countChatRooms(); i++) {
      ChatRoomWrapper chatRoom = provider.getChatRoom(i);
      addChatRoom(
          provider.getProtocolProvider(),
          chatRoom.getChatRoomName(),
          chatRoom.getChatRoomID(),
          addQueryResult,
          chatRoom.isAutojoin());
    }
  }
Exemple #2
0
 /**
  * Test equality of contact to chat room wrapper. This method does not rely on a chat room
  * instance, since that may not be available in case of removal.
  *
  * @param contact the contact
  * @param chatRoomWrapper the chat room wrapper
  * @return returns <tt>true</tt> if they are equal, or <tt>false</tt> if they are different.
  */
 private boolean contactEqualsChatRoom(
     final ChatRoomSourceContact contact, final ChatRoomWrapper chatRoomWrapper) {
   return contact.getProvider() == chatRoomWrapper.getParentProvider().getProtocolProvider()
       && contact.getContactAddress().equals(chatRoomWrapper.getChatRoomID());
 }