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

Source Code for Module phones.com_lgcx9200

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