MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
MythCDROM Class Reference

#include <mythcdrom.h>

Inheritance diagram for MythCDROM:
Inheritance graph
[legend]
Collaboration diagram for MythCDROM:
Collaboration graph
[legend]

Public Types

enum  ImageType { kUnknown, kBluray, kDVD }
 

Public Member Functions

virtual ~MythCDROM ()
 
virtual bool mediaChanged (void)
 
virtual bool checkOK (void)
 
virtual MythMediaStatus checkMedia (void)
 
virtual void setDeviceSpeed (const char *devicePath, int speed)
 
- Public Member Functions inherited from MythMediaDevice
 MythMediaDevice (QObject *par, const char *DevicePath, bool SuperMount, bool AllowEject)
 
const QString & getMountPath () const
 
void setMountPath (const char *path)
 
const QString & getDevicePath () const
 
const QString & getRealDevice () const
 
const QString & getDeviceModel () const
 
void setDeviceModel (const char *model)
 
MythMediaStatus getStatus () const
 
const QString & getVolumeID () const
 
void setVolumeID (const char *vol)
 
const QString & getKeyID () const
 
bool getAllowEject () const
 
bool getLocked () const
 
bool isDeviceOpen () const
 
bool isUsable () const
 Is this device "ready", for a plugin to access? More...
 
MythMediaType getMediaType () const
 
bool isSuperMount () const
 
virtual MythMediaError testMedia ()
 
virtual bool openDevice ()
 
virtual bool closeDevice ()
 
virtual bool isSameDevice (const QString &path)
 
virtual void setSpeed (int speed)
 
virtual MythMediaError eject (bool open_close=true)
 
virtual MythMediaError lock ()
 
virtual MythMediaError unlock ()
 
virtual bool performMountCmd (bool DoMount)
 
bool mount ()
 
bool unmount ()
 
bool isMounted (bool bVerify=true)
 Tells us if m_DevicePath is a mounted device. More...
 
bool findMountPath ()
 Try to find a mount of m_DevicePath in the mounts file. More...
 
void clearData ()
 
QString MediaTypeString ()
 

Static Public Member Functions

static MythCDROMget (QObject *par, const char *devicePath, bool SuperMount, bool AllowEject)
 
static ImageType inspectImage (const QString &path)
 
- Static Public Member Functions inherited from MythMediaDevice
static void RegisterMediaExtensions (uint mediatype, const QString &extensions)
 Used to register media types with extensions. More...
 
static QString MediaTypeString (uint type)
 

Protected Member Functions

 MythCDROM (QObject *par, const char *DevicePath, bool SuperMount, bool AllowEject)
 
virtual void onDeviceMounted ()
 Override this to perform any post mount logic. More...
 
- Protected Member Functions inherited from MythMediaDevice
virtual ~MythMediaDevice ()
 
virtual void onDeviceUnmounted ()
 Override this to perform any post unmount logic. More...
 
MythMediaType DetectMediaType (void)
 Returns guessed media type based on file extensions. More...
 
bool ScanMediaType (const QString &directory, ext_cnt_t &counts)
 Recursively scan directories and create an associative array with the number of times we've seen each extension. More...
 
MythMediaStatus setStatus (MythMediaStatus newStat, bool CloseIt=false)
 

Additional Inherited Members

- Signals inherited from MythMediaDevice
void statusChanged (MythMediaStatus oldStatus, MythMediaDevice *pMedia)
 
- Static Public Attributes inherited from MythMediaDevice
static const char * MediaStatusStrings []
 
static const char * MediaErrorStrings []
 
- Protected Attributes inherited from MythMediaDevice
QString m_DeviceModel
 The device Manufacturer/Model. Read/write. More...
 
QString m_DevicePath
 The path to this media's device. More...
 
QString m_KeyID
 KeyID of the media. More...
 
QString m_MountPath
 The path to this media's mount point. More...
 
QString m_RealDevice
 If m_DevicePath is a symlink, its target. More...
 
QString m_VolumeID
 The volume ID of the media. Read/write. More...
 
MythMediaStatus m_Status
 The status of the media as of the. More...
 
MythMediaType m_MediaType
 last call to checkMedia. Read only More...
 
bool m_AllowEject
 Allow the user to eject the media?. Read only. More...
 
bool m_Locked
 Is this media locked?. Read only. More...
 
bool m_SuperMount
 Is this a supermount device?. Read only. More...
 
int m_DeviceHandle
 A file handle for opening and closing the device, ioctls(), et c. More...
 

Detailed Description

Definition at line 6 of file mythcdrom.h.

Member Enumeration Documentation

◆ ImageType

Enumerator
kUnknown 
kBluray 
kDVD 

Definition at line 26 of file mythcdrom.h.

Constructor & Destructor Documentation

◆ MythCDROM()

MythCDROM::MythCDROM ( QObject *  par,
const char *  DevicePath,
bool  SuperMount,
bool  AllowEject 
)
protected

Definition at line 49 of file mythcdrom.cpp.

Referenced by get().

◆ ~MythCDROM()

virtual MythCDROM::~MythCDROM ( )
inlinevirtual

Definition at line 13 of file mythcdrom.h.

Member Function Documentation

◆ mediaChanged()

virtual bool MythCDROM::mediaChanged ( void  )
inlinevirtual

Reimplemented in MythCDROMLinux.

Definition at line 15 of file mythcdrom.h.

◆ checkOK()

virtual bool MythCDROM::checkOK ( void  )
inlinevirtual

Reimplemented in MythCDROMLinux.

Definition at line 16 of file mythcdrom.h.

◆ checkMedia()

virtual MythMediaStatus MythCDROM::checkMedia ( void  )
inlinevirtual

Implements MythMediaDevice.

Reimplemented in MythCDROMLinux.

Definition at line 17 of file mythcdrom.h.

◆ setDeviceSpeed()

void MythCDROM::setDeviceSpeed ( const char *  devicePath,
int  speed 
)
virtual

Reimplemented from MythMediaDevice.

Reimplemented in MythCDROMLinux, and MythCDROMDarwin.

Definition at line 132 of file mythcdrom.cpp.

Referenced by MediaMonitor::SetCDSpeed().

◆ get()

MythCDROM * MythCDROM::get ( QObject *  par,
const char *  devicePath,
bool  SuperMount,
bool  AllowEject 
)
static

◆ inspectImage()

MythCDROM::ImageType MythCDROM::inspectImage ( const QString &  path)
static

◆ onDeviceMounted()

void MythCDROM::onDeviceMounted ( void  )
protectedvirtual

Override this to perform any post mount logic.

Reimplemented from MythMediaDevice.

Definition at line 55 of file mythcdrom.cpp.

Referenced by MythCDROMLinux::checkMedia().


The documentation for this class was generated from the following files: