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

Source Code for Module phones.com_lgvx9600

  1  #!/usr/bin/env python 
  2   
  3  ### BITPIM 
  4  ### 
  5  ### Copyright (C) 2009 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_lgvx9600.py 4725 2009-03-04 03:37:48Z djpham $ 
 11   
 12   
 13  """ 
 14  Communicate with the LG VX9600 cell phone. 
 15  """ 
 16   
 17  # BitPim modules 
 18  import common 
 19  import com_brew 
 20  import prototypes 
 21  import com_lgvx9700 
 22  import p_lgvx9600 
 23  import helpids 
 24  import sms 
 25   
 26  #------------------------------------------------------------------------------- 
 27  parentphone=com_lgvx9700.Phone 
28 -class Phone(parentphone):
29 desc="LG-VX9600 (Versa)" 30 helpid=helpids.ID_PHONE_LGVX9600 31 protocolclass=p_lgvx9600 32 serialsname='lgvx9600' 33 34 my_model='VX9600' 35 36 # built-in ringtones are represented by mp3 files that don't appear in /dload/myringtone.dat 37 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'Door Bell', 'VZW Default Ringtone', 38 'Telephone Ring', 'Simple Alert', 'Business Ring', 'Low Bell', 'Move Bell', 'Bubble Ring', 39 'Timeless', 'Voice of the Nature', 'Calling Trip', 'Latin Fever', 'Ride a Tiger', 'Allure', 40 'Limousine Blues', 'Surf the Groove', 'This Time', 'Under Cover of Darkness', 'Morning Call', 'Bee', 41 'Deep Blue Calling', 'East of Rain', 'No Ring',) 42 43 ringtonelocations= ( 44 # type index file default dir external dir max type Index 45 ( 'ringers', 'dload/myringtone.dat','brew/mod/10889/ringtones','mmc1/ringers', 100, 0x01, 100), 46 ( 'sounds', 'dload/mysound.dat', 'brew/mod/18067', '', 100, 0x02, None), 47 ( 'sounds(sd)', 'dload/sd_sound.dat', 'mmc1/my_sounds', '', 100, 0x02, None), 48 ( 'music', 'dload/efs_music.dat', 'my_music', '', 100, 0x104, None), 49 ( 'music(sd)', 'dload/sd_music.dat', 'mmc1/my_music', '', 100, 0x14, None), 50 ) 51
52 - def setDMversion(self):
53 self._DMv5=False 54 self._DMv6=True 55 self._timeout=5 # Assume a quick timeout on newer phones
56 57 # Fundamentals: 58 # - get_esn - same as LG VX-8300 59 # - getgroups - same as LG VX-8700 60 # - getwallpaperindices - LGUncountedIndexedMedia 61 # - getringtoneindices - LGUncountedIndexedMedia 62 # - DM Version - 6 63 # - phonebook - same as LG VX-8550 64 # - SMS - same as LG VX-9700 65 66 #------------------------------------------------------------------------------- 67 parentprofile=com_lgvx9700.Profile
68 -class Profile(parentprofile):
69 protocolclass=Phone.protocolclass 70 serialsname=Phone.serialsname 71 72 BP_Calendar_Version=3 73 phone_manufacturer='LG Electronics Inc' 74 phone_model='VX9600' 75 # inside screen resoluation 76 WALLPAPER_WIDTH = 480 77 WALLPAPER_HEIGHT = 240 78 79 imageorigins={} 80 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images")) 81 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video")) 82 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images(sd)")) 83 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video(sd)")) 84 85 # our targets are the same for all origins 86 imagetargets={} 87 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd", 88 {'width': 240, 'height': 480, 'format': "JPEG"})) 89 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper", 90 {'width': 480, 'height': 240, 'format': "JPEG"})) 91 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid", 92 {'width': 120, 'height': 100, 'format': "JPEG"})) 93 94 _supportedsyncs=( 95 ('phonebook', 'read', None), # all phonebook reading 96 ('calendar', 'read', None), # all calendar reading 97 ('wallpaper', 'read', None), # all wallpaper reading 98 ('ringtone', 'read', None), # all ringtone reading 99 ('call_history', 'read', None),# all call history list reading 100 ('sms', 'read', None), # all SMS list reading 101 ('memo', 'read', None), # all memo list reading 102 ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 103 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 104 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 105 ('wallpaper', 'write', 'OVERWRITE'), 106 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 107 ('ringtone', 'write', 'OVERWRITE'), 108 ('sms', 'write', 'OVERWRITE'), # all SMS list writing 109 ('memo', 'write', 'OVERWRITE'), # all memo list writing 110 ## ('playlist', 'read', 'OVERWRITE'), 111 ## ('playlist', 'write', 'OVERWRITE'), 112 ('t9_udb', 'write', 'OVERWRITE'), 113 ) 114 if __debug__: 115 _supportedsyncs+=( 116 ('t9_udb', 'read', 'OVERWRITE'), 117 )
118