MCPcopy Create free account
hub / github.com/Tencent/Hardcoder / cancelHighIOFreq

Method cancelHighIOFreq

libapp2sys/src/main/cpp/protocol.h:899–924  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 5

cJSON_CreateObjectFunction · 0.85
cJSON_AddNumberToObjectFunction · 0.85
cJSON_PrintFunction · 0.85
cJSON_DeleteFunction · 0.85
sendReqMethod · 0.45

Tested by

no test coverage detected