00001 #ifndef MYTH_MEDIA_MONITOR_UNIX_H 00002 #define MYTH_MEDIA_MONITOR_UNIX_H 00003 00004 #define DEFAULT_DVD "/dev/dvd" 00005 #define DEFAULT_CD "/dev/cdrom" 00006 00007 #include "config.h" 00008 00009 #include <QString> 00010 #if CONFIG_QTDBUS 00011 #include <QtDBus> 00012 #endif 00013 00014 #include "mythmediamonitor.h" 00015 00016 class MediaMonitorUnix : public MediaMonitor 00017 { 00018 #if CONFIG_QTDBUS 00019 Q_OBJECT 00020 public slots: 00021 Q_NOREPLY void deviceAdded(QDBusObjectPath); 00022 Q_NOREPLY void deviceRemoved(QDBusObjectPath); 00023 #endif 00024 00025 public: 00026 MediaMonitorUnix(QObject *par, unsigned long interval, bool allowEject); 00027 #if !CONFIG_QTDBUS 00028 virtual void deleteLater(void); 00029 #endif 00030 00031 protected: 00032 ~MediaMonitorUnix() {} 00033 00034 #if !CONFIG_QTDBUS 00035 virtual void CheckDeviceNotifications(void); 00036 #endif 00037 bool CheckFileSystemTable(void); 00038 bool CheckMountable(void); 00039 #if !CONFIG_QTDBUS 00040 bool CheckRemovable(const QString &dev); 00041 bool FindPartitions(const QString &dev, bool checkPartitions); 00042 #endif 00043 00044 virtual bool AddDevice(MythMediaDevice* pDevice); 00045 bool AddDevice(struct fstab* mep); 00046 00047 #if !CONFIG_QTDBUS 00048 QString GetDeviceFile(const QString &sysfs); 00049 #endif 00050 00051 virtual QStringList GetCDROMBlockDevices(void); 00052 00053 protected: 00054 int m_fifo; 00055 static const char *kUDEV_FIFO; 00056 }; 00057 00058 #endif // MYTH_MEDIA_MONITOR_H
1.6.3