Package org.eclipse.ecf.presence

Examples of org.eclipse.ecf.presence.IPresenceContainerAdapter


    progressMonitor.beginTask(Messages.BrowseDialog_scanning, containers.length);
   
    // cycle through all the containers and grab entries
    for (int i = 0; i < containers.length; i++) {
      IContainer container = containers[i];
      IPresenceContainerAdapter presenceContainer =
        (IPresenceContainerAdapter) container.getAdapter(IPresenceContainerAdapter.class);
      if (presenceContainer != null) {
        IRosterManager manager = presenceContainer.getRosterManager();
        if (manager != null) {
          Collection items =
            manager.getRoster().getItems();
          for(Iterator it = items.iterator(); it.hasNext(); ) {
            IRosterItem item = (IRosterItem) it.next();
View Full Code Here


    addContactButton.addMouseListener(new MouseAdapter() {
      public void mouseUp(MouseEvent e) {
        TableItem contact = tableResult.getSelection()[0];
        if (MessageDialog.openConfirm(null, Messages.AddContactDialog_DialogTitle, NLS.bind(Messages.SearchContactDialog_AddContactMessage, contact.getText(0)))) {

          IPresenceContainerAdapter ipca = account.getPresenceContainerAdapter();
          IRosterSubscriptionSender sender = ipca.getRosterManager().getRosterSubscriptionSender();
          try {
            sender.sendRosterAdd(contact.getText(1), contact.getText(0), null);
          } catch (ECFException e1) {
            Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e1.getLocalizedMessage(), e1));
          }
View Full Code Here

    }
  }

  protected void sendPrivateTextMsg(IUser data) {
    if (this.view.lch != null) {
      IPresenceContainerAdapter ipca = this.view.lch.getPresenceContainer();
      MessagesView messagesView = this.view.lch.findMessagesView();
      if (messagesView != null) {
        IChatManager chatManager = ipca.getChatManager();
        messagesView.openTab(chatManager.getChatMessageSender(), chatManager.getTypingMessageSender(), this.view.lch.getContainerID(), data.getID());
      }
    }
  }
View Full Code Here

  /**
   * @param presenceContainerAdapter
   */
  private void openContainer(IContainer container) {
    final IPresenceContainerAdapter presenceContainerAdapter = (IPresenceContainerAdapter) container.getAdapter(IPresenceContainerAdapter.class);
    final IChatManager chatManager = presenceContainerAdapter.getChatManager();
    final IRosterManager rosterManager = presenceContainerAdapter.getRosterManager();
    if (chatManager != null && rosterManager != null) {
      try {
        // get local ID
        final XMPPID localID = (XMPPID) rosterManager.getRoster().getUser().getID();
        final Namespace ns = container.getConnectNamespace();
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.presence.IPresenceContainerAdapter

Copyright © 2018 www.massapicom. 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.