input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public poly line order get poly line return this polyline
|
retrieve the multi point line order stored within this state
|
public text2 order get text2 return this text2
|
retrieve the text2 order stored within this state
|
public void reset bounds reset destblt reset patblt reset screenblt reset line reset rect reset desksave reset memblt reset triblt reset polyline reset text2 reset
|
reset all orders within this order state
|
public void set clip clip channel c canvas add focus listener c
|
register the clipboard channel
|
public void go full screen in fullscreen true
|
switch to fullscreen mode
|
public void toggle full screen if in fullscreen leave full screen else go full screen
|
switch in out of fullscreen mode
|
public void show menu if menu null menu new rdp menu this if menu visible options enable menu this set menu bar menu canvas repaint menu visible true
|
display the menu bar
|
public void hide menu if menu visible options enable menu this set menu bar null canvas set size this width this height canvas repaint menu visible false
|
hide the menu bar
|
public void toggle menu if menu visible show menu else hide menu
|
toggle the menu on off show if hidden hide if visible
|
public rdesktop canvas get canvas return this canvas
|
retrieve the canvas contained within this frame
|
public void register comm layer rdp rdp this rdp rdp canvas register comm layer rdp
|
register the rdp communications layer with this frame
|
public void disconnect if rdpsock null return try send message disconnect request if in null in close if out null out close if rdpsock null rdpsock close catch ioexception e in null out null rdpsock null return in null out null rdpsock null
|
disconnect from an rdp session closing all sockets
|
public void mark end this end get position
|
mark current read write position as end of packet
|
public void disconnect iso layer disconnect in null out null
|
disconnect from server
|
public void mark end int position if position capacity throw new array index out of bounds exception mark size this end position
|
mark specified position as end of packet
|
public rdp packet localised init int length throws rdesktop exception rdp packet localised data iso layer init length 8 data push layer rdp packet localised mcs header 8 data set header rdp packet mcs header data increment position 8 data set start data get position return data
|
initialise a packet as an mcs pdu
|
public void push layer int header int increment throws rdesktop exception this set header header this increment position increment this set start this get position
|
reserve space within this packet for writing of headers for a specific
|
public int get header int header throws rdesktop exception switch header case rdp packet mcs header return this mcs case rdp packet secure header return this secure case rdp packet rdp header return this rdp case rdp packet channel header return this channel default throw new rdesktop exception wrong header
|
get location of the header for a specific communications layer
|
public boolean show yes no error dialog string msg yes no dialog d new yes no dialog this proper java rdp error msg d show return d retry
|
display an error dialog with yes and no buttons and the title
|
public void send ber integer rdp packet localised buffer int value int len 1 if value 0xff len 2 send ber header buffer ber tag integer len if value 0xff buffer set big endian16 value else buffer set8 value
|
send an integer encoded according to the iso asn
|
public void show error dialog string msg dialog d new okdialog this proper java rdp error msg d show
|
display an error dialog with the title proper java rdp error
|
public void set header int header throws rdesktop exception switch header case rdp packet mcs header this mcs this get position break case rdp packet secure header this secure this get position break case rdp packet rdp header this rdp this get position break case rdp packet channel header this channel this get position break default throw new rdesktop exception wrong header
|
set current read write position as the start of a layer header
|
public void trigger ready to send this show canvas trigger ready to send
|
notify the canvas that the connection is ready for sending messages
|
public void centre window window f dimension screen size toolkit get default toolkit get screen size dimension window size f get size int x screen size width window size width 2 if x 0 x 0 window can be bigger than screen int y screen size height window size height 2 if y 0 y 0 window can be bigger than screen f set location x y
|
centre a window to the screen
|
public void send ber header rdp packet localised buffer int tagval int length if tagval 0xff buffer set big endian16 tagval else buffer set8 tagval if length 0x80 buffer set8 0x82 buffer set big endian16 length else buffer set8 length
|
send a header encoded according to the iso asn
|
public void centre window centre window this
|
centre this window
|
public void set start int position this start position
|
set start position of this packet
|
private int berint size int value if value 0xff return 4 else return 3
|
determine the size of a ber encoded integer with specified value
|
public void out unicode string string str int len int i 0 j 0 if str length 0 char name str to char array while i len this set little endian16 short name j i 2 this set little endian16 0 terminating null character else this set little endian16 0
|
add a unicode string to this packet at the current read write position
|
public void out uint8p string str int length byte b str str get bytes this copy from byte array b str 0 this get position b str length this increment position length
|
write an ascii string to this packet at current read write position
|
public int engine block size return block size
|
b spi b returns the length of an input block in bytes
|
public void engine init encrypt byte key throws crypto exception make key key state encrypt
|
b spi b initializes this cipher for encryption using the specified
|
public void engine init decrypt byte key throws crypto exception make key key state encrypt
|
b spi b initializes this cipher for decryption using the specified
|
public void send edrq throws ioexception rdesktop exception logger debug send edrq rdp packet localised buffer iso layer init 5 buffer set8 edrq 2 buffer set big endian16 1 height buffer set big endian16 1 interval buffer mark end iso layer send buffer
|
transmit an edrq message
|
public void send cjrq int channelid throws ioexception rdesktop exception rdp packet localised buffer iso layer init 5 buffer set8 cjrq 2 buffer set big endian16 this mcs user id height buffer set big endian16 channelid interval buffer mark end iso layer send buffer
|
transmit a cjrq message
|
private void make key byte userkey throws crypto exception if userkey null throw new crypto exception get algorithm null user key int len userkey length if len 0 throw new crypto exception get algorithm invalid user key length x y 0 for int i 0 i 256 i s box i i int i1 0 i2 0 t for int i 0 i 256 i i2 userkey i1 0x ff s box i i2 0x ff t s box i s box i s box i2 s box i2 t i1 i1 1 len
|
expands a user key to a working key schedule
|
public void send aucf throws ioexception rdesktop exception rdp packet localised buffer iso layer init 2 buffer set8 aucf 2 buffer set8 0 buffer mark end iso layer send buffer
|
transmit an aucf message
|
protected int engine get digest length return hash length
|
returns the length of the hash in bytes
|
public void send aurq throws ioexception rdesktop exception rdp packet localised buffer iso layer init 1 buffer set8 aurq 2 buffer mark end iso layer send buffer
|
transmit an aurq mesage
|
protected int engine get data length return data length
|
returns the length of the data in bytes hashed in every transform
|
public object clone return new md5 this
|
returns a copy of this md object
|
private void process srv info rdp packet localised mcs data options server rdp version mcs data get little endian16 in uint16 le s g server rdp version logger debug server rdp version is options server rdp version if 1 options server rdp version options use rdp5 false
|
read server info from packet specifically the rdp version of the server
|
public void engine reset buffered 0 count 0
|
b spi b resets the digest
|
public void engine reset super engine reset java reset
|
initializes resets the message digest
|
public void engine update byte b throws crypto exception byte data b engine update data 0 1
|
b spi b updates the message digest with a byte of new data
|
protected void engine transform byte in java transform in
|
adds data to the message digest
|
public object clone return new sha1 this
|
returns a copy of this md object
|
public int get user id return this mcs user id
|
retrieve the user id stored by this mcs object
|
public int check color int color if cm null return cm get rgb color return color
|
force a colour to its true rgb representation extracting from colour
|
public void set index color model index color model cm this cm cm
|
set the colour model for this image
|
public int get scancode return scancode
|
return the scancode associated with this mapping
|
public boolean is character def return character def
|
return true if this mapping is defined by a character false otherwise
|
public boolean is ctrl down return ctrl down
|
return true if the keystroke defined in this mapping requires that the
|
public boolean is alt down return alt down
|
return true if the keystroke defined in this mapping requires that the
|
private int get code from alpha char char key char if a key char key char z return key event vk a key char a if a key char key char z return key event vk a key char a return 1
|
given an alphanumeric character return an awt keycode
|
public boolean is shift down return shift down
|
return true if the keystroke defined in this mapping requires that the
|
public int get map code return map code
|
get the rdp code specifying the key map in use
|
public boolean is capslock on return capslock down
|
return true if the keystroke defined in this mapping requires that caps
|
public boolean has scancode char c if c key event char undefined return false iterator i key map iterator map def best null while i has next map def current map def i next if current applies to c best current return best null
|
retrieve the scancode corresponding to the supplied character as defined
|
public int char to scancode char c string mod iterator i key map iterator map def best null while i has next map def current map def i next if current applies to c best current if best null if best is shift down mod 0 shift else if best is ctrl down best is alt down mod 0 altgr else mod 0 none return best get scancode else return 1
|
retrieve the scancode corresponding to the supplied character as defined
|
public int get font return this font
|
retrieve the font id for this glyph
|
public int get base line return this baseline
|
retrive y offset of glyph data
|
public int get character return this character
|
return character id of this glyph
|
public int get scancode key event e map def d get def e if d null return d get scancode else return 1
|
return a scancode for the supplied key event from within the mapping
|
public void add input listeners canvas add mouse listener new rdesktop mouse adapter canvas add mouse motion listener new rdesktop mouse motion adapter canvas add key listener new rdesktop key adapter
|
add all relevant input listeners to the canvas
|
public void lost focus clear keys modifiers valid false
|
handle loss of focus to the main canvas
|
public void gained focus do lock keys ensure lock key states are correct
|
handle the main canvas gaining focus
|
public void send scancode long time int flags int scancode if scancode 0x38 be careful with alt if flags rdp keyrelease 0 logger info alt release server alt down server alt down server alt down false if flags rdp keypress logger info alt press server alt down server alt down server alt down true if scancode key code scancode extended 0 rdp send input int time rdp input scancode flags kbd flag ext scancode key code scancode extended 0 else rdp send input int time rdp input scancode flags scancode 0
|
send a keyboard event to the server
|
public void set keys if modifiers valid return if last key event null return if last key event is shift down send scancode get time rdp keypress 0x2a shift if last key event is alt down send scancode get time rdp keypress 0x38 l alt if last key event is control down send scancode get time rdp keypress 0x1d l ctrl
|
send keypress events for any modifier keys that are currently down
|
public void reverse byte data int i 0 j 0 byte temp 0 for i 0 j data length 1 i j i j temp data i data i data j data j temp
|
reverse the values in the provided array
|
public void make40bit byte key key 0 byte 0xd1 key 1 byte 0x26 key 2 byte 0x9e
|
generate a 40 bit key and store in the parameter key
|
public void register drawing surface rdesktop canvas surface this surface surface surface register cache cache
|
register an rdesktop canvas with this orders object
|
public void trigger ready to send caps lock on false num lock on false scroll lock on false do lock keys ensure lock key states are correct
|
turn off any locking key check states if available
|
public void set little endian32 byte data int value data 3 byte value 24 0xff data 2 byte value 16 0xff data 1 byte value 8 0xff data 0 byte value 0xff
|
write a 32 bit integer value to an array of bytes length 4
|
protected void middle button released mouse event e if options paste hack ctrl down rdp send input time rdp input mouse mouse flag button3 e get x e get y
|
handle release of the middle mouse button sending relevent event data to
|
private void initialize this set size 300 200 this set content pane get jcontent pane this set title send event
|
this method initializes this
|
private jtext field get input type field if input type field null input type field new jtext field return input type field
|
this method initializes input type field
|
protected int process disconnect pdu rdp packet localised data logger debug received disconnect pdu return data get little endian32
|
process a disconnect pdu
|
private jtext field get flags field if flags field null flags field new jtext field return flags field
|
this method initializes flags field
|
private jtext field get param1 field if param1 field null param1 field new jtext field return param1 field
|
this method initializes param1 field
|
private jtext field get param2 field if param2 field null param2 field new jtext field return param2 field
|
this method initializes param2 field
|
private jbutton get jbutton if j button null j button new jbutton j button set text send event j button add action listener new java awt event action listener public void action performed java awt event action event e if rdp null rdp send input input get time integer decode input type field get text int value integer decode flags field get text int value integer decode param1 field get text int value integer decode param2 field get text int value return j button
|
this method initializes j button
|
private jtext field get flag mask field if flag mask field null flag mask field new jtext field return flag mask field
|
this method initializes flag mask field
|
private rdp packet localised init data int size throws rdesktop exception rdp packet localised buffer null buffer secure layer init constants encryption secure sec encrypt 0 size 18 buffer push layer rdp packet rdp header 18 buffer set header rdp packet localised rdp header buffer increment position 18 buffer set start buffer get position return buffer
|
initialise a packet for sending data on the rdp layer
|
private jbutton get jbutton1 if j button1 null j button1 new jbutton j button1 set text apply mask j button1 add action listener new java awt event action listener public void action performed java awt event action event e apply the mask to the flags field flags field set text 0x integer to hex string integer decode flags field get text int value integer decode flag mask field get text int value flag mask field set text return j button1
|
this method initializes j button1
|
public void set mcs id int mcs id this mcs id mcs id
|
set the mcs id for this channel
|
public rdp packet localised init int length throws rdesktop exception rdp packet localised s s common secure init options encryption secure sec encrypt 0 length 8 s set header rdp packet channel header s increment position 8 return s
|
initialise a packet for transmission over this virtual channel
|
public int mcs id int c return mcs mcs global channel 1 c
|
obtain the mcs id for a specific numbered channel
|
public vchannel channel int c if c num channels return channels c else return null
|
retrieve the vchannel object for the numbered channel
|
public vchannel find channel by channelno int channelno if channelno mcs mcs global channel num channels logger warn channel channelno not defined highest channel defined is mcs mcs global channel num channels return null else return channels channelno mcs mcs global channel 1
|
retrieve the vchannel object for the specified mcs channel id
|
public boolean register vchannel v throws rdesktop exception if options use rdp5 return false if num channels max channels throw new rdesktop exception channel table full could not register channel channels num channels v v set mcs id mcs mcs global channel 1 num channels num channels return true
|
register a new virtual channel
|
private void parse brush rdp packet localised data brush brush int present if present 0x01 0 brush set xorigin data get8 if present 0x02 0 brush set xorigin data get8 if present 0x04 0 brush set style data get8 byte pat brush get pattern if present 0x08 0 pat 0 byte data get8 if present 0x10 0 for int i 1 i 8 i pat i byte data get8 brush set pattern pat
|
parse data defining a brush and store brush information
|
public void disconnect this connected false secure layer disconnect
|
disconnect from an rdp session
|
public boolean is connected return this connected
|
retrieve status of connection
|
public void register palette index color model cm this colormap cm backstore set index color model cm
|
register a colour palette with this canvas
|
public void register comm layer rdp rdp this rdp rdp if fb keys null input new input localised this rdp fb keys
|
register the rdp layer to act as the communications interface to this
|
public void register cache cache cache this cache cache
|
set cache for this session
|
public void display image image img int x int y graphics g backstore get graphics g draw image img x y null useful test for identifying image boundaries g set color color red g draw rect x y data get width null data get height null g dispose
|
draw an image object to the backstore does not call repaint
|
public void put image int x int y int cx int cy int data backstore set rgbno conversion x y cx cy data 0 drawing entire image no offset needed cx this repaint x y cx cy
|
draw an image from an integer array of colour data to the backstore
|
public void reset clip graphics g this get graphics rectangle bounds this get bounds g set clip bounds x bounds y bounds width bounds height this top 0 this left 0 this right this width 1 changed this bottom this height 1 changed
|
reset clipping boundaries for canvas
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.