コード例 #1
0
  /**
   * Removes the user interface related to the given protocol provider.
   *
   * @param protocolProvider the protocol provider to remove
   */
  public void removeProtocolProviderUI(ProtocolProviderService protocolProvider) {
    OperationSetBasicTelephony<?> telOpSet =
        protocolProvider.getOperationSet(OperationSetBasicTelephony.class);

    if (telOpSet != null) {
      telOpSet.removeCallListener(androidCallListener);
    }

    OperationSetPresence presenceOpSet =
        protocolProvider.getOperationSet(OperationSetPresence.class);

    if (presenceOpSet != null) {
      presenceOpSet.removeProviderPresenceStatusListener(androidPresenceListener);
    }

    // Removes all chat session for unregistered provider
    ChatSessionManager.removeAllChatsForProvider(protocolProvider);
  }
コード例 #2
0
 /**
  * Removes the registration of a <tt>NewChatListener</tt>.
  *
  * @param listener listener to be unregistered
  */
 public void removeChatListener(ChatListener listener) {
   ChatSessionManager.removeChatListener(listener);
 }
コード例 #3
0
 /**
  * Registers a <tt>NewChatListener</tt> to be informed when new <tt>Chats</tt> are created.
  *
  * @param listener listener to be registered
  */
 public void addChatListener(ChatListener listener) {
   ChatSessionManager.addChatListener(listener);
 }
コード例 #4
0
 /**
  * Provides all currently instantiated <tt>Chats</tt>.
  *
  * @return all active <tt>Chats</tt>.
  */
 public Collection<Chat> getAllChats() {
   return ChatSessionManager.getActiveChats();
 }
コード例 #5
0
 /**
  * Returns the selected <tt>Chat</tt>.
  *
  * @return the selected <tt>Chat</tt>.
  */
 public Chat getCurrentChat() {
   return ChatSessionManager.getCurrentChatSession();
 }
コード例 #6
0
 /**
  * Returns a list of all open Chats
  *
  * @return A list of all open Chats
  */
 public List<Chat> getChats() {
   return ChatSessionManager.getActiveChats();
 }
コード例 #7
0
 /**
  * Returns the <tt>Chat</tt> corresponding to the given <tt>Contact</tt>.
  *
  * @param contact the <tt>Contact</tt> for which the searched chat is about.
  * @return the <tt>Chat</tt> corresponding to the given <tt>Contact</tt>.
  */
 public Chat getChat(Contact contact) {
   return ChatSessionManager.findChatForContact(contact, true);
 }