aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Control.h
diff options
context:
space:
mode:
authorFernando Carvajal <fcarvajal@qindel.com>2016-04-12 11:52:22 +0200
committerFernando Carvajal <fcarvajal@qindel.com>2016-04-12 12:07:53 +0200
commita9be6f59105b7cf29bb799556274dc2c3b3d2af8 (patch)
tree555bfeba04b21dc26df16ee5c26a3ec798d02584 /nxcomp/Control.h
parent2ffe52c5ecb7cf6af111c685eee7f8fcfd1139a9 (diff)
downloadnx-libs-a9be6f59105b7cf29bb799556274dc2c3b3d2af8.tar.gz
nx-libs-a9be6f59105b7cf29bb799556274dc2c3b3d2af8.tar.bz2
nx-libs-a9be6f59105b7cf29bb799556274dc2c3b3d2af8.zip
Remove compatibility code for nxcomp before 3.5.0
As a part of nxcomp's clean-up process, compatibility with old protocol versions has been set now at 3.5.0. This commit removes compatibility code from nxcomp so the minimum supported version changes from 1.5.0 (protocol step 6) to 3.5.0 (protocol step 10). At this moment the removal is not complete and it will be followed by some other commits, in order to get rid of several components and files that are no longer used as they were only needed to work with old protocol versions. Refs: ArcticaProject/nx-libs#108
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 */