mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 09:03:21 +00:00 
			
		
		
		
	GUACAMOLE-422: Add timezone to tunnel connections.
This commit is contained in:
		
				
					committed by
					
						 Virtually Nick
						Virtually Nick
					
				
			
			
				
	
			
			
			
						parent
						
							8ad65d6e6c
						
					
				
				
					commit
					047ed7ac9c
				
			| @@ -95,6 +95,11 @@ public abstract class TunnelRequest { | ||||
|      * once for each mimetype. | ||||
|      */ | ||||
|     public static final String IMAGE_PARAMETER = "GUAC_IMAGE"; | ||||
|      | ||||
|     /** | ||||
|      * The name of the parameter specifying the timezone of the client. | ||||
|      */ | ||||
|     public static final String TIMEZONE_PARAMETER = "GUAC_TIMEZONE"; | ||||
|  | ||||
|     /** | ||||
|      * All supported object types that can be used as the destination of a | ||||
| @@ -365,5 +370,16 @@ public abstract class TunnelRequest { | ||||
|     public List<String> getImageMimetypes() { | ||||
|         return getParameterValues(IMAGE_PARAMETER); | ||||
|     } | ||||
|  | ||||
|      | ||||
|     /** | ||||
|      * Returns the value of the timezone parameter declared within the | ||||
|      * tunnel request. | ||||
|      *  | ||||
|      * @return  | ||||
|      *     The string value of the timezone parameter as reported by | ||||
|      *     the client. | ||||
|      */ | ||||
|     public String getTimezone() { | ||||
|         return getParameter(TIMEZONE_PARAMETER); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -166,6 +166,11 @@ public class TunnelRequestService { | ||||
|         List<String> imageMimetypes = request.getImageMimetypes(); | ||||
|         if (imageMimetypes != null) | ||||
|             info.getImageMimetypes().addAll(imageMimetypes); | ||||
|          | ||||
|         // Get the timezone value | ||||
|         String timezone = request.getTimezone(); | ||||
|         if (timezone != null & !timezone.isEmpty()) | ||||
|             info.setTimezone(timezone); | ||||
|  | ||||
|         return info; | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user