Exemplo n.º 1
0
  void doProtocolInitialisation(int dx, int dy) throws IOException {
    rfb.writeClientInit();
    rfb.readServerInit();

    initializeBitmap(dx, dy);
    decoder.setPixelFormat(rfb);
  }
Exemplo n.º 2
0
  public void processNormalProtocol(
      final Context context, ProgressDialog pd, final Runnable setModes) throws Exception {
    handler.post(drawableSetter);
    handler.post(setModes);
    handler.post(desktopInfo);

    // Hide progress dialog
    if (pd.isShowing()) pd.dismiss();

    rfb.processProtocol(this, connection.getUseLocalCursor());
  }
Exemplo n.º 3
0
 void connectAndAuthenticate(String us, String pw) throws Exception {
   Log.i(TAG, "Connecting to: " + connection.getAddress() + ", port: " + connection.getPort());
   String address = getVNCAddress();
   int vncPort = getVNCPort();
   boolean anonTLS = (connection.getConnectionType() == VncConstants.CONN_TYPE_ANONTLS);
   try {
     rfb = new RfbProto(decoder, address, vncPort);
     Log.v(TAG, "Connected to server");
     rfb.initializeAndAuthenticate(
         us, pw, connection.getUseRepeater(), connection.getRepeaterId(), anonTLS);
   } catch (Exception e) {
     throw new Exception(
         "Connection to VNC server: " + address + " at port: " + vncPort + " failed.");
   }
 }