API Change: (sysadm/moused - new "action")

New Action: "list_device_options" - This will list all the per-device options which can be changed, with lists of possible settings or a description of the setting type that can be used.
----------

REST Request (example):
-------------------------------
PUT /sysadm/moused
{
   "action" : "list_device_options"
}

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

Response:
-------------------------------
{
  "args": {
    "list_device_options": {
      "accel_exponential": "float min=1.0 max=2.0",
      "accel_linear": "float min=0.01 max=100.00",
      "emulate_button_3": [
        "true",
        "false"
      ],
      "hand_mode": [
        "left",
        "right"
      ],
      "resolution": [
        "low",
        "medium-low",
        "medium-high",
        "high"
      ],
      "terminate_drift_threshold_pixels": "int min=0 max=1000",
      "virtual_scrolling": [
        "true",
        "false"
      ]
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
This commit is contained in:
Ken Moore
2017-01-18 16:07:32 -05:00
parent d1cfc02465
commit c876af3cc3

View File

@@ -1226,7 +1226,7 @@ RestOutputStruct::ExitCode WebSocket::EvaluateSysadmMousedRequest(const QJsonVal
if(action == "list_devices"){
outobj = sysadm::moused::listDevices();
}else if(action == "list_device_options"){
outobj = sysadm::moused::listOptions();
}else if(action == "read_device_options"){
}else if(action == "set_device_options"){