Examples of PhoneControlMessage


Examples of org.jdesktop.wonderland.modules.phone.common.messages.PhoneControlMessage

    }

    public void messageReceived(final WonderlandClientSender sender,
      final WonderlandClientID clientID, final CellMessage message) {

  PhoneControlMessage msg = (PhoneControlMessage) message;

  logger.fine("got message " + msg);

  PhoneCellMO phoneCellMO = (PhoneCellMO) getCell();

  if (message instanceof LockUnlockMessage) {
      LockUnlockMessage m = (LockUnlockMessage) message;

      boolean successful = true;

      PhoneInfo phoneInfo = phoneCellMO.getPhoneInfo();

      if (m.getPassword() != null) {
    String password = System.getProperty("wonderland.phone.password");

    if (password == null || password.length() == 0) {
            password = phoneInfo.password;
    }

    successful = m.getPassword().equals(password);
      }

      if (successful) {
    phoneInfo.locked = !phoneInfo.locked;
          phoneInfo.keepUnlocked = m.keepUnlocked();
      }

      logger.fine("locked " + phoneInfo.locked + " successful "
    + successful + " pw " + m.getPassword());

            LockUnlockResponseMessage response =
    new LockUnlockResponseMessage(phoneCellMO.getCellID(), phoneInfo.locked, successful);

      sender.send(response);
      return;
        }

  VoiceManager vm = AppContext.getManager(VoiceManager.class);

        CallListing listing = msg.getCallListing();
             
  String externalCallID = getExternalCallID(listing);

  Call externalCall = vm.getCall(externalCallID);
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.