From fae96a6aea767a4ede57795b0e37d942048ddd00 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 28 Feb 2009 14:25:37 -0800 Subject: [PATCH] IGN:Preliminary windows only Blackberry driver --- src/calibre/devices/__init__.py | 3 ++- src/calibre/devices/blackberry/__init__.py | 6 +++++ src/calibre/devices/blackberry/driver.py | 30 ++++++++++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 src/calibre/devices/blackberry/__init__.py create mode 100644 src/calibre/devices/blackberry/driver.py diff --git a/src/calibre/devices/__init__.py b/src/calibre/devices/__init__.py index ed16dba14b..a673d3fe09 100644 --- a/src/calibre/devices/__init__.py +++ b/src/calibre/devices/__init__.py @@ -12,7 +12,8 @@ def devices(): from calibre.devices.cybookg3.driver import CYBOOKG3 from calibre.devices.kindle.driver import KINDLE from calibre.devices.kindle.driver import KINDLE2 - return (PRS500, PRS505, PRS700, CYBOOKG3, KINDLE, KINDLE2) + from calibre.devices.blackberry.driver import BLACKBERRY + return (PRS500, PRS505, PRS700, CYBOOKG3, KINDLE, KINDLE2, BLACKBERRY) import time diff --git a/src/calibre/devices/blackberry/__init__.py b/src/calibre/devices/blackberry/__init__.py new file mode 100644 index 0000000000..c8c1a8f015 --- /dev/null +++ b/src/calibre/devices/blackberry/__init__.py @@ -0,0 +1,6 @@ +from __future__ import with_statement +__license__ = 'GPL 3' +__copyright__ = '2009, Kovid Goyal ' +__docformat__ = 'restructuredtext en' + + diff --git a/src/calibre/devices/blackberry/driver.py b/src/calibre/devices/blackberry/driver.py new file mode 100644 index 0000000000..6218c662ac --- /dev/null +++ b/src/calibre/devices/blackberry/driver.py @@ -0,0 +1,30 @@ +from __future__ import with_statement +__license__ = 'GPL 3' +__copyright__ = '2009, Kovid Goyal ' +__docformat__ = 'restructuredtext en' + + +from calibre.devices.usbms.driver import USBMS + +class BLACKBERRY(USBMS): + # Ordered list of supported formats + FORMATS = ['mobi', 'prc'] + + VENDOR_ID = [0x0fca] + PRODUCT_ID = [0x8004] + BCD = [0x0200] + + VENDOR_NAME = 'RIM' + WINDOWS_MAIN_MEM = 'BLACKBERRY_SD' + #WINDOWS_CARD_MEM = 'CARD_STORAGE' + + #OSX_MAIN_MEM = 'Kindle Internal Storage Media' + #OSX_CARD_MEM = 'Kindle Card Storage Media' + + MAIN_MEMORY_VOLUME_LABEL = 'Blackberry Main Memory' + #STORAGE_CARD_VOLUME_LABEL = 'Kindle Storage Card' + + EBOOK_DIR_MAIN = 'ebooks' + #EBOOK_DIR_CARD = "documents" + SUPPORTS_SUB_DIRS = False +