From 352b2b225af7c5e514a91c942a101f16f787521d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 31 Dec 2008 13:44:12 -0800 Subject: [PATCH] IGN:Add open method to device interface --- src/calibre/devices/interface.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/calibre/devices/interface.py b/src/calibre/devices/interface.py index fb581e9545..e2959cd49f 100644 --- a/src/calibre/devices/interface.py +++ b/src/calibre/devices/interface.py @@ -39,6 +39,18 @@ class Device(object): '''Return the FDI description of this device for HAL on linux.''' return '' + def open(self): + ''' + Perform any device specific initialization. Called after the device is + detected but before any other functions that communicate with the device. + For example: For devices that present themselves as USB Mass storage + devices, this method would be responsible for mounting the device or + if the device has been automounted, for finding out where it has been + mounted. The driver for the PRS505 has a implementation of this function + that should serve as a good example for USB Mass storage devices. + ''' + raise NotImplementedError() + def set_progress_reporter(self, report_progress): ''' @param report_progress: Function that is called with a % progress