aboutsummaryrefslogtreecommitdiffstats
path: root/lib/src/main/java/com/trilead/ssh2/packets
diff options
context:
space:
mode:
authorJeffrey Sharkey <jsharkey@jsharkey.org>2008-08-27 10:47:56 +0000
committerJeffrey Sharkey <jsharkey@jsharkey.org>2008-08-27 10:47:56 +0000
commitd307f712c4e5087a659917f4d4b776e2ec84d697 (patch)
treeddf75a76152085848132cd9896719e316f784e17 /lib/src/main/java/com/trilead/ssh2/packets
parentc36f336e6f294313cdab84352b108beea4607e48 (diff)
downloadsshlib-d307f712c4e5087a659917f4d4b776e2ec84d697.tar.gz
sshlib-d307f712c4e5087a659917f4d4b776e2ec84d697.tar.bz2
sshlib-d307f712c4e5087a659917f4d4b776e2ec84d697.zip
* moved all terminal logic into a Service backend. connections are held in place by a TerminalBridge, which keeps the connection alive and renders the screen to a
bitmap if provided. a Console creates TerminalViews for each bridge while it is active, and handles panning back/forth between them. * volume up/down controls will change console font size * extended trilead library to support resizePTY() command * left/right screen gestures will pan between various open consoles * up/down screen gestures on right-half will look through scrollback buffer * up/down screen gestures on left-half will trigger pageup/down keys * broke ctrl+ keyboard mapping, will need to bring back over from older code
Diffstat (limited to 'lib/src/main/java/com/trilead/ssh2/packets')
-rw-r--r--lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java40
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java b/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java
new file mode 100644
index 0000000..20d35cd
--- /dev/null
+++ b/lib/src/main/java/com/trilead/ssh2/packets/PacketSessionPtyResize.java
@@ -0,0 +1,40 @@
+package com.trilead.ssh2.packets;
+
+public class PacketSessionPtyResize {
+ byte[] payload;
+
+ public int recipientChannelID;
+ public boolean wantReply;
+ public String term;
+ public int width;
+ public int height;
+
+ public PacketSessionPtyResize(int recipientChannelID, boolean wantReply, int width, int height) {
+ this.recipientChannelID = recipientChannelID;
+ this.wantReply = wantReply;
+ this.term = term;
+ this.width = width;
+ this.height = height;
+ }
+
+ public byte[] getPayload()
+ {
+ if (payload == null)
+ {
+ TypesWriter tw = new TypesWriter();
+ tw.writeByte(Packets.SSH_MSG_CHANNEL_REQUEST);
+ tw.writeUINT32(recipientChannelID);
+ tw.writeString("window-change");
+ tw.writeBoolean(wantReply);
+ tw.writeUINT32(width);
+ tw.writeUINT32(height);
+ tw.writeUINT32(0);
+ tw.writeUINT32(0);
+
+ payload = tw.getBytes();
+ }
+ return payload;
+ }
+}
+
+