aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Control.h
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-04-19 10:47:43 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-04-19 10:47:43 +0200
commit03b65211260ff757b35a367f8936fd5e882ce56c (patch)
tree014155ca365a93687f99ea6492dd2c9d3e80593e /nxcomp/Control.h
parent2ffe52c5ecb7cf6af111c685eee7f8fcfd1139a9 (diff)
parent5c495241069708e9b1bbf6e57fd49599be540b63 (diff)
downloadnx-libs-03b65211260ff757b35a367f8936fd5e882ce56c.tar.gz
nx-libs-03b65211260ff757b35a367f8936fd5e882ce56c.tar.bz2
nx-libs-03b65211260ff757b35a367f8936fd5e882ce56c.zip
Merge branch 'fcarvajaldev-3.6.x-remove-old-proto-compat' into 3.6.x
Diffstat (limited to 'nxcomp/Control.h')
-rw-r--r--nxcomp/Control.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/nxcomp/Control.h b/nxcomp/Control.h
index 71f357c4a..b3552e091 100644
--- a/nxcomp/Control.h
+++ b/nxcomp/Control.h
@@ -321,6 +321,12 @@ class Control
int CompatVersionMaintenancePatch;
//
+ // Compatibility version for the proxy
+ //
+
+ static const char* const NXPROXY_COMPATIBILITY_VERSION;
+
+ //
// Which unpack methods are implemented in proxy?
//
@@ -713,26 +719,6 @@ class Control
int getProtoStep();
- int isProtoStep7()
- {
- return protoStep7_;
- }
-
- int isProtoStep8()
- {
- return protoStep8_;
- }
-
- int isProtoStep9()
- {
- return protoStep9_;
- }
-
- int isProtoStep10()
- {
- return protoStep10_;
- }
-
private:
//
@@ -746,11 +732,25 @@ class Control
// to the protocol version.
//
- int protoStep6_;
- int protoStep7_;
- int protoStep8_;
- int protoStep9_;
- int protoStep10_;
+ int protoStep_;
+
+ //
+ // Min and max values allowed for protocol step
+ // depending on protocol version compatibility
+ //
+
+ static const int NX_MIN_PROTO_STEP;
+ static const int NX_MAX_PROTO_STEP;
+
+ //
+ // Check the validity of protocol step
+ //
+
+ bool isValidProtoStep(int step)
+ {
+ return ((step >= NX_MIN_PROTO_STEP) && (step <= NX_MAX_PROTO_STEP));
+ }
+
};
#endif /* Control_H */