~ubuntu-branches/debian/wheezy/calibre/wheezy

« back to all changes in this revision

Viewing changes to src/calibre/devices/android/driver.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-08-11 11:30:57 UTC
  • mfrom: (1.3.14 upstream)
  • mto: (29.3.2 oneiric)
  • mto: This revision was merged to the branch mainline in revision 31.
  • Revision ID: james.westby@ubuntu.com-20100811113057-2jhbcbavxw7wlt0c
Tags: 0.7.13+dfsg-1
* New upstream version.
* debian/control: Add python-routes recommends. (Closes: #590561)
* Convert to 3.0 (quilt) source format.
* Bump debhelper compat level to 7, and drop now obsolete
  DEB_DH_INSTALL_SOURCEDIR in debian/rules.
* debian/control: Add missing ${misc:Depends}.
* debian/control: Bump Standards-Version to 3.9.1.
* debian/copyright: Replace obsolete reference to
  /usr/share/common-licenses/BSD with their verbatim text from the original
  source.
* debian/rules: Remove invalid hashbang lines from *.recipe, these have no
  __main__.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
    VENDOR_ID   = {
21
21
            # HTC
22
 
            0x0bb4 : { 0x0c02 : [0x100], 0x0c01 : [0x100], 0x0ff9 : [0x0100]},
 
22
            0x0bb4 : { 0x0c02 : [0x100, 0x227], 0x0c01 : [0x100, 0x227], 0x0ff9
 
23
                : [0x0100, 0x227]},
23
24
 
24
25
            # Motorola
25
 
            0x22b8 : { 0x41d9 : [0x216], 0x2d67 : [0x100], 0x41db : [0x216]},
 
26
            0x22b8 : { 0x41d9 : [0x216], 0x2d67 : [0x100], 0x41db : [0x216],
 
27
                0x4285 : [0x216]},
26
28
 
27
29
            # Sony Ericsson
28
30
            0xfce : { 0xd12e : [0x0100]},
30
32
            0x18d1 : { 0x4e11 : [0x0100, 0x226], 0x4e12: [0x0100, 0x226]},
31
33
 
32
34
            # Samsung
33
 
            0x04e8 : { 0x681d : [0x0222, 0x0400], 0x681c : [0x0222, 0x0224]},
 
35
            0x04e8 : { 0x681d : [0x0222, 0x0400],
 
36
                       0x681c : [0x0222, 0x0224, 0x0400]},
34
37
 
35
38
            # Acer
36
39
            0x502 : { 0x3203 : [0x0100]},
51
54
            'GT-I5700', 'SAMSUNG', 'DELL', 'LINUX']
52
55
    WINDOWS_MAIN_MEM = ['ANDROID_PHONE', 'A855', 'A853', 'INC.NEXUS_ONE',
53
56
            '__UMS_COMPOSITE', '_MB200', 'MASS_STORAGE', '_-_CARD',
54
 
            'GT-I9000', 'FILE-STOR_GADGET']
 
57
            'GT-I9000', 'FILE-STOR_GADGET', 'SGH-T959']
55
58
    WINDOWS_CARD_A_MEM = ['ANDROID_PHONE', 'GT-I9000_CARD',
56
 
            'FILE-STOR_GADGET']
 
59
            'FILE-STOR_GADGET', 'SGH-T959']
57
60
 
58
61
    OSX_MAIN_MEM = 'HTC Android Phone Media'
59
62
 
70
73
            dirs = [x.strip() for x in dirs.split(',')]
71
74
        self.EBOOK_DIR_MAIN = dirs
72
75
 
 
76
    def get_main_ebook_dir(self, for_upload=False):
 
77
        dirs = self.EBOOK_DIR_MAIN
 
78
        if not for_upload:
 
79
            def aldiko_tweak(x):
 
80
                return 'eBooks' if x == 'eBooks/import' else x
 
81
            if isinstance(dirs, basestring):
 
82
                dirs = [dirs]
 
83
            dirs = list(map(aldiko_tweak, dirs))
 
84
        return dirs
 
85
 
73
86
class S60(USBMS):
74
87
 
75
88
    name = 'S60 driver'