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

Source Code for Module phones.com_lgvx8560

  1  #!/usr/bin/env python 
  2   
  3  ### BITPIM 
  4  ### 
  5  ### Copyright (C) 2008 Nathan Hjelm <hjelmn@users.sourceforge.net> 
  6  ### 
  7  ### This program is free software; you can redistribute it and/or modify 
  8  ### it under the terms of the BitPim license as detailed in the LICENSE file. 
  9  ### 
 10  ### $Id: com_lgvx8560.py 4678 2008-08-13 23:46:56Z djpham $ 
 11   
 12   
 13  """ 
 14  Communicate with the LG VX8560 cell phone. (aka VX8610) 
 15  """ 
 16   
 17  # BitPim modules 
 18  import common 
 19  import com_brew 
 20  import prototypes 
 21  import com_lgvx9700 
 22  import p_lgvx8560 
 23  import helpids 
 24   
 25  #------------------------------------------------------------------------------- 
 26  parentphone=com_lgvx9700.Phone 
27 -class Phone(parentphone):
28 desc="LG-VX8560 (Chocolate 3)" 29 protocolclass=p_lgvx8560 30 serialsname='lgvx8560' 31 helpid=helpids.ID_PHONE_LGVX8560 32 33 my_model='VX8560' 34 35 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'Door Bell', 'VZW Default Ringtone') + \ 36 tuple(['Ringtone '+`n` for n in range(1,21)]) + \ 37 ('No Ring',) 38
39 - def setDMversion(self):
40 self._DMv5 = False 41 self._DMv6 = True 42 self._timeout=5 # Assume a quick timeout
43 44 # Fundamentals: 45 # - get_esn - same as LG VX-8300 46 # - getgroups - same as LG VX-8700 47 # - getwallpaperindices - LGUncountedIndexedMedia 48 # - getringtoneindices - LGUncountedIndexedMedia 49 # - DM Version - 6 50 # - phonebook - same as LG VX-8550 with HPE entry VX8610 51 # - sms - same as LG VX-9700 52 53 # Calendar stuff------------------------------------------------------------
54 - def _scheduleextras(self, data, fwversion):
55 data.serial_number = '000000ca-00000000-00000000-' + fwversion 56 data.unknown3 = 0x01fa
57 58 #------------------------------------------------------------------------------- 59 parentprofile=com_lgvx9700.Profile
60 -class Profile(parentprofile):
61 protocolclass=Phone.protocolclass 62 serialsname=Phone.serialsname 63 64 BP_Calendar_Version=3 65 phone_manufacturer='LG Electronics Inc' 66 phone_model='VX8560' 67 # inside screen resoluation 68 WALLPAPER_WIDTH = 240 69 WALLPAPER_HEIGHT = 320 70 71 imageorigins={} 72 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images")) 73 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video")) 74 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images(sd)")) 75 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video(sd)")) 76 77 # our targets are the same for all origins 78 imagetargets={} 79 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd", 80 {'width': 176, 'height': 220, 'format': "JPEG"})) 81 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper", 82 {'width': 240, 'height': 320, 'format': "JPEG"})) 83 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid", 84 {'width': 120, 'height': 100, 'format': "JPEG"})) 85 86 _supportedsyncs=( 87 ('phonebook', 'read', None), # all phonebook reading 88 ('calendar', 'read', None), # all calendar reading 89 ('wallpaper', 'read', None), # all wallpaper reading 90 ('ringtone', 'read', None), # all ringtone reading 91 ('call_history', 'read', None),# all call history list reading 92 ('sms', 'read', None), # all SMS list reading 93 ('memo', 'read', None), # all memo list reading 94 ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 95 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 96 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 97 ('wallpaper', 'write', 'OVERWRITE'), 98 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 99 ('ringtone', 'write', 'OVERWRITE'), 100 ('sms', 'write', 'OVERWRITE'), # all SMS list writing 101 ('memo', 'write', 'OVERWRITE'), # all memo list writing 102 ## ('playlist', 'read', 'OVERWRITE'), 103 ## ('playlist', 'write', 'OVERWRITE'), 104 ('t9_udb', 'write', 'OVERWRITE'), 105 ) 106 if __debug__: 107 _supportedsyncs+=( 108 ('t9_udb', 'read', 'OVERWRITE'), 109 )
110