mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-10-29 08:05:31 +00:00
GUAC-1305: Send supported image formats within Guacamole protocol handshake.
This commit is contained in:
@@ -92,6 +92,13 @@ public abstract class TunnelRequest {
|
||||
*/
|
||||
public static final String VIDEO_PARAMETER = "GUAC_VIDEO";
|
||||
|
||||
/**
|
||||
* The name of the parameter specifying one supported image mimetype. This
|
||||
* will normally appear multiple times within a single tunnel request -
|
||||
* once for each mimetype.
|
||||
*/
|
||||
public static final String IMAGE_PARAMETER = "GUAC_IMAGE";
|
||||
|
||||
/**
|
||||
* All supported object types that can be used as the destination of a
|
||||
* tunnel.
|
||||
@@ -350,4 +357,16 @@ public abstract class TunnelRequest {
|
||||
return getParameterValues(VIDEO_PARAMETER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of all image mimetypes declared as supported within the
|
||||
* tunnel request.
|
||||
*
|
||||
* @return
|
||||
* A list of all image mimetypes declared as supported within the
|
||||
* tunnel request, or null if no mimetypes were specified.
|
||||
*/
|
||||
public List<String> getImageMimetypes() {
|
||||
return getParameterValues(IMAGE_PARAMETER);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -114,6 +114,11 @@ public class TunnelRequestService {
|
||||
if (videoMimetypes != null)
|
||||
info.getVideoMimetypes().addAll(videoMimetypes);
|
||||
|
||||
// Add image mimetypes
|
||||
List<String> imageMimetypes = request.getImageMimetypes();
|
||||
if (imageMimetypes != null)
|
||||
info.getImageMimetypes().addAll(imageMimetypes);
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user