MediaCD.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #ifndef ZYPP_MEDIA_MEDIACD_H
00013 #define ZYPP_MEDIA_MEDIACD_H
00014 
00015 #include "zypp/media/MediaHandler.h"
00016 #include "zypp/media/MediaManager.h"
00017 
00018 namespace zypp {
00019   namespace media {
00020 
00022     //
00023     //  CLASS NAME : MediaCD
00028     class MediaCD : public MediaHandler {
00029 
00030       private:
00031 
00032         typedef std::list<MediaSource> DeviceList;
00034         DeviceList _devices;
00035 
00037         int        _lastdev;
00038 
00039         static bool openTray( const std::string & device_r );
00040         static bool closeTray( const std::string & device_r );
00041 
00042         DeviceList  detectDevices(bool supportingDVD);
00043 
00044       protected:
00045 
00046         MEDIA_HANDLER_API;
00047 
00048         virtual void forceEject();
00049 
00050         virtual bool isAutoMountedMedia(const AttachedMedia &media);
00051 
00052       public:
00053 
00054         MediaCD( const Url &      url_r,
00055                  const Pathname & attach_point_hint_r );
00056 
00057         virtual ~MediaCD() { try { release(); } catch(...) {} }
00058 
00059         virtual bool isAttached() const;
00060     };
00061 
00063   } // namespace media
00064 } // namespace zypp
00065 #endif // ZYPP_MEDIA_MEDIACD_H

Generated on Thu Jul 6 00:07:21 2006 for zypp by  doxygen 1.4.6