| 48 | } |
| 49 | |
| 50 | std::string IEServer::GetStatus() { |
| 51 | LOG(TRACE) << "Entering IEServer::GetStatus"; |
| 52 | SYSTEM_INFO system_info; |
| 53 | ::ZeroMemory(&system_info, sizeof(SYSTEM_INFO)); |
| 54 | ::GetNativeSystemInfo(&system_info); |
| 55 | |
| 56 | std::string os_version = FileUtilities::GetFileVersion("kernel32.dll"); |
| 57 | |
| 58 | std::string arch = "x86"; |
| 59 | if (system_info.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { |
| 60 | arch = "x64"; |
| 61 | } |
| 62 | |
| 63 | Json::Value build; |
| 64 | build["version"] = this->version_; |
| 65 | |
| 66 | Json::Value os; |
| 67 | os["arch"] = arch; |
| 68 | os["name"] = "windows"; |
| 69 | os["version"] = os_version; |
| 70 | |
| 71 | bool is_ready = this->session_count() < 1; |
| 72 | std::string message = "Ready to create session"; |
| 73 | if (!is_ready) { |
| 74 | message = "Maximum number of sessions already created"; |
| 75 | } |
| 76 | |
| 77 | Json::Value status; |
| 78 | status["build"] = build; |
| 79 | status["os"] = os; |
| 80 | status["ready"] = is_ready; |
| 81 | status["message"] = message; |
| 82 | Response response; |
| 83 | response.SetSuccessResponse(status); |
| 84 | return response.Serialize(); |
| 85 | } |
| 86 | |
| 87 | void IEServer::ShutDown() { |
| 88 | LOG(TRACE) << "Entering IEServer::ShutDown"; |
no test coverage detected