You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by GitBox <gi...@apache.org> on 2019/05/06 01:55:18 UTC

[GitHub] [guacamole-client] mike-jumper commented on a change in pull request #348: GUACAMOLE-422: Forward Timezone to RDP and SSH Connections

mike-jumper commented on a change in pull request #348: GUACAMOLE-422: Forward Timezone to RDP and SSH Connections
URL: https://github.com/apache/guacamole-client/pull/348#discussion_r281047685
 
 

 ##########
 File path: guacamole-common/src/main/java/org/apache/guacamole/protocol/GuacamoleProtocolVersion.java
 ##########
 @@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.guacamole.protocol;
+
+import org.apache.guacamole.GuacamoleException;
+import org.apache.guacamole.GuacamoleUnsupportedException;
+
+/**
+ * An enum that defines the available Guacamole protocol versions that can be
+ * used between guacd and clients, and provides convenience methods for parsing
+ * and comparing versions.
+ */
+public enum GuacamoleProtocolVersion {
+    
+    // Version 1.0.0 and older.
+    VERSION_1_0_0(1, 0, 0),
+
+    // Version 1.1.0
+    VERSION_1_1_0(1, 1, 0);
+    
+    // The major version number.
+    private final int major;
+
+    // The minor version number.
+    private final int minor;
+
+    // The patch version number.
+    private final int patch;
+    
+    /**
+     * Generate a new GuacamoleProtocolVersion object with the given
+     * major version, minor version, and patch version.
+     * 
+     * @param major
+     *     The integer representation of the major version component.
+     * 
+     * @param minor
+     *     The integer representation of the minor version component.
+     * 
+     * @param patch 
+     *     The integer representation of the patch version component.
+     */
+    GuacamoleProtocolVersion(int major, int minor, int patch) {
+        this.major = major;
+        this.minor = minor;
+        this.patch = patch;
+    }
+    
+    /**
+     * Return the major version number.
 
 Review comment:
   You mean the major component of the protocol version number?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services