1 #include "FlickCommand.h"
6 FlickCommand::FlickCommand(const ::aurum::ReqFlick *request,
7 ::aurum::RspFlick * response)
8 : mRequest{request}, mResponse{response}
12 ::grpc::Status FlickCommand::execute()
14 LOG_SCOPE_F(INFO, "Flick --------------- ");
16 const ::aurum::Point &startPoint = mRequest->startpoint();
17 const ::aurum::Point &endPoint = mRequest->endpoint();
18 int durationMs = mRequest->durationms();
20 std::shared_ptr<UiDevice> device = UiDevice::getInstance();
21 device->drag(startPoint.x(), startPoint.y(), endPoint.x(), endPoint.y(), durationMs/MINIMUM_TOUCHEVENT_INTV_MS, durationMs);
22 mResponse->set_status(::aurum::RspStatus::OK);
24 return grpc::Status::OK;