Confdump Agent  1.4.0
MountEntry.hpp
Go to the documentation of this file.
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_MOUNT_ENTRY_HPP
00019 #define INCLUDED_SYSTEM_LINUX_MOUNT_ENTRY_HPP
00020 
00021 #include <stdio.h>
00022 
00023 #include <vector>
00024 
00025 #include "QObject"
00026 #include "QString"
00027 
00028 #include "boost/shared_ptr.hpp"
00029 #include "boost/filesystem/path.hpp"
00030 
00031 #include "Confdump/System/ManagedElement.hpp"
00032 
00033 struct mntent;
00034 
00035 namespace Confdump
00036 {
00037 
00038 namespace System
00039 {
00040 
00041 class LinuxDumper;
00042 
00043 namespace Linux
00044 {
00045 
00046 class MountEntry : public System::ManagedElement
00047 {
00048     Q_OBJECT
00049     Q_PROPERTY( QString fileSystem READ fileSystem )
00050     Q_PROPERTY( QString mountPoint READ mountPoint )
00051     Q_PROPERTY( QString type READ type )
00052     Q_PROPERTY( QString options READ options )
00053     Q_PROPERTY( int checkFrequency READ checkFrequency )
00054     Q_PROPERTY( int checkPassNumber READ checkPassNumber )
00055 
00056     MountEntry();
00057     MountEntry( const struct mntent *entry );
00058 
00059 public:
00060     static std::vector< boost::shared_ptr< MountEntry > > allMountEntriesFrom( boost::shared_ptr<LinuxDumper> driver, const boost::filesystem::path &fstab_path );
00061     virtual ~MountEntry();
00062 
00063     QString fileSystem() const;
00064     QString mountPoint() const;
00065     QString type() const;
00066     QString options() const;
00067     int checkFrequency() const { return checkFrequency_; }
00068     int checkPassNumber() const { return checkPassNumber_; }
00069 
00070 private:
00071     QString fileSystem_;
00072     QString mountPoint_;
00073     QString type_;
00074     QString options_;
00075     int checkFrequency_;
00076     int checkPassNumber_;
00077 };
00078 
00079 }
00080 
00081 }
00082 
00083 }
00084 
00085 #endif /* INCLUDED_SYSTEM_LINUX_MOUNT_ENTRY_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends