Package phones :: Module com_lgvx8000
[hide private]
[frames] | no frames]

Source Code for Module phones.com_lgvx8000

  1  ### BITPIM 
  2  ### 
  3  ### Copyright (C) 2003-2005 Roger Binns <rogerb@rogerbinns.com> 
  4  ### 
  5  ### This program is free software; you can redistribute it and/or modify 
  6  ### it under the terms of the BitPim license as detailed in the LICENSE file. 
  7  ### 
  8  ### $Id: com_lgvx8000.py 3918 2007-01-19 05:15:12Z djpham $ 
  9   
 10  """Communicate with the LG VX8000 cell phone 
 11   
 12  The VX8000 is substantially similar to the VX7000 but also supports video. 
 13   
 14  """ 
 15   
 16  # standard modules 
 17  import time 
 18  import cStringIO 
 19  import sha 
 20   
 21  # my modules 
 22  import common 
 23  import copy 
 24  import p_lgvx8000 
 25  import com_lgvx7000 
 26  import com_brew 
 27  import com_phone 
 28  import com_lg 
 29  import prototypes 
 30  import helpids 
 31   
32 -class Phone(com_lgvx7000.Phone):
33 "Talk to the LG VX7000 cell phone" 34 35 desc="LG-VX8000" 36 helpid=helpids.ID_PHONE_LGVX8000 37 protocolclass=p_lgvx8000 38 serialsname='lgvx8000' 39 40 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'VZW Default Ringtone') + \ 41 tuple(['Ringtone '+`n` for n in range(1,11)]) + \ 42 ('No Ring',) 43 44 ringtonelocations= ( 45 # type index-file size-file directory-to-use lowest-index-to-use maximum-entries type-major 46 ( 'ringers', 'dload/sound.dat', 'dload/soundsize.dat', 'dload/snd', 100, 50, 1), 47 ) 48 49 builtinwallpapers = () # none 50 51 wallpaperlocations= ( 52 ( 'images', 'dload/image.dat', 'dload/imagesize.dat', 'dload/img', 100, 50, 0), 53 ) 54 55 my_model='VX8000'
56 57 parentprofile=com_lgvx7000.Profile
58 -class Profile(parentprofile):
59 protocolclass=Phone.protocolclass 60 serialsname=Phone.serialsname 61 phone_manufacturer='LG Electronics Inc' 62 phone_model='VX8000' 63 64 WALLPAPER_WIDTH=176 65 WALLPAPER_HEIGHT=184 66 MAX_WALLPAPER_BASENAME_LENGTH=32 67 WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ." 68 WALLPAPER_CONVERT_FORMAT="jpg" 69 70 MAX_RINGTONE_BASENAME_LENGTH=32 71 RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 ." 72 73 # there is an origin named 'aod' - no idea what it is for except maybe 74 # 'all other downloads' 75 76 # the 8000 doesn't have seperate origins - they are all dumped in "images" 77 imageorigins={} 78 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
79 - def GetImageOrigins(self):
80 return self.imageorigins
81 82 # our targets are the same for all origins 83 imagetargets={} 84 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper", 85 {'width': 176, 'height': 184, 'format': "JPEG"})) 86 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid", 87 {'width': 176, 'height': 184, 'format': "JPEG"})) 88 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd", 89 {'width': 96, 'height': 80, 'format': "JPEG"})) 90 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen", 91 {'width': 176, 'height': 220, 'format': "JPEG"})) 92
93 - def GetTargetsForImageOrigin(self, origin):
94 return self.imagetargets
95 96
97 - def __init__(self):
98 parentprofile.__init__(self)
99 100 _supportedsyncs=( 101 ('phonebook', 'read', None), # all phonebook reading 102 ('calendar', 'read', None), # all calendar reading 103 ('wallpaper', 'read', None), # all wallpaper reading 104 ('ringtone', 'read', None), # all ringtone reading 105 ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 106 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 107 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 108 ('wallpaper', 'write', 'OVERWRITE'), 109 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 110 ('ringtone', 'write', 'OVERWRITE'), 111 ('memo', 'read', None), # all memo list reading DJP 112 ('memo', 'write', 'OVERWRITE'), # all memo list writing DJP 113 ('call_history', 'read', None), 114 #('sms', 'write', 'OVERWRITE'), # all SMS list writing 115 ('sms', 'read', None), # all SMS list reading 116 )
117