| 44 | class SampleServer : public AbstractServer<SampleServer> { |
| 45 | public: |
| 46 | SampleServer(FileDescriptorServer &server) : AbstractServer<SampleServer>(server) { |
| 47 | this->bindAndAddMethod(Procedure("sayHello", PARAMS_BY_NAME, JSON_STRING, "name", JSON_STRING, NULL), &SampleServer::sayHello); |
| 48 | this->bindAndAddNotification(Procedure("notifyServer", PARAMS_BY_NAME, NULL), &SampleServer::notifyServer); |
| 49 | } |
| 50 | |
| 51 | // method |
| 52 | void sayHello(const Json::Value &request, Json::Value &response) { response = "Hello: " + request["name"].asString(); } |
nothing calls this directly
no test coverage detected