Examples of NvHTTP


Examples of com.limelight.nvstream.http.NvHTTP

  }

  public static String pair(final String uniqueId, final String host) {
    String message = "";

    NvHTTP httpConn;
    try {
      httpConn = new NvHTTP(InetAddress.getByName(host),
          uniqueId, PlatformBinding.getDeviceName(), PlatformBinding.getCryptoProvider());
      try {
        if (httpConn.getPairState() == PairingManager.PairState.PAIRED) {
          message = "Already paired";
        }
        else {
          final String pinStr = PairingManager.generatePinString();
         
          // Spin the dialog off in a thread because it blocks
          new Thread(new Runnable() {
            public void run() {
              JOptionPane.showMessageDialog(null, "Please enter the following PIN on the target PC: "+pinStr,
                  "Limelight", JOptionPane.INFORMATION_MESSAGE);
            }
          }).start();
         
          PairingManager.PairState pairState = httpConn.pair(pinStr);
          if (pairState == PairingManager.PairState.PIN_WRONG) {
            message = "Incorrect PIN";
          }
          else if (pairState == PairingManager.PairState.FAILED) {
            message = "Pairing failed";
View Full Code Here

Examples of com.limelight.nvstream.http.NvHTTP

 
  /**
   * Pair the device with the host
   */
  private void pair() {
    NvHTTP httpConn;
 
    httpConn = new NvHTTP(host,
      getUniqueId(), PlatformBinding.getDeviceName(), PlatformBinding.getCryptoProvider());
    try {
      if (httpConn.getPairState() == PairingManager.PairState.PAIRED) {
        displayError("pair", "Already paired");
      } else {
        final String pinStr = PairingManager.generatePinString();

        displayMessage("Please enter the following PIN on the target PC: "+pinStr);

        PairingManager.PairState pairState = httpConn.pair(pinStr);
        if (pairState == PairingManager.PairState.PIN_WRONG) {
          displayError("pair", "Incorrect PIN");
        }
        else if (pairState == PairingManager.PairState.FAILED) {
          displayError("pair", "Pairing failed");
View Full Code Here

Examples of com.limelight.nvstream.http.NvHTTP

      displayError("Pair", e.getMessage());
    }
  }
 
  private void listApps() {
    NvHTTP conn = new NvHTTP(host, getUniqueId(), PlatformBinding.getDeviceName(), PlatformBinding.getCryptoProvider());
    displayMessage("Search apps");
    try {
      List<NvApp> apps = conn.getAppList();
      for (NvApp app:apps) {
        displayMessage(" " + app.getAppName() + (app.getIsRunning()?" (running)":""));
      }
    } catch (Exception e) {
      displayError("List", e.getMessage());
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.