Mercurial > hg > Applications > AliceVNC
changeset 5:c05d3b89b446
Send DecodeInfo to Children Nodes. but occur ArrayIndexOutOfBoundsException.
author | YU |
---|---|
date | Sat, 13 Sep 2014 20:55:48 +0900 |
parents | 9a24e36d8ed7 |
children | e68415fd0a1f |
files | src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java src/main/java/jp/ac/u_ryukyu/alicevnc/StartAliceVNC.java |
diffstat | 2 files changed, 23 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java Sat Sep 13 19:57:00 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveUpdateRectangle.java Sat Sep 13 20:55:48 2014 +0900 @@ -1,5 +1,7 @@ package jp.ac.u_ryukyu.alicevnc; +import java.util.ArrayList; + import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.encoding.EncodingType; import com.glavsoft.rfb.encoding.decoder.DecodeInfo; @@ -14,31 +16,42 @@ private Receiver info = ids.create(CommandType.PEEK); private Receiver info1 = ids.create(CommandType.TAKE); - + private Receiver info2= ids.create(CommandType.PEEK); + public ReceiveUpdateRectangle(){ info.setKey("Holder"); info1.setKey("decodeInfo"); + info2.setKey("_CLIST"); } - + + public void run() { ZRLEDecoder decoder = new ZRLEDecoder(); RenderAndControllerHolder holder = info.asClass(RenderAndControllerHolder.class); DecodeInfo decodeInfo = info1.asClass(DecodeInfo.class); - + try { decoder.decode(decodeInfo, holder.renderer); FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle( decodeInfo.x, decodeInfo.y, decodeInfo.width, decodeInfo.height); - + rect.encodingType = EncodingType.byId(decodeInfo.encodingTypeId); - + holder.repaintController.repaintBitmap(rect); } catch (TransportException e) { e.printStackTrace(); } - + + + @SuppressWarnings("unchecked") + ArrayList<String> clist = info2.asClass(ArrayList.class); + for (String node : clist){ + if (!"parent".equals(node)) + ods.put(node, "decodeInfo", info1.getVal()); + } + new ReceiveUpdateRectangle(); - + } }
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/StartAliceVNC.java Sat Sep 13 19:57:00 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/StartAliceVNC.java Sat Sep 13 20:55:48 2014 +0900 @@ -1,5 +1,7 @@ package jp.ac.u_ryukyu.alicevnc; +import java.util.ArrayList; + import alice.topology.node.TopologyNode; public class StartAliceVNC { @@ -9,6 +11,7 @@ if (conf.getManagerHostName() !=null){ new TopologyNode(conf, cs); } else { + cs.ods.put("_CLIST", new ArrayList<String>()); cs.ods.put("host", "local0"); cs.execute(); }