PyXR

c:\projects\bitpim\src \ phones \ com_sanyo7050.py



0001 ### BITPIM
0002 ###
0003 ### Copyright (C) 2008 Stephen Wood <sawecw@users.sf.net>
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$
0009 
0010 """Talk to the Sanyo SCP-7050 cell phone"""
0011 # standard modules
0012 import re
0013 import time
0014 import sha
0015 
0016 # my modules
0017 import common
0018 import p_brew
0019 import p_sanyo8300
0020 import p_sanyo4930
0021 import p_sanyo6600
0022 import p_sanyo7050
0023 import com_brew
0024 import com_phone
0025 import com_sanyo
0026 import com_sanyomedia
0027 import com_sanyonewer
0028 import com_sanyo3100
0029 import com_sanyo6600
0030 import prototypes
0031 import bpcalendar
0032 
0033 numbertypetab=( 'cell', 'home', 'office', 'pager',
0034                     'fax', 'none')
0035 
0036 class Phone(com_sanyo6600.Phone):
0037     "Talk to the Sanyo Katana-II (SCP-7050) cell phone"
0038 
0039     desc="SCP-7050"
0040 
0041     FIRST_MEDIA_DIRECTORY=1
0042     LAST_MEDIA_DIRECTORY=2
0043 
0044     imagelocations=(
0045         # offset, directory #, indexflag, type, maximumentries
0046         )
0047     wallpaperexts=(".jpg", ".png", ".mp4", ".3g2",".JPG")
0048 
0049 
0050     protocolclass=p_sanyo7050
0051     serialsname='scp7050'
0052 
0053     builtinringtones=( 'None', 'Vibrate', '', '', '', '', '', '', '', 
0054                        'Tone 1', 'Tone 2', 'Tone 3', 'Tone 4', 'Tone 5',
0055                        'Tone 6', 'Tone 7', 'Tone 8', '', '', '', '', '',
0056                        '', '', '', '', 
0057                        'Requiem:Dies Irae', 'Minute Waltz', 'Hungarian Dance',
0058                        'Military March', 'Ten Little Indians',
0059                        'Head,Shoulders,Knees&Toes', 'The Moment', 'Asian Jingle',
0060                        'Kung-fu','','','','','','','','','','','','','','','','','',
0061                        '','','','','','',
0062                        'Voice Alarm')
0063 
0064 
0065     calendar_defaultringtone=0
0066     calendar_defaultcaringtone=0
0067     calendar_toneoffset=33
0068     calendar_tonerange=xrange(4,100)
0069 
0070     def __init__(self, logtarget, commport):
0071         com_sanyo6600.Phone.__init__(self, logtarget, commport)
0072         self.mode=self.MODENONE
0073         self.numbertypetab=numbertypetab
0074 
0075     def getfundamentals(self, results):
0076         """Gets information fundamental to interopating with the phone and UI."""
0077         req=self.protocolclass.sanyoreset()
0078         res=self.sendpbcommand(req, p_brew.testing0cresponse)
0079 
0080         results['uniqueserial']=sha.new(self.get_esn()).hexdigest()
0081         self.getmediaindices(results)
0082 
0083         results['groups']=self.read_groups()
0084 
0085         self.log("Fundamentals retrieved")
0086 
0087         return results
0088         
0089     my_model='SCP7050'
0090     detected_model='SCP-7050/US'
0091     my_manufacturer='SANYO'
0092 
0093 parentprofile=com_sanyo6600.Profile
0094 class Profile(parentprofile):
0095 
0096     protocolclass=Phone.protocolclass
0097     serialsname=Phone.serialsname
0098     phone_manufacturer=Phone.my_manufacturer
0099     phone_model=Phone.my_model
0100 
0101     usbids=( ( 0x0474, 0x0743, 2),)  # VID=Sanyo,
0102     deviceclasses=("serial",)
0103 
0104     _supportedsyncs=(
0105         ('phonebook', 'read', None),  # all phonebook reading
0106         #('calendar', 'read', None),   # all calendar reading
0107         ('phonebook', 'write', 'OVERWRITE'),  # only overwriting phonebook
0108         #('calendar', 'write', 'OVERWRITE'),   # only overwriting calendar
0109         ('wallpaper', 'read', None),  # all wallpaper reading
0110         ('ringtone', 'read', None),   # all ringtone reading
0111         ('call_history', 'read', None),# all call history list reading
0112         ('sms', 'read', None), # Read sms messages
0113         ('todo', 'read', None), # Read todos
0114     )
0115 
0116     def __init__(self):
0117         parentprofile.__init__(self)
0118         com_sanyonewer.Profile.__init__(self)
0119         self.numbertypetab=numbertypetab
0120 
0121 

Generated by PyXR 0.9.4