diff options
| author | Sebastien Braun | 2010-10-05 15:31:11 +0200 |
|---|---|---|
| committer | Sebastien Braun | 2010-10-05 18:15:51 +0200 |
| commit | 9b8657b04122838e3149208789a004baaa3ba635 (patch) | |
| tree | 9c5d9196993bf7eb9d58ce353fb583e8167e3220 /src/input/sayHelloHandler.cpp | |
| parent | Implement privileged input daemon, first version without handlers. (diff) | |
| download | pvs-9b8657b04122838e3149208789a004baaa3ba635.tar.gz pvs-9b8657b04122838e3149208789a004baaa3ba635.tar.xz pvs-9b8657b04122838e3149208789a004baaa3ba635.zip | |
Implement example privileged SayHelloHandler.
Diffstat (limited to 'src/input/sayHelloHandler.cpp')
| -rw-r--r-- | src/input/sayHelloHandler.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/input/sayHelloHandler.cpp b/src/input/sayHelloHandler.cpp new file mode 100644 index 0000000..fc6f668 --- /dev/null +++ b/src/input/sayHelloHandler.cpp @@ -0,0 +1,25 @@ +/* + # Copyright (c) 2009 - OpenSLX Project, Computer Center University of Freiburg + # + # This program is free software distributed under the GPL version 2. + # See http://openslx.org/COPYING + # + # If you have any feedback please consult http://openslx.org/feedback and + # send your suggestions, praise, or complaints to feedback@openslx.org + # + # General information about OpenSLX can be found at http://openslx.org/ + # -------------------------------------------------------------------------- + # rebootSystemHandler.h + # - Handle "say hello" requests - interface + # -------------------------------------------------------------------------- + */ + +#include "sayHelloHandler.h" +#include <iostream> + +using namespace std; + +void SayHelloHandler::handle(InputEvent const&, InputEventContext const* ctx) +{ + cerr << "I'm right here! You sent this message from pid " << ctx->getSenderPid() << " as user " << ctx->getSenderUid() << " with gid " << ctx->getSenderGid() << endl; +} |
