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