1 //===-- HostInfoWindows.h ---------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef lldb_Host_windows_HostInfoWindows_h_ 10 #define lldb_Host_windows_HostInfoWindows_h_ 11 12 #include "lldb/Host/HostInfoBase.h" 13 #include "lldb/Utility/FileSpec.h" 14 #include "llvm/Support/VersionTuple.h" 15 #include <optional> 16 17 namespace lldb_private { 18 class UserIDResolver; 19 20 class HostInfoWindows : public HostInfoBase { 21 friend class HostInfoBase; 22 23 public: 24 static void Initialize(SharedLibraryDirectoryHelper *helper = nullptr); 25 static void Terminate(); 26 27 static size_t GetPageSize(); 28 static UserIDResolver &GetUserIDResolver(); 29 30 static llvm::VersionTuple GetOSVersion(); 31 static std::optional<std::string> GetOSBuildString(); 32 static std::optional<std::string> GetOSKernelDescription(); 33 static bool GetHostname(std::string &s); 34 static FileSpec GetProgramFileSpec(); 35 static FileSpec GetDefaultShell(); 36 37 static bool GetEnvironmentVar(const std::string &var_name, std::string &var); 38 39 private: 40 static FileSpec m_program_filespec; 41 }; 42 } 43 44 #endif 45