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

Source Code for Module phones.com_lgvx9900

  1  ### BITPIM 
  2  ### 
  3  ### Copyright (C) 2006 Joe Pham <djpham@bitpim.org> 
  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_lgvx9900.py 4305 2007-07-16 04:05:25Z djpham $ 
  9   
 10  """ 
 11  Communicate with the LG VX9900 cell phone, which is a cross between the 
 12  VX9800 and the VX8500 
 13  """ 
 14   
 15  # BitPim modules 
 16  import common 
 17  import com_lg 
 18  import com_lgvx9800 
 19  import p_lgvx9900 
 20  import helpids 
 21   
 22  #------------------------------------------------------------------------------- 
 23  parentphone=com_lgvx9800.Phone 
24 -class Phone(com_lg.LGUncountedIndexedMedia, parentphone):
25 "Talk to the LG VX9900 cell phone" 26 27 desc="LG-VX9900" 28 helpid=helpids.ID_PHONE_LGVX9900 29 protocolclass=p_lgvx9900 30 serialsname='lgvx9900' 31 my_model='VX9900' 32 33 # rintones and wallpaper info, copy from VX8500, may need to change to match 34 # what the phone actually has 35 external_storage_root='mmc1/' 36 builtinringtones= ('Low Beep Once', 'Low Beeps', 'Loud Beep Once', 'Loud Beeps', 'VZW Default Ringtone') + \ 37 tuple(['Ringtone '+`n` for n in range(1,13)]) + \ 38 ('No Ring',) 39 40 ringtonelocations= ( 41 # type index file default dir external dir max type Index 42 ( 'ringers', 'dload/myringtone.dat','brew/16452/lk/mr','mmc1/ringers', 100, 0x01, 100), 43 ( 'sounds', 'dload/mysound.dat', 'brew/16452/ms', '', 100, 0x02, None), 44 ( 'sounds(sd)', 'dload/sd_sound.dat', 'mmc1/my_sounds', '', 100, 0x02, None), 45 ( 'music', 'dload/efs_music.dat', 'my_music', '', 100, 0x104, None), 46 ( 'music(sd)', 'dload/sd_music.dat', 'mmc1/my_music', '', 100, 0x14, None), 47 ) 48 49 wallpaperlocations= ( 50 # type index file default dir external dir max type Index 51 ( 'images', 'dload/image.dat', 'brew/16452/mp', '', 100, 0x00, 100), 52 ( 'images(sd)', 'dload/sd_image.dat', 'mmc1/my_pix', '', 100, 0x10, None), 53 ( 'video', 'dload/video.dat', 'brew/16452/mf', '', 100, 0x03, None), 54 ( 'video(sd)', 'dload/sd_video.dat', 'mmc1/my_flix', '', 100, 0x13, None), 55 ) 56
57 - def __init__(self, logtarget, commport):
58 parentphone.__init__(self, logtarget, commport)
59
60 - def setDMversion(self):
61 _fw_version=self.get_firmware_version()[-1] 62 # T99VZV02 uses DMv5 63 self._DMv5=self.my_model=='VX9900' and _fw_version>'1'
64 65 # Fundamentals: 66 # - get_esn - same as LG VX-8300 67 # - getgroups - same as LG VX-8100 68 # - getwallpaperindices - LGUncountedIndexedMedia 69 # - getrintoneindices - LGUncountedIndexedMedia 70 # - DM Version - T99VZV01: N/A, T99VZV02: 5 71 72 #------------------------------------------------------------------------------- 73 parentprofile=com_lgvx9800.Profile
74 -class Profile(parentprofile):
75 protocolclass=Phone.protocolclass 76 serialsname=Phone.serialsname 77 78 BP_Calendar_Version=3 79 phone_manufacturer='LG Electronics Inc' 80 phone_model='VX9900' 81 82 WALLPAPER_WIDTH=320 83 WALLPAPER_HEIGHT=256 84 85 imageorigins={} 86 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images")) 87 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video")) 88 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images(sd)")) 89 imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video(sd)"))
90 - def GetImageOrigins(self):
91 return self.imageorigins
92 93 94 ringtoneorigins=('ringers', 'sounds', 'sounds(sd)',' music', 'music(sd)') 95 excluded_ringtone_origins=('sounds', 'sounds(sd)', 'music', 'music(sd)') 96 97 # our targets are the same for all origins 98 imagetargets={} 99 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper", 100 {'width': 320, 'height': 204, 'format': "JPEG"})) 101 imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd", 102 {'width': 160, 'height': 99, 'format': "JPEG"})) 103
104 - def GetTargetsForImageOrigin(self, origin):
105 return self.imagetargets
106 107 _supportedsyncs=( 108 ('phonebook', 'read', None), # all phonebook reading 109 ('calendar', 'read', None), # all calendar reading 110 ('wallpaper', 'read', None), # all wallpaper reading 111 ('ringtone', 'read', None), # all ringtone reading 112 ('call_history', 'read', None),# all call history list reading 113 ('sms', 'read', None), # all SMS list reading 114 ('memo', 'read', None), # all memo list reading 115 ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 116 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 117 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 118 ('wallpaper', 'write', 'OVERWRITE'), 119 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 120 ('ringtone', 'write', 'OVERWRITE'), 121 ## ('sms', 'write', 'OVERWRITE'), # all SMS list writing 122 ('memo', 'write', 'OVERWRITE'), # all memo list writing 123 ## ('playlist', 'read', 'OVERWRITE'), 124 ## ('playlist', 'write', 'OVERWRITE'), 125 )
126