| 897 | } |
| 898 | |
| 899 | int64_t cancelHighIOFreq(int tid, uint64_t timestamp) { |
| 900 | IClientEngine *pEngine = engine(); |
| 901 | if (!pEngine) { |
| 902 | return -3; |
| 903 | } |
| 904 | int64_t requestid = 0L; |
| 905 | if (HEADER_VERSION >= HEADER_JSON_VERSION) {//json |
| 906 | cJSON *jsonRequest; |
| 907 | jsonRequest = cJSON_CreateObject(); |
| 908 | cJSON_AddNumberToObject(jsonRequest, "jsonVersion", JSON_VERSION); |
| 909 | cJSON_AddNumberToObject(jsonRequest, "funcid", FUNC_CANCEL_HIGH_IO_FREQ); |
| 910 | cJSON_AddNumberToObject(jsonRequest, "status", STATUS_RESET); |
| 911 | cJSON_AddNumberToObject(jsonRequest, "iolevel", IO_LEVEL_0); |
| 912 | |
| 913 | char *body = cJSON_Print(jsonRequest); |
| 914 | std::string str(body); |
| 915 | uint32_t len = str.length(); |
| 916 | cJSON_Delete(jsonRequest); |
| 917 | requestid = pEngine ->sendReq(FUNC_CANCEL_HIGH_IO_FREQ, (uint8_t *)body, len, tid, timestamp); |
| 918 | free(body); |
| 919 | } else { |
| 920 | requestid = pEngine->sendReq(FUNC_CANCEL_HIGH_IO_FREQ, NULL, 0, tid, timestamp); |
| 921 | } |
| 922 | pdbg("cancelHighIOFreq requestid:%lld", requestid); |
| 923 | return requestid; |
| 924 | } |
| 925 | |
| 926 | int64_t requestScreenResolution(int level, std::string uiName, int tid, int64_t timestamp) { |
| 927 | IClientEngine *pEngine = engine(); |
nothing calls this directly
no test coverage detected