GUAC-1305: Add image mimetypes to Guacamole protocol handshake.

This commit is contained in:
Michael Jumper
2015-09-20 16:16:10 -07:00
parent d52544859b
commit e1003b56ba
2 changed files with 25 additions and 1 deletions

View File

@@ -183,6 +183,13 @@ public class ConfiguredGuacamoleSocket implements GuacamoleSocket {
info.getVideoMimetypes().toArray(new String[0])
));
// Send supported image formats
writer.writeInstruction(
new GuacamoleInstruction(
"image",
info.getImageMimetypes().toArray(new String[0])
));
// Send args
writer.writeInstruction(new GuacamoleInstruction("connect", arg_values));

View File

@@ -55,10 +55,15 @@ public class GuacamoleClientInformation {
private final List<String> audioMimetypes = new ArrayList<String>();
/**
* The list of audio mimetypes reported by the client to be supported.
* The list of video mimetypes reported by the client to be supported.
*/
private final List<String> videoMimetypes = new ArrayList<String>();
/**
* The list of image mimetypes reported by the client to be supported.
*/
private final List<String> imageMimetypes = new ArrayList<String>();
/**
* Returns the optimal screen width requested by the client, in pixels.
* @return The optimal screen width requested by the client, in pixels.
@@ -133,4 +138,16 @@ public class GuacamoleClientInformation {
return videoMimetypes;
}
/**
* Returns the list of image mimetypes supported by the client. To add or
* removed supported mimetypes, the list returned by this function can be
* modified.
*
* @return
* The set of image mimetypes supported by the client.
*/
public List<String> getImageMimetypes() {
return imageMimetypes;
}
}