Confdump Agent
1.4.0
|
00001 /* 00002 * Confdump-Agent - Dump static and runtime system configuration 00003 * Copyright (C) 2009-2012 Straton IT, SAS 00004 * 00005 * This program is free software: you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License version 3 as 00007 * published by the Free Software Foundation. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef INCLUDED_SYSTEM_LINUX_PROCESS_HPP 00019 #define INCLUDED_SYSTEM_LINUX_PROCESS_HPP 00020 00021 #include <QtGlobal> 00022 #include <QObject> 00023 #include <QStringList> 00024 00025 #include "boost/shared_ptr.hpp" 00026 00027 #include "Confdump/System/ManagedElement.hpp" 00028 00029 namespace Confdump 00030 { 00031 00032 namespace System 00033 { 00034 00035 class LinuxDumper; 00036 00037 namespace Linux 00038 { 00039 00041 class Process : public System::ManagedElement 00042 { 00043 Q_OBJECT 00044 /* QVariant supports uint and ulonglong only, not ulong. Go for uint as it 00045 * has been observed to be 32b on all current Linux architectures. 00046 */ 00047 Q_PROPERTY( uint pid READ pid ) 00048 Q_PROPERTY( QString commandLine READ commandLine ) 00049 00050 Process(); 00051 00052 public: 00053 Process( boost::shared_ptr<LinuxDumper> driver, uint pid ); 00054 virtual ~Process(); 00055 00056 uint pid() const { return pid_; } 00057 QString commandLine() const; 00058 00059 private: 00060 uint pid_; 00061 QStringList arguments_; 00062 }; 00063 00064 } 00065 00066 } 00067 00068 } 00069 00070 #endif /* INCLUDED_SYSTEM_LINUX_PROCESS_HPP */