Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Mount.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                     (C) 2002 SuSE AG |
00011 \----------------------------------------------------------------------/
00012 
00013    File:       Wget.h
00014    Purpose:    Declare interface to mount program
00015    Author:     Ludwig Nussel <lnussel@suse.de>
00016    Maintainer: Ludwig Nussel <lnussel@suse.de>
00017 
00018 /-*/
00019 
00020 
00021 // -*- C++ -*-
00022 
00023 #ifndef mount_h
00024 #define mount_h
00025 #include <set>
00026 #include <map>
00027 #include <string>
00028 
00029 #include <y2util/KVMap.h>
00030 #include <y2util/ExternalProgram.h>
00031 
00032 #include <y2pm/MediaError.h>
00033 
00038 class Mount
00039 {
00040     public:
00041 
00045         typedef MediaError Error;
00046 
00051         typedef ExternalProgram::Environment Environment;
00052 
00056         typedef KVMap<_KVMap::CharSep<'=',','> > Options;
00057 
00058     public:
00059 
00063         Mount();
00064 
00068         ~Mount();
00069 
00080         PMError mount ( const std::string& source,
00081                         const std::string& target,
00082                         const std::string& filesystem,
00083                         const std::string& options,
00084                         const Environment& environment = Environment() );
00085 
00090         PMError umount (const std::string& path);
00091 
00092     private:
00093 
00096         ExternalProgram *process;
00097 
00104         void run( const char *const *argv, const Environment& environment,
00105                   ExternalProgram::Stderr_Disposition stderr_disp =
00106                   ExternalProgram::Stderr_To_Stdout);
00107 
00108         void run( const char *const *argv,
00109                   ExternalProgram::Stderr_Disposition stderr_disp =
00110                   ExternalProgram::Stderr_To_Stdout) {
00111           Environment notused;
00112           run( argv, notused, stderr_disp );
00113         }
00114 
00118         int Status();
00119 
00122         void Kill();
00123 
00124 
00127         int exit_code;
00128 };
00129 
00130 #endif

Generated on Mon Sep 12 21:52:12 2005 for yast2-packagemanager by  doxygen 1.4.4