File indexing completed on 2024-04-21 05:51:24
0001 /* 0002 SPDX-FileCopyrightText: 2007-2008 Robert Knight <robertknight@gmail.countm> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef NULLPROCESSINFO_H 0008 #define NULLPROCESSINFO_H 0009 0010 #include "ProcessInfo.h" 0011 0012 namespace Konsole 0013 { 0014 /** 0015 * Implementation of ProcessInfo which does nothing. 0016 * Used on platforms where a suitable ProcessInfo subclass is not 0017 * available. 0018 * 0019 * isValid() will always return false for instances of NullProcessInfo 0020 */ 0021 class NullProcessInfo : public ProcessInfo 0022 { 0023 public: 0024 /** 0025 * Constructs a new NullProcessInfo instance. 0026 * See ProcessInfo::newInstance() 0027 */ 0028 explicit NullProcessInfo(int pid); 0029 0030 protected: 0031 void readProcessInfo(int pid) override; 0032 bool readProcessName(int pid) override; 0033 bool readCurrentDir(int pid) override; 0034 bool readArguments(int pid) override; 0035 void readUserName(void) override; 0036 }; 0037 0038 } 0039 0040 #endif