Skip to content

Commit

Permalink
make protocol compabtible to barrier
Browse files Browse the repository at this point in the history
  • Loading branch information
dadosch committed Jun 24, 2019
1 parent 163cab2 commit 2f05f23
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 39 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
29 changes: 0 additions & 29 deletions .idea/codeStyles/Project.xml

This file was deleted.

9 changes: 5 additions & 4 deletions app/src/main/java/org/synergy/Synergy.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void onClick (View arg) {
}
});

Log.setLogLevel (Log.Level.DEBUG5);
Log.setLogLevel (Log.Level.DEBUG);
TastyToast.makeText(getApplicationContext(), "Client Starting", TastyToast.LENGTH_LONG, TastyToast.DEFAULT);
Log.debug ("Client starting....");

Expand Down Expand Up @@ -140,9 +140,10 @@ private void connect () {

Display display = wm.getDefaultDisplay ();
basicScreen.setShape (display.getWidth (), display.getHeight ());


//PlatformIndependentScreen screen = new PlatformIndependentScreen(basicScreen);
Log.debug ("Resulotion: " + display.getWidth()+ " x " + display.getHeight());


//PlatformIndependentScreen screen = new PlatformIndependentScreen(basicScreen);
Log.debug ("Hostname: " + clientName);

Client client = new Client (getApplicationContext(), clientName, serverAddress, socketFactory, null, basicScreen);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/synergy/client/ServerProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected enum EResult {
protected Result parseHandshakeMessage () throws IOException {
// Read the header
MessageHeader header = new MessageHeader (din);
//Log.debug ("Received Header: " + header);
Log.debug ("Received Header: " + header);

switch (header.getType ()) {
case QINFO:
Expand Down Expand Up @@ -290,7 +290,7 @@ private void handleData () {
case OKAY:
break;
case UNKNOWN:
Log.error ("invalid message from server");
Log.error ("invalid message from server: "+din.readUTF());
return;
case DISCONNECT:
return;
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/org/synergy/injection/Injection.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static void setPermissionsForInputDevice () {
process.waitFor ();
Log.debug ("Access to /dev/uinput granted");
} catch (Exception e) {
Log.error(e.getStackTrace().toString());
e.printStackTrace ();
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/synergy/io/msgs/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ protected void writeData () throws IOException {
* Write the message header and the message data
*/
public final void write (DataOutputStream dout) throws IOException {
Log.debug2 ("Sending: " + this.toString ());
Log.debug5 ("Message: Sending: " + this.toString ());

// Write the message data to the byte array.
// Subclasses MUST override this function
Expand All @@ -127,7 +127,7 @@ public final void write (DataOutputStream dout) throws IOException {
// Set the message header size based on how much data
// has been written to the byte array stream
header.setDataSize (dataStream.size ());
Log.debug2 ("Sending Header: " + header);
Log.debug5 ("Message: Sending Header: " + header);

// Write out the header and the message data
header.write (dout);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/org/synergy/io/msgs/MessageType.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* http://synergy-foss.org/code/filedetails.php?repname=synergy&path=%2Ftrunk%2Fsrc%2Flib%2Fsynergy%2FProtocolTypes.cpp
*/
public enum MessageType {
HELLO ("Synergy", "[Init] Hello"), // Not a standard message
HELLOBACK ("Synergy", "[Init] Hello Back"), // Not a standard message
HELLO ("Barrier", "[Init] Hello"), // Not a standard message
HELLOBACK ("Barrier", "[Init] Hello Back"), // Not a standard message
CNOOP ("CNOP", "[Command] NoOp"),
CCLOSE ("CBYE", "[Command] Close"),
CENTER ("CINN", "[Command] Enter"),
Expand Down
Binary file removed synergy.apk
Binary file not shown.

0 comments on commit 2f05f23

Please sign in to comment.