| 276 | } |
| 277 | |
| 278 | static std::optional<CloudIntercept::RpcResult> DispatchCloudRpc( |
| 279 | const char* method, uint32_t appId, const std::vector<PB::Field>& reqBody) { |
| 280 | using namespace CloudIntercept; |
| 281 | if (strcmp(method, RPC_GET_CHANGELIST) == 0) return HandleGetChangelist(appId, reqBody); |
| 282 | if (strcmp(method, RPC_LAUNCH_INTENT) == 0) return HandleLaunchIntent(appId, reqBody); |
| 283 | if (strcmp(method, RPC_SUSPEND_SESSION) == 0) return HandleSuspendSession(appId, reqBody); |
| 284 | if (strcmp(method, RPC_RESUME_SESSION) == 0) return HandleResumeSession(appId, reqBody); |
| 285 | if (strcmp(method, RPC_QUOTA_USAGE) == 0) return HandleQuotaUsage(appId, reqBody); |
| 286 | if (strcmp(method, RPC_BEGIN_BATCH) == 0) return HandleBeginBatch(appId, reqBody); |
| 287 | if (strcmp(method, RPC_BEGIN_UPLOAD) == 0) return HandleBeginFileUpload(appId, reqBody); |
| 288 | if (strcmp(method, RPC_COMMIT_UPLOAD) == 0) return HandleCommitFileUpload(appId, reqBody); |
| 289 | if (strcmp(method, RPC_COMPLETE_BATCH) == 0) return HandleCompleteBatch(appId, reqBody); |
| 290 | if (strcmp(method, RPC_FILE_DOWNLOAD) == 0) return HandleFileDownload(appId, reqBody); |
| 291 | if (strcmp(method, RPC_DELETE_FILE) == 0) return HandleDeleteFile(appId, reqBody); |
| 292 | return std::nullopt; |
| 293 | } |
| 294 | |
| 295 | static std::atomic<bool> g_initFailed{false}; |
| 296 |
no test coverage detected