00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef mount_h
00024 #define mount_h
00025 #include <set>
00026 #include <string>
00027
00028 #include <y2pm/MediaError.h>
00029 #include <y2util/ExternalProgram.h>
00030
00035 class Mount
00036 {
00037 public:
00038
00042 typedef MediaError Error;
00043
00044 public:
00045
00049 Mount();
00050
00054 ~Mount();
00055
00065 PMError mount (const std::string& source,
00066 const std::string& target,
00067 const std::string& filesystem,
00068 const std::string& options);
00069
00074 PMError umount (const std::string& path);
00075
00076 private:
00077
00080 ExternalProgram *process;
00081
00088 void run(const char *const *argv,
00089 ExternalProgram::Stderr_Disposition stderr_disp =
00090 ExternalProgram::Stderr_To_Stdout);
00091
00095 int Status();
00096
00099 void Kill();
00100
00101
00104 int exit_code;
00105 };
00106
00107 #endif