More marshalling simplification
[invirt/third/libt4.git] / lock_protocol.h
index 61f0998..1e45ddc 100644 (file)
@@ -3,29 +3,27 @@
 #ifndef lock_protocol_h
 #define lock_protocol_h
 
 #ifndef lock_protocol_h
 #define lock_protocol_h
 
+#include "types.h"
 #include "rpc/rpc.h"
 #include "rpc/rpc.h"
-#include <string>
 
 class lock_protocol {
     public:
 
 class lock_protocol {
     public:
-        enum xxstatus { OK, RETRY, RPCERR, NOENT, IOERR };
-        typedef int status;
-        typedef std::string lockid_t;
-        typedef unsigned long long xid_t;
-        enum rpc_numbers {
+        enum status : status_t { OK, RETRY, RPCERR, NOENT, IOERR };
+        using lockid_t = string;
+        using xid_t = uint64_t;
+        enum rpc_numbers : proc_t {
             acquire = 0x7001,
             release,
             acquire = 0x7001,
             release,
-            stat
+            stat,
         };
 };
 
 class rlock_protocol {
     public:
         };
 };
 
 class rlock_protocol {
     public:
-        enum xxstatus { OK, RPCERR };
-        typedef int status;
-        enum rpc_numbers {
+        enum status : status_t { OK, RPCERR };
+        enum rpc_numbers : proc_t {
             revoke = 0x8001,
             revoke = 0x8001,
-            retry = 0x8002
+            retry,
         };
 };
 #endif
         };
 };
 #endif