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

Source Code for Module phones.com_lgvx9200

  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  ### 
 11   
 12   
 13   
 14  """ 
 15  Communicate with the LG VX9200 cell phone. 
 16  """ 
 17   
 18  # BitPim modules 
 19  import common 
 20  import com_brew 
 21  import prototypes 
 22  import com_lgvx11000 
 23  import p_lgvx9200 
 24  import helpids 
 25  import sms 
 26   
 27  #------------------------------------------------------------------------------- 
 28  parentphone=com_lgvx11000.Phone 
29 -class Phone(parentphone):
30 desc="LG-VX9200 (enV3)" 31 helpid=helpids.ID_PHONE_LGVX9200 32 protocolclass=p_lgvx9200 33 serialsname='lgvx9200' 34 35 my_model='VX9200' 36 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'Door Bell', 'VZW Default Tone') + \ 37 tuple(['Ringtone '+`n` for n in range(1,17)]) + ('No Ring',) 38
39 - def setDMversion(self):
40 self._DMv5=False 41 self._DMv6=True 42 self._timeout=5 # Assume a quick timeout on newer phones
43 44 # - getgroups - same as LG VX-8700 45 # - getwallpaperindices - LGUncountedIndexedMedia 46 # - getringtoneindices - LGUncountedIndexedMedia 47 # - DM Version - 6 48 # - phonebook - LG Phonebook v1 Extended 49 # - SMS - same dir structure as the VX-8800 50 51 #------------------------------------------------------------------------------- 52 parentprofile=com_lgvx11000.Profile
53 -class Profile(parentprofile):
54 BP_Calendar_Version=3 55 56 protocolclass=Phone.protocolclass 57 serialsname=Phone.serialsname 58 phone_model=Phone.my_model 59 phone_manufacturer='LG Electronics Inc' 60 61 # inside screen resoluation 62 WALLPAPER_WIDTH = 320 63 WALLPAPER_HEIGHT = 240 64 65 imageorigins={} 66 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images")) 67 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video")) 68 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images(sd)")) 69 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video(sd)")) 70 71 # our targets are the same for all origins 72 imagetargets={} 73 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd", 74 {'width': 190, 'height': 96, 'format': "JPEG"})) 75 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper", 76 {'width': 320, 'height': 240, 'format': "JPEG"})) 77 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid", 78 {'width': 320, 'height': 240, 'format': "JPEG"})) 79 80 _supportedsyncs=( 81 ('phonebook', 'read', None), # all phonebook reading 82 ('calendar', 'read', None), # all calendar reading 83 ('wallpaper', 'read', None), # all wallpaper reading 84 ('ringtone', 'read', None), # all ringtone reading 85 ('call_history', 'read', None),# all call history list reading 86 ('sms', 'read', None), # all SMS list reading 87 ('memo', 'read', None), # all memo list reading 88 ## ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 89 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 90 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 91 ('wallpaper', 'write', 'OVERWRITE'), 92 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 93 ('ringtone', 'write', 'OVERWRITE'), 94 ('sms', 'write', 'OVERWRITE'), # all SMS list writing 95 ('memo', 'write', 'OVERWRITE'), # all memo list writing 96 ## ('playlist', 'read', 'OVERWRITE'), 97 ## ('playlist', 'write', 'OVERWRITE'), 98 ('t9_udb', 'write', 'OVERWRITE'), 99 ) 100 if __debug__: 101 _supportedsyncs+=( 102 ('t9_udb', 'read', 'OVERWRITE'), 103 )
104