Package phones ::
Module com_lgvx4600
|
|
1
2
3
4
5
6
7
8
9
10 """Communicate with the LG VX4500 cell phone
11
12 The VX4600 is substantially similar to the VX4400, although
13 wallpapers and ringtones are done in a totally different way.
14
15 """
16
17
18 import time
19 import cStringIO
20 import sha
21
22
23 import common
24 import copy
25 import p_lgvx4600
26 import com_lgvx4400
27 import com_brew
28 import com_phone
29 import com_lg
30 import prototypes
31
32 -class Phone(com_lg.LGDirectoryMedia,com_lgvx4400.Phone):
33 "Talk to the LG VX4600 cell phone"
34
35 desc="LG-VX4600"
36 helpid=None
37 protocolclass=p_lgvx4600
38 serialsname='lgvx4600'
39
40
41 imagelocations=(
42
43 (50, "usr/Wallpaper", "images", 30),
44 )
45
46 ringtonelocations=(
47
48 (50, "usr/Ringtone", "ringers", 30),
49 )
50
51 builtinimages=('Butterfly', 'Flowers', 'Bird', 'Puppy','Fall',
52 'Castle', 'Puppy2', 'Sky', 'Teddy','Desert')
53
54 builtinringtones=( 'Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'Ring 5',
55 'Ring 6','Ring 7','Ring 8','Ring 9','Ring 10',
56 'Annen Polka','Beethoven Symphony No. 9', 'Pachelbel Canon',
57 'Hallelujah', 'La Traviata','Leichte Kavallerie Overture',
58 'Mozart Symphony No. 40', 'Bach Minuet','Farewell',
59 'Mozart Piano Sonata','String','Trout', 'O solemio',
60 'Pizzcato Polka','Stars and Stripes Forever','Pineapple Rag',
61 'When the Saints Go Marching In','Latin','Carol 1','Carol 2')
62
63 - def __init__(self, logtarget, commport):
67
68 my_model='VX4600'
69
70 parentprofile=com_lgvx4400.Profile
72 protocolclass=Phone.protocolclass
73 serialsname=Phone.serialsname
74 phone_manufacturer='LG Electronics Inc'
75 phone_model='VX4600'
76
77 WALLPAPER_WIDTH=120
78 WALLPAPER_HEIGHT=131
79 MAX_WALLPAPER_BASENAME_LENGTH=19
80 WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
81 WALLPAPER_CONVERT_FORMAT="bmp"
82
83 MAX_RINGTONE_BASENAME_LENGTH=19
84 RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ."
85
86 imageorigins={}
87 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
90
91
92 imagetargets={}
93 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
94 {'width': 120, 'height': 131, 'format': "BMP"}))
95 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
96 {'width': 120, 'height': 131, 'format': "BMP"}))
97 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
98 {'width': 120, 'height': 160, 'format': "BMP"}))
99
102
103 _supportedsyncs=(
104 ('phonebook', 'read', None),
105 ('calendar', 'read', None),
106 ('wallpaper', 'read', None),
107 ('ringtone', 'read', None),
108 ('phonebook', 'write', 'OVERWRITE'),
109
110 ('wallpaper', 'write', 'MERGE'),
111 ('wallpaper', 'write', 'OVERWRITE'),
112 ('ringtone', 'write', 'MERGE'),
113 ('ringtone', 'write', 'OVERWRITE'),
114 )
115
118