0001 ### BITPIM 0002 ### 0003 ### Copyright (C) 2003-2005 Roger Binns <rogerb@rogerbinns.com> 0004 ### 0005 ### This program is free software; you can redistribute it and/or modify 0006 ### it under the terms of the BitPim license as detailed in the LICENSE file. 0007 ### 0008 ### $Id: com_lgvx8000.py 3918 2007-01-19 05:15:12Z djpham $ 0009 0010 """Communicate with the LG VX8000 cell phone 0011 0012 The VX8000 is substantially similar to the VX7000 but also supports video. 0013 0014 """ 0015 0016 # standard modules 0017 import time 0018 import cStringIO 0019 import sha 0020 0021 # my modules 0022 import common 0023 import copy 0024 import p_lgvx8000 0025 import com_lgvx7000 0026 import com_brew 0027 import com_phone 0028 import com_lg 0029 import prototypes 0030 import helpids 0031 0032 class Phone(com_lgvx7000.Phone): 0033 "Talk to the LG VX7000 cell phone" 0034 0035 desc="LG-VX8000" 0036 helpid=helpids.ID_PHONE_LGVX8000 0037 protocolclass=p_lgvx8000 0038 serialsname='lgvx8000' 0039 0040 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'VZW Default Ringtone') + \ 0041 tuple(['Ringtone '+`n` for n in range(1,11)]) + \ 0042 ('No Ring',) 0043 0044 ringtonelocations= ( 0045 # type index-file size-file directory-to-use lowest-index-to-use maximum-entries type-major 0046 ( 'ringers', 'dload/sound.dat', 'dload/soundsize.dat', 'dload/snd', 100, 50, 1), 0047 ) 0048 0049 builtinwallpapers = () # none 0050 0051 wallpaperlocations= ( 0052 ( 'images', 'dload/image.dat', 'dload/imagesize.dat', 'dload/img', 100, 50, 0), 0053 ) 0054 0055 my_model='VX8000' 0056 0057 parentprofile=com_lgvx7000.Profile 0058 class Profile(parentprofile): 0059 protocolclass=Phone.protocolclass 0060 serialsname=Phone.serialsname 0061 phone_manufacturer='LG Electronics Inc' 0062 phone_model='VX8000' 0063 0064 WALLPAPER_WIDTH=176 0065 WALLPAPER_HEIGHT=184 0066 MAX_WALLPAPER_BASENAME_LENGTH=32 0067 WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ." 0068 WALLPAPER_CONVERT_FORMAT="jpg" 0069 0070 MAX_RINGTONE_BASENAME_LENGTH=32 0071 RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ." 0072 0073 # there is an origin named 'aod' - no idea what it is for except maybe 0074 # 'all other downloads' 0075 0076 # the 8000 doesn't have seperate origins - they are all dumped in "images" 0077 imageorigins={} 0078 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images")) 0079 def GetImageOrigins(self): 0080 return self.imageorigins 0081 0082 # our targets are the same for all origins 0083 imagetargets={} 0084 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper", 0085 {'width': 176, 'height': 184, 'format': "JPEG"})) 0086 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid", 0087 {'width': 176, 'height': 184, 'format': "JPEG"})) 0088 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd", 0089 {'width': 96, 'height': 80, 'format': "JPEG"})) 0090 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen", 0091 {'width': 176, 'height': 220, 'format': "JPEG"})) 0092 0093 def GetTargetsForImageOrigin(self, origin): 0094 return self.imagetargets 0095 0096 0097 def __init__(self): 0098 parentprofile.__init__(self) 0099 0100 _supportedsyncs=( 0101 ('phonebook', 'read', None), # all phonebook reading 0102 ('calendar', 'read', None), # all calendar reading 0103 ('wallpaper', 'read', None), # all wallpaper reading 0104 ('ringtone', 'read', None), # all ringtone reading 0105 ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 0106 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 0107 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 0108 ('wallpaper', 'write', 'OVERWRITE'), 0109 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 0110 ('ringtone', 'write', 'OVERWRITE'), 0111 ('memo', 'read', None), # all memo list reading DJP 0112 ('memo', 'write', 'OVERWRITE'), # all memo list writing DJP 0113 ('call_history', 'read', None), 0114 #('sms', 'write', 'OVERWRITE'), # all SMS list writing 0115 ('sms', 'read', None), # all SMS list reading 0116 ) 0117
Generated by PyXR 0.9.4