1 //===-- HostInfoPosix.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_posix_HostInfoPosix_h_
10 #define lldb_Host_posix_HostInfoPosix_h_
11 
12 #include "lldb/Host/HostInfoBase.h"
13 #include "lldb/Utility/FileSpec.h"
14 
15 namespace lldb_private {
16 
17 class UserIDResolver;
18 
19 class HostInfoPosix : public HostInfoBase {
20   friend class HostInfoBase;
21 
22 public:
23   static size_t GetPageSize();
24   static bool GetHostname(std::string &s);
25 
26   static uint32_t GetUserID();
27   static uint32_t GetGroupID();
28   static uint32_t GetEffectiveUserID();
29   static uint32_t GetEffectiveGroupID();
30 
31   static FileSpec GetDefaultShell();
32 
33   static bool GetEnvironmentVar(const std::string &var_name, std::string &var);
34 
35   static UserIDResolver &GetUserIDResolver();
36 
37 protected:
38   static bool ComputeSupportExeDirectory(FileSpec &file_spec);
39   static bool ComputeHeaderDirectory(FileSpec &file_spec);
40 };
41 }
42 
43 #endif
44