Index: trunk/FACT++/src/DimState.h
===================================================================
--- trunk/FACT++/src/DimState.h	(revision 14025)
+++ trunk/FACT++/src/DimState.h	(revision 14032)
@@ -6,4 +6,11 @@
 class DimState
 {
+public:
+    enum
+    {
+        kOffline      = -256,
+        kNotAvailable = -257,
+    };
+
 protected:
     typedef function<void(const EventImp &)> callback;
@@ -15,6 +22,6 @@
         const bool disconnected = evt.GetSize()==0;
 
-        last = info;
-        info = make_pair(evt.GetTime(), disconnected ? -256 : evt.GetQoS());
+        last = cur;
+        cur  = make_pair(evt.GetTime(), disconnected ? kOffline : evt.GetQoS());
 
         msg = disconnected ? "" : evt.GetString();
@@ -35,5 +42,6 @@
 public:
     DimState(const string &n, const string s="STATE") : server(n),
-        service(n+"/"+s), info(make_pair(Time(), -256))
+        service(n+"/"+s),
+        last(make_pair(Time(), kOffline)), cur(make_pair(Time(), kOffline))
     {
     }
@@ -42,9 +50,9 @@
     }
 
-    string server;
-    string service;
-
-    pair<Time, int> last;
-    pair<Time, int> info;
+    const string server;
+    const string service;
+
+    pair<Time, int32_t> last;
+    pair<Time, int32_t> cur;
     string msg;
 
@@ -60,10 +68,10 @@
     }
 
-    const Time &time() const { return info.first; }
-    const int  &state() const { return info.second; }
-
-    bool online() const { return info.second>-256; }
-
-    virtual State description() const { return State(-257, ""); }
+    const Time    &time() const  { return cur.first; }
+    const int32_t &state() const { return cur.second; }
+
+    bool online() const { return state()>kOffline; }
+
+    virtual State description() const { return State(kNotAvailable, ""); }
 };
 
@@ -75,8 +83,8 @@
     out << kBold << s.server;
 
-    if (s.state()==-256)
+    if (s.state()==DimState::kOffline)
         return out << ": Offline";
 
-    if (rc.index==-257)
+    if (rc.index==DimState::kNotAvailable)
         return out;
 
@@ -117,5 +125,5 @@
         {
             states = State::SplitStates(evt.GetString());
-            states.push_back(State(-256, "Offline"));
+            states.push_back(State(kOffline, "Offline"));
         }
     }
@@ -127,5 +135,5 @@
                 return *it;
 
-        return State(-257, "n/a");
+        return State(kNotAvailable, "n/a");
     }
 };
@@ -137,7 +145,7 @@
         HandlerImp(evt);
 
-        info.second = evt.GetSize()==4 ? evt.GetInt() : -256;
-        if (info.second==0)
-            info.second=-256;
+        cur.second = evt.GetSize()==4 ? evt.GetInt() : kOffline;
+        if (cur.second==0)
+            cur.second=kOffline;
 
         Callback(evt);
@@ -153,5 +161,5 @@
 
         ostringstream out;
-        out << "V" << info.second/100 << 'r' << info.second%100;
+        out << "V" << state()/100 << 'r' << state()%100;
         return out.str();
     }
