0001 ### BITPIM 0002 ### 0003 ### Copyright (C) 2005, 2006 Brent Roettger <broettge@msn.com> 0004 ### 0005 ### This program is free software; you can redistribute it and/or modify 0006 ### it under the terms of the BitPim license as detailed in the LICENSE file. 0007 ### 0008 ### $Id: com_lgpm325.py 3918 2007-01-19 05:15:12Z djpham $ 0009 0010 """Communicate with the LG LX325/PM325 (Sprint) cell phone""" 0011 0012 # standard modules 0013 import re 0014 import time 0015 import cStringIO 0016 import sha 0017 0018 # my modules 0019 import p_lgpm225 0020 import p_lgpm325 0021 import p_brew 0022 import common 0023 import commport 0024 import com_brew 0025 import com_phone 0026 import com_lg 0027 import com_lgpm225 0028 import prototypes 0029 import call_history 0030 import sms 0031 import fileinfo 0032 import memo 0033 0034 class Phone(com_lgpm225.Phone): 0035 "Talk to the LG LX325/PM325 cell phone" 0036 0037 desc="LG PM325" 0038 helpid=None 0039 protocolclass=p_lgpm325 0040 serialsname='lgpm325' 0041 0042 # read only locations, for regular ringers/wallpaper this phone stores 0043 # the information in a different location 0044 imagelocations=( 0045 # offset, index file, files location, type, maximumentries 0046 (0x600, "setas/dcamIndex.map", "Dcam/Wallet", "camera", 50, 6), 0047 ) 0048 0049 ringtonelocations=( 0050 # offset, index file, files location, type, maximumentries 0051 (0x1100, "setas/voicememoRingerIndex.map", "VoiceDB/All/Memos", "voice_memo", 50, 11), 0052 ) 0053 0054 # builtinimages=('Starfish', 'Goldfish', 'Leaves', 'Bicycle', 'Speed', 0055 # 'Autumn', 'Island', 'Winter', 'Bamboo', 'Yellow Flowers', 'Snow') 0056 builtinimages=( ) 0057 0058 builtinringtones=( 'Tone 1', 'Tone 2', 'Tone 3', 'Tone 4', 'Tone 5', 'Tone 6', 0059 'Alert 1', 'Alert 2', 'Alert 3', 'Alert 4', 'Alert 5', 'Alert 6', 0060 'Jazztic', 'Rock & Roll', 'Grand Waltz', 'Toccata and Fugue', 0061 'Sunday Afternoon', 'Bumble Bee', 'Circus Band', 'Cuckoo Waltz', 0062 'Latin', 'CanCan', 'Play tag', 'Eine kleine Nachtmusik', 0063 'Symphony No.25 in G Minor', 'Capriccio a minor', 'Moonlight', 0064 'A Nameless Girl', 'From the New World', 'They Called Me Elvis') 0065 0066 def __init__(self, logtarget, commport): 0067 "Calls all the constructors and sets initial modes" 0068 com_phone.Phone.__init__(self, logtarget, commport) 0069 com_brew.BrewProtocol.__init__(self) 0070 com_lg.LGPhonebook.__init__(self) 0071 self.log("Attempting to contact phone") 0072 self._cal_has_voice_id=hasattr(self.protocolclass, 'cal_has_voice_id') \ 0073 and self.protocolclass.cal_has_voice_id 0074 self.mode=self.MODENONE 0075 0076 0077 #----- Phone Detection ----------------------------------------------------------- 0078 0079 brew_version_file='ams/version.txt' 0080 brew_version_txt_key='ams_version.txt' 0081 my_model='LX325' # AKA the PM325 from Sprint 0082 0083 #----- Profile Class ------------------------------------------------------------- 0084 parentprofile=com_lgpm225.Profile 0085 class Profile(parentprofile): 0086 protocolclass=Phone.protocolclass 0087 serialsname=Phone.serialsname 0088 BP_Calendar_Version=3 0089 phone_manufacturer='LG Electronics Inc' 0090 phone_model='LX325' # aka the PM325 from Sprint 0091 brew_required=True 0092 0093 DIALSTRING_CHARS="[^0-9PT#*]" 0094 0095 0096 _supportedsyncs=( 0097 ('phonebook', 'read', None), # all phonebook reading 0098 ('calendar', 'read', None), # all calendar reading 0099 ('wallpaper', 'read', None), # all wallpaper reading 0100 ('ringtone', 'read', None), # all ringtone reading 0101 ('call_history', 'read', None),# all call history list reading 0102 ('memo', 'read', None), # all memo list reading 0103 ('sms', 'read', None), # all SMS list reading 0104 ('phonebook', 'write', 'OVERWRITE'), # only overwriting phonebook 0105 ('calendar', 'write', 'OVERWRITE'), # only overwriting calendar 0106 ('wallpaper', 'write', 'MERGE'), # merge and overwrite wallpaper 0107 ('wallpaper', 'write', 'OVERWRITE'), 0108 ('ringtone', 'write', 'MERGE'), # merge and overwrite ringtone 0109 ('ringtone', 'write', 'OVERWRITE'), 0110 ('memo', 'write', 'OVERWRITE'), # all memo list writing 0111 ('sms', 'write', 'OVERWRITE'), # all SMS list writing 0112 ) 0113 0114
Generated by PyXR 0.9.4