00001 #ifndef OSDL_CD_ROM_DRIVE_HANDLER_H_
00002 #define OSDL_CD_ROM_DRIVE_HANDLER_H_
00003
00004
00005 #include "OSDLException.h"
00006
00007 #include "Ceylan.h"
00008
00009
00010 #include <string>
00011 #include <map>
00012
00013
00014 namespace OSDL
00015 {
00016
00017
00018
00020 class OSDL_DLL CDROMDriveException : public OSDL::Exception
00021 {
00022
00023 public:
00024
00025 CDROMDriveException( const std::string & message ) throw() ;
00026 virtual ~CDROMDriveException() throw() ;
00027
00028 } ;
00029
00030
00031
00037 typedef Ceylan::Count CDROMDriveNumber ;
00038
00039
00040
00041 class CDROMDrive ;
00042
00043
00050 class OSDL_DLL CDROMDriveHandler : public Ceylan::Object
00051 {
00052
00053
00054 public:
00055
00056
00065 CDROMDriveHandler() throw( CDROMDriveException ) ;
00066
00067
00068
00069 virtual ~CDROMDriveHandler() throw() ;
00070
00071
00079 static CDROMDriveNumber GetAvailableCDROMDrivesCount() throw() ;
00080
00081
00099 CDROMDrive & getCDROMDrive( CDROMDriveNumber number = 0 )
00100 throw( CDROMDriveException ) ;
00101
00102
00114 virtual const std::string toString(
00115 Ceylan::VerbosityLevels level = Ceylan::high ) const throw() ;
00116
00117
00118
00119 private:
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 #pragma warning( push )
00130 #pragma warning( disable : 4251 )
00131
00137 std::map<CDROMDriveNumber, CDROMDrive *> _drives ;
00138
00139 #pragma warning( pop )
00140
00141
00150 explicit CDROMDriveHandler( const CDROMDriveHandler & source )
00151 throw() ;
00152
00153
00162 CDROMDriveHandler & operator = ( const CDROMDriveHandler & source )
00163 throw() ;
00164
00165
00166 } ;
00167
00168
00169 }
00170
00171
00172
00173 #endif // OSDL_CD_ROM_DRIVE_HANDLER_H_