aboutsummaryrefslogtreecommitdiffstats
path: root/java/com/tigervnc/rfb/VoidParameter.java
diff options
context:
space:
mode:
authorBrian Hinz <bphinz@users.sourceforge.net>2012-05-14 02:19:41 +0000
committerBrian Hinz <bphinz@users.sourceforge.net>2012-05-14 02:19:41 +0000
commit19810efe31bad78889dc001ecd8b62e2ee91bf30 (patch)
tree1cb1ac5fae815fb1086e77dffeae21f1cc4c501e /java/com/tigervnc/rfb/VoidParameter.java
parent8970bf4ddb106dc880cd37b916a2cc4c2f08168d (diff)
downloadtigervnc-19810efe31bad78889dc001ecd8b62e2ee91bf30.tar.gz
tigervnc-19810efe31bad78889dc001ecd8b62e2ee91bf30.zip
Implemented rfb/Configuration similar to the native client methods. Added equivalent cmd line options for all native client options except "-menuKey", which needs a little more work on the GUI side before it can be added.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4913 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/com/tigervnc/rfb/VoidParameter.java')
-rw-r--r--java/com/tigervnc/rfb/VoidParameter.java55
1 files changed, 48 insertions, 7 deletions
diff --git a/java/com/tigervnc/rfb/VoidParameter.java b/java/com/tigervnc/rfb/VoidParameter.java
index fa48e4b7..33c8bcb5 100644
--- a/java/com/tigervnc/rfb/VoidParameter.java
+++ b/java/com/tigervnc/rfb/VoidParameter.java
@@ -1,4 +1,6 @@
/* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
+ * Copyright 2004-2005 Cendio AB.
+ * Copyright 2012 Brian P. Hinz
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -19,23 +21,62 @@
package com.tigervnc.rfb;
abstract public class VoidParameter {
+ public VoidParameter(String name_, String desc_,
+ Configuration.ConfigurationObject co)
+ {
+ immutable = false; _hasBeenSet = false; name = name_; description = desc_;
+
+ Configuration conf = null;
+
+ switch (co) {
+ case ConfGlobal:
+ conf = Configuration.global();
+ break;
+ case ConfServer:
+ conf = Configuration.server();
+ break;
+ case ConfViewer:
+ conf = Configuration.viewer();
+ break;
+ }
+ _next = conf.head;
+ conf.head = this;
+ }
+
public VoidParameter(String name_, String desc_) {
- name = name_;
- description = desc_;
- next = Configuration.head;
- Configuration.head = this;
+ this(name_, desc_, Configuration.ConfigurationObject.ConfGlobal);
+ }
+
+ final public String getName() {
+ return name;
}
- final public String getName() { return name; }
- final public String getDescription() { return description; }
+ final public String getDescription() {
+ return description;
+ }
abstract public boolean setParam(String value);
public boolean setParam() { return false; }
abstract public String getDefaultStr();
abstract public String getValueStr();
public boolean isBool() { return false; }
+ public void setImmutable() {
+ vlog.debug("set immutable "+getName());
+ immutable = true;
+ }
+
+ public void setHasBeenSet() {
+ _hasBeenSet = true;
+ }
+
+ public boolean hasBeenSet() {
+ return _hasBeenSet;
+ }
- public VoidParameter next;
protected String name;
protected String description;
+ public VoidParameter _next;
+ protected boolean immutable;
+ protected boolean _hasBeenSet;
+ static LogWriter vlog = new LogWriter("VoidParameter");
}