PyXR

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



0001 #!/usr/bin/env python
0002 
0003 ### BITPIM
0004 ###
0005 ### Copyright (C) 2007 Nathan Hjelm <hjelmn@users.sourceforge.net>
0006 ###
0007 ### This program is free software; you can redistribute it and/or modify
0008 ### it under the terms of the BitPim license as detailed in the LICENSE file.
0009 ###
0010 ### The communication protocol appears to be identical to the VX-8700.
0011 ###
0012 ### Testing credits: Erich Volande
0013 
0014 """
0015 Communicate with the LG VX9400 cell phone
0016 """
0017 
0018 # BitPim modules
0019 import common
0020 import com_phone
0021 import com_brew
0022 import prototypes
0023 import commport
0024 import p_brew
0025 import helpids
0026 import com_lgvx8700
0027 import com_lgvx8100
0028 import p_lgvx9400
0029 
0030 #-------------------------------------------------------------------------------
0031 parentphone=com_lgvx8700.Phone
0032 class Phone(parentphone):
0033     "Talk to LG VX-9400 cell phone"
0034 
0035     desc="LG-VX9400"
0036     # Need to create a Help page for this phone
0037     helpid=None
0038     protocolclass=p_lgvx9400
0039     serialsname='lgvx9400'
0040 
0041     my_model='VX9400'
0042 
0043     def setDMversion(self):
0044         self._DMv5=True
0045         # T9MVZV02 takes about 15 seconds to kick out of DM
0046         self._timer = 15
0047 
0048     def getgroups(self, results):
0049         return com_lgvx8100.Phone.getgroups (self, results)
0050 
0051     # Fundamentals:
0052     #  - get_esn             - same as LG VX-8300
0053     #  - getgroups           - same as LG VX-8100
0054     #  - getwallpaperindices - LGUncountedIndexedMedia
0055     #  - getringtoneindices  - LGUncountedIndexedMedia
0056     #  - DM Version          - 5
0057 
0058 #-------------------------------------------------------------------------------
0059 parentprofile=com_lgvx8700.Profile
0060 class Profile(parentprofile):
0061     protocolclass=Phone.protocolclass
0062     serialsname=Phone.serialsname
0063 
0064     BP_Calendar_Version=3
0065     phone_manufacturer='LG Electronics Inc'
0066     phone_model='VX9400'
0067     # inside screen resoluation
0068     WALLPAPER_WIDTH=240
0069     WALLPAPER_HEIGHT=320
0070 
0071     imageorigins={}
0072     imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
0073     imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video"))
0074     imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images(sd)"))
0075     imageorigins.update(common.getkv(parentprofile.stockimageorigins, "video(sd)"))
0076 
0077     # our targets are the same for all origins
0078     imagetargets={}
0079     imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
0080                                       {'width': 240, 'height': 275, 'format': "JPEG"}))
0081 
0082     _supportedsyncs=(
0083         ('phonebook', 'read', None),  # all phonebook reading
0084         ('calendar', 'read', None),   # all calendar reading
0085         ('wallpaper', 'read', None),  # all wallpaper reading
0086         ('ringtone', 'read', None),   # all ringtone reading
0087         ('call_history', 'read', None),# all call history list reading
0088         ('sms', 'read', None),         # all SMS list reading
0089         ('memo', 'read', None),        # all memo list reading
0090         ('phonebook', 'write', 'OVERWRITE'),  # only overwriting phonebook
0091         ('calendar', 'write', 'OVERWRITE'),   # only overwriting calendar
0092         ('wallpaper', 'write', 'MERGE'),      # merge and overwrite wallpaper
0093         ('wallpaper', 'write', 'OVERWRITE'),
0094         ('ringtone', 'write', 'MERGE'),      # merge and overwrite ringtone
0095         ('ringtone', 'write', 'OVERWRITE'),
0096         ('sms', 'write', 'OVERWRITE'),        # all SMS list writing
0097         ('memo', 'write', 'OVERWRITE'),       # all memo list writing
0098         ('t9_udb', 'write', 'OVERWRITE'),
0099         )
0100     if __debug__:
0101         _supportedsyncs+=(
0102         ('t9_udb', 'read', 'OVERWRITE'),
0103         )
0104 

Generated by PyXR 0.9.4