1 /* 2 * Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef ACTIVE_PROCESS_INFO_H 6 #define ACTIVE_PROCESS_INFO_H 7 8 9 #include <OS.h> 10 #include <String.h> 11 12 13 class ActiveProcessInfo { 14 public: 15 ActiveProcessInfo(); 16 17 void SetTo(pid_t id, const BString& name, 18 const BString& currentDirectory); 19 void Unset(); 20 21 bool IsValid() const { return fID >= 0; } 22 23 pid_t ID() const { return fID; } 24 25 const BString& Name() const { return fName; } 26 const BString& CurrentDirectory() const 27 { return fCurrentDirectory; } 28 29 private: 30 pid_t fID; 31 BString fName; 32 BString fCurrentDirectory; 33 }; 34 35 36 37 #endif // ACTIVE_PROCESS_INFO_H 38