Package org.cybergarage.upnp

Examples of org.cybergarage.upnp.Action.postControlAction()


            _logger.info("Couldn't find GetExternalIPAddress action!");
            return null;
        }


        if (!getIP.postControlAction()) {
                _logger.info("couldn't get our external address");
                return null;
        }

        Argument ret = getIP.getOutputArgumentList().getArgument("NewExternalIPAddress");
View Full Code Here


    add.setArgumentValue("NewProtocol",m._protocol);
    add.setArgumentValue("NewPortMappingDescription",m._description);
    add.setArgumentValue("NewEnabled","1");
    add.setArgumentValue("NewLeaseDuration",0);

    boolean success = add.postControlAction();
        _logger.info("Post succeeded: " + success);
    return success;
  }

  /**
 
View Full Code Here

    remove.setArgumentValue("NewRemoteHost",m._externalAddress);
    remove.setArgumentValue("NewExternalPort",m._externalPort);
    remove.setArgumentValue("NewProtocol",m._protocol);

    boolean success = remove.postControlAction();
        _logger.info("Remove succeeded: " + success);
    return success;
  }

  /**
 
View Full Code Here

      try {
        for (int i=0;;i++) {
            getGeneric.setArgumentValue("NewPortMappingIndex",i);
                _logger.info("Stale Iteration: " + i + ", generic.input: " + list(getGeneric.getInputArgumentList()) + ", generic.output: " + list(getGeneric.getOutputArgumentList()));

          if (!getGeneric.postControlAction())
            break;

          mappings.add(new Mapping(
              getGeneric.getArgumentValue("NewRemoteHost"),
              getGeneric.getArgumentValue("NewExternalPort"),
View Full Code Here

    Action addPortAct = dev.getAction("GetExternalIPAddress");
    if (addPortAct == null) {
      showWarnning("GetExternalIPAddress is not found");
      return "";
    }
    if (addPortAct.postControlAction() == true)
      return addPortAct.getArgumentValue("NewExternalIPAddress");
    return "";
  }
 
  private void addPortMapping(UpnpIGDToolAddPortDlg addPortDlg)
View Full Code Here

      "(" + addPortDlg.getProtocol() + ") : " +
      addPortDlg.getExternalPort() + " -> " +
      addPortDlg.getInternalIP() + ":" +
      addPortDlg.getInternalPort();
   
    if (addPortAct.postControlAction() == true) {
      UPnPStatus upnpStat = addPortAct.getStatus();
      String msg = "New port mapping is created\n" + actionMsg;
      showMessage(msg);
    }
    else {
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.