summaryrefslogtreecommitdiffstats
path: root/remoting/protocol/input_stub.h
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/protocol/input_stub.h')
-rw-r--r--remoting/protocol/input_stub.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/remoting/protocol/input_stub.h b/remoting/protocol/input_stub.h
index 8b89c7a..8c80d16 100644
--- a/remoting/protocol/input_stub.h
+++ b/remoting/protocol/input_stub.h
@@ -8,6 +8,8 @@
#ifndef REMOTING_PROTOCOL_INPUT_STUB_H_
#define REMOTING_PROTOCOL_INPUT_STUB_H_
+#include "base/basictypes.h"
+
class Task;
namespace remoting {
@@ -18,13 +20,26 @@ class MouseEvent;
class InputStub {
public:
- InputStub() {}
- virtual ~InputStub() {}
+ InputStub();
+ virtual ~InputStub();
virtual void InjectKeyEvent(const KeyEvent* event, Task* done) = 0;
virtual void InjectMouseEvent(const MouseEvent* event, Task* done) = 0;
+ // Called when the client has authenticated with the host to enable the
+ // input event channel.
+ // Before this is called, all input event will be ignored.
+ void OnAuthenticated();
+
+ // Has the client successfully authenticated with the host?
+ // I.e., should we be processing input events?
+ bool authenticated();
+
private:
+ // Initially false, this records whether the client has authenticated with
+ // the host.
+ bool authenticated_;
+
DISALLOW_COPY_AND_ASSIGN(InputStub);
};