API Change (new "action"):

New Action for the sysadm/moused class:
"read_device_options" - This will list all the current settings for a given device.
REQUIRED ARGUMENTS: "device":"<device_id>"
----------------

REST Request (example):
-------------------------------
PUT /sysadm/moused
{
   "device" : "psm0",
   "action" : "read_device_options"
}

WebSocket Request:
-------------------------------
{
   "name" : "moused",
   "id" : "fooid",
   "namespace" : "sysadm",
   "args" : {
      "action" : "read_device_options",
      "device" : "psm0"
   }
}

Response:
-------------------------------
{
  "args": {
    "read_device_options": {
      "accel_exponential": "1.0",
      "accel_linear": "1.0",
      "device": "psm0",
      "emulate_button_3": "false",
      "hand_mode": "right",
      "resolution": "medium-low",
      "terminate_drift_threshold_pixels": "0",
      "virtual_scrolling": "false"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
This commit is contained in:
Ken Moore
2017-01-18 16:16:52 -05:00
parent c876af3cc3
commit 47d5c73dba

View File

@@ -1228,7 +1228,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmMousedRequest(const QJsonVal
}else if(action == "list_device_options"){
outobj = sysadm::moused::listOptions();
}else if(action == "read_device_options"){
outobj = sysadm::moused::readOptions(in_args.toObject());
}else if(action == "set_device_options"){
}