Index: trunk/FACT++/src/RemoteControl.h
===================================================================
--- trunk/FACT++/src/RemoteControl.h	(revision 14558)
+++ trunk/FACT++/src/RemoteControl.h	(revision 14559)
@@ -162,17 +162,22 @@
     // ============ Pseudo-callback interface for the JavaScrip engine =======
 
-    virtual void  JsLoad(const std::string &)         { SetSection(-2); }
-    virtual void  JsStart(const std::string &)        { SetSection(-1); }
-    virtual void  JsEnd(const std::string &)          { UnsubscribeAll(); SetSection(-3); }
-    virtual bool  JsSend(const std::string &str)      { return ProcessCommand(str); }
-    virtual void  JsOut(const std::string &msg)       { lin << msg << endl; }
-    virtual void  JsPrint(const std::string &msg)     { if (fImp) fImp->Comment(msg.empty()?" ":msg); }
-    virtual void  JsAlarm(const std::string &msg)     { if (fImp) fImp->Alarm(msg.empty()?" ":msg); }
-    virtual void  JsException(const std::string &str) { if (fImp) fImp->Error(str.empty()?" ":str); }
-
-    State JsState(const std::string &server)
-    {
-        return fImp ? fImp->GetServerState(server) : State(-256, string());
-    }
+    void  JsLoad(const std::string &)         { SetSection(-3); }
+    void  JsStart(const std::string &)        { SetSection(-2); }
+    void  JsEnd(const std::string &)          { UnsubscribeAll(); SetSection(-4); }
+    bool  JsSend(const std::string &str)      { return ProcessCommand(str); }
+    void  JsOut(const std::string &msg)       { lin << msg << endl; }
+    void  JsPrint(const std::string &msg)     { if (fImp) fImp->Comment(msg.empty()?" ":msg); }
+    void  JsAlarm(const std::string &msg)     { if (fImp) fImp->Alarm(msg.empty()?" ":msg); }
+    void  JsException(const std::string &str) { if (fImp) fImp->Error(str.empty()?" ":str); }
+    bool  JsHasState(int s) const             { return fImp && fImp->HasState(s); }
+    bool  JsHasState(const string &n) const   { return fImp && (fImp->GetStateIndex(n)!=StateMachineImp::kSM_NotAvailable); }
+    bool  JsSetState(int s)                   { if (!fImp || fImp->GetCurrentState()<2) return false; SetSection(s-4); return true; }
+    int   JsGetState(const string &n) const   { return fImp ? fImp->GetStateIndex(n) : StateMachineImp::kSM_NotAvailable; }
+    State JsState(const std::string &server)  { return fImp ? fImp->GetServerState(server) : State(-256, string()); }
+    bool  JsNewState(int s, const string &n, const string &c)
+    {
+        return fImp && fImp->AddStateName(s, n, c);
+    }
+
 
     /*
