1 //===-- SBProcessInfo.h -----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_SBProcessInfo_h_
11 #define LLDB_SBProcessInfo_h_
12 
13 #include "lldb/API/SBDefines.h"
14 
15 namespace lldb {
16 
17 class LLDB_API SBProcessInfo {
18 public:
19   SBProcessInfo();
20   SBProcessInfo(const SBProcessInfo &rhs);
21 
22   ~SBProcessInfo();
23 
24   SBProcessInfo &operator=(const SBProcessInfo &rhs);
25 
26   bool IsValid() const;
27 
28   const char *GetName();
29 
30   SBFileSpec GetExecutableFile();
31 
32   lldb::pid_t GetProcessID();
33 
34   uint32_t GetUserID();
35 
36   uint32_t GetGroupID();
37 
38   bool UserIDIsValid();
39 
40   bool GroupIDIsValid();
41 
42   uint32_t GetEffectiveUserID();
43 
44   uint32_t GetEffectiveGroupID();
45 
46   bool EffectiveUserIDIsValid();
47 
48   bool EffectiveGroupIDIsValid();
49 
50   lldb::pid_t GetParentProcessID();
51 
52 private:
53   friend class SBProcess;
54 
55   lldb_private::ProcessInstanceInfo &ref();
56 
57   void SetProcessInfo(const lldb_private::ProcessInstanceInfo &proc_info_ref);
58 
59   std::unique_ptr<lldb_private::ProcessInstanceInfo> m_opaque_ap;
60 };
61 
62 } // namespace lldb
63 
64 #endif // LLDB_SBProcessInfo_h_
65