Packets: Fix VariantParser invalid parser access bug
[senf.git] / PPI / ForwardSwitch.hh
index 4d21415..20649bf 100644 (file)
@@ -18,8 +18,8 @@
 // Free Software Foundation, Inc.,
 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#ifndef FORWARDSWITCH_HH_
-#define FORWARDSWITCH_HH_
+#ifndef HH_SENF_PPI_ForwardSwitch_
+#define HH_SENF_PPI_ForwardSwitch_
 
 // Custom includes
 #include "Connectors.hh"
@@ -35,18 +35,20 @@ class ForwardSwitch
     SENF_PPI_MODULE(ForwardSwitch);
 public:
 
-    connector::ActiveInput<> input;
+    connector::PassiveInput<> input;
     connector::ActiveOutput<> output;
 
     ForwardSwitch(bool state);
-
-private:
-       bool forward_;
     bool forward();
     bool forward(bool state);
-    void stopForwarding();
-    void startForwarding();
+    bool stopForwarding();
+    bool startForwarding();
+private:
+    void onRequest();
+    bool forward_;
+
 };
 
 }}} //namespaces
-#endif /*FORWARDSWITCH_HH_*/
+#include "ForwardSwitch.cci"
+#endif /*HH_SENF_PPI_ForwardSwitch_*/