diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-12-31 09:37:03 +0200 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2012-12-31 09:37:03 +0200 |
commit | 9152e575ae53aa1c79ec7d41a96add4301af2e21 (patch) | |
tree | bf317b5d780f69dcd2d02160870085eaf54b5b61 /discmgr.h | |
download | vdr-plugin-bluray-9152e575ae53aa1c79ec7d41a96add4301af2e21.tar.gz vdr-plugin-bluray-9152e575ae53aa1c79ec7d41a96add4301af2e21.tar.bz2 |
Initial import
Diffstat (limited to 'discmgr.h')
-rw-r--r-- | discmgr.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/discmgr.h b/discmgr.h new file mode 100644 index 0000000..ba85a84 --- /dev/null +++ b/discmgr.h @@ -0,0 +1,45 @@ +/* + * discmgr.h: BluRay disc / drive manager + * + * See the README file for copyright information and how to reach the author. + * + */ + +#ifndef _DISCMGR_H +#define _DISCMGR_H + +#include <vdr/tools.h> + +#define DEFAULT_DEVICE "/dev/sr0" +#define DEFAULT_PATH "/media/cdrom" +#define DEFAULT_MOUNTER "/bin/mount" +#define DEFAULT_UNMOUNTER "/bin/umount" +#define DEFAULT_EJECT "/usr/bin/eject" + +class cDiscMgr { + +private: + + cString Device, Path, MountCmd, UnMountCmd, EjectCmd; + + bool IsMounted(void); + void Mount(bool Retry = true); + void UnMount(void); + void CloseTray(void); + + public: + cDiscMgr(); + + const char *GetPath(void) { return Path; } + + void SetDevice(const char *D) { Device = D; } + void SetPath(const char *P) { Path = P; } + void SetMountCmd(const char *M) { MountCmd = M; } + void SetUnMountCmd(const char *U) { UnMountCmd = U; } + void SetEjectCmd(const char *E) { EjectCmd = E; } + + bool CheckDisc(void); + void Eject(void); +}; + +#endif //_DISCMGR_H |