VX6100 filename length and wallpaper size changes

John O'Shaughnessy <[email protected]>
Newsgroups gmane.comp.mobile.bitpim.devel
Message-ID <BE7624AA.16126%[email protected]>
[aladdin:Dev/BitPimDev/bitpim] osh% cvs diff -u com_lgvx6100.py
Index: com_lgvx6100.py
===================================================================
RCS file: /cvsroot/bitpim/bitpim/com_lgvx6100.py,v
retrieving revision 1.6
diff -u -u -r1.6 com_lgvx6100.py
--- com_lgvx6100.py     8 Mar 2005 07:28:12 -0000       1.6
+++ com_lgvx6100.py     4 Apr 2005 03:52:15 -0000
@@ -100,13 +100,13 @@
     protocolclass=Phone.protocolclass
     serialsname=Phone.serialsname
 
-    WALLPAPER_WIDTH=128
+    WALLPAPER_WIDTH=132
     WALLPAPER_HEIGHT=148
-    MAX_WALLPAPER_BASENAME_LENGTH=36
+    MAX_WALLPAPER_BASENAME_LENGTH=24
     
WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx
yz0123456789_ ."
     WALLPAPER_CONVERT_FORMAT="jpg"
    
-    MAX_RINGTONE_BASENAME_LENGTH=32
+    MAX_RINGTONE_BASENAME_LENGTH=24
     
RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxy
z0123456789_ ."
 
     # nb we don't allow save to camera so it isn't listed here
@@ -120,11 +120,11 @@
     # our targets are the same for all origins
     imagetargets={}
     imagetargets.update(common.getkv(parentprofile.stockimagetargets,
"wallpaper",
-                                      {'width': 128, 'height': 148,
'format': "JPEG"}))
+                                      {'width': 132, 'height': 148,
'format': "JPEG"}))
     imagetargets.update(common.getkv(parentprofile.stockimagetargets,
"pictureid",
-                                      {'width': 128, 'height': 148,
'format': "JPEG"}))
+                                      {'width': 132, 'height': 148,
'format': "JPEG"}))
     imagetargets.update(common.getkv(parentprofile.stockimagetargets,
"fullscreen",
-                                      {'width': 128, 'height': 160,
'format': "JPEG"}))
+                                      {'width': 132, 'height': 160,
'format': "JPEG"}))
     # can the outside lcd display images?
     #imagetargets.update(common.getkv(parentprofile.stockimagetargets,
"outsidelcd",
     #                                  {'width': 96, 'height': 64,
'format': "JPEG"}))
com_lgvx6100.py (application/octet-stream, 5.4 KB)
### BITPIM
###
### Copyright (C) 2003-2004 Roger Binns <[email protected]>
### Copyright (C) 2004 John O'Shaughnessy <[email protected]>
###
### This program is free software; you can redistribute it and/or modify
### it under the terms of the BitPim license as detailed in the LICENSE file.
###
### $Id: com_lgvx6100.py,v 1.6 2005/03/08 07:28:12 rogerb Exp $

"""Communicate with the LG VX6100 cell phone

The VX6100 is substantially similar to the VX4400 except that it supports more
image formats, has wallpapers in no less than 5 locations and puts things in
slightly different directories.

The code in this file mainly inherits from VX4400 code and then extends where
the 6100 has extra functionality

"""

# standard modules
import time
import cStringIO
import sha

# my modules
import common
import copy
import p_lgvx6100
import com_lgvx4400
import com_brew
import com_phone
import com_lg
import prototypes

class Phone(com_lgvx4400.Phone):
    "Talk to the LG VX6100 cell phone"

    desc="LG-VX6100"

    protocolclass=p_lgvx6100
    serialsname='lgvx6100'

    # more VX6100 indices
    imagelocations=(
        # offset, index file, files location, type, maximumentries
        ( 16, "download/dloadindex/brewImageIndex.map", "brew/shared", "images", 60) ,
        ( 202, "download/dloadindex/mmsImageIndex.map", "brew/shared/mms", "mms", 30),
        ( 240, "download/dloadindex/mmsDrmImageIndex.map", "brew/shared/mms/d", "drm", 20), 
        ( 130, None, None, "camera", 60) # nb camera must be last
        )

    ringtonelocations=(
        # offset, index file, files location, type, maximumentries
        ( 50, "download/dloadindex/brewRingerIndex.map", "user/sound/ringer", "ringers", 60),
        ( 150, "download/dloadindex/mmsRingerIndex.map", "mms/sound", "mms", 20),
        ( 180, "download/dloadindex/mmsDrmRingerIndex.map", "mms/sound/drm", "drm", 20)
        )

    builtinimages= ('Sport', 'Butterfly', 'Cake', 'Niagara Falls', 'Rockefeller', 
    				'Statue of Liberty', 'The Capital', 'Scenary','White Bear', 'Yacht' ) 
    
    builtinringtones= ('Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'Ring 5', 'VZW Default Tone',
                       'Farewell', 'Arabesque',
                       'Piano Sonata', 'Latin', 'When The Saints', 'Bach Cello Suite',
                       'Speedy Way', 'Cancan', 'Sting', 'Toccata and Fugue',
                       'Mozart Symphony 40', 'Nutcracker March', 'Funiculi', 'Polka', 	
                       'Hallelujah', 'Mozart Aria',
                       'Leichte', 'Spring', 'Slavonic', 'Fantasy', 'Chimes High',
                       'Chimes Low', 'Ding', 'Tada', 'Notify', 'Drum', 'Claps', 'Fanfare', 
                       'Chord High', 'Chord Low')
                       
    
    def __init__(self, logtarget, commport):
        com_lgvx4400.Phone.__init__(self,logtarget,commport)
        self.mode=self.MODENONE
        
    def makeentry(self, counter, entry, dict):
        e=com_lgvx4400.Phone.makeentry(self, counter, entry, dict)
        e.entrysize=0x202
        return e

    def getcameraindex(self):
        buf=prototypes.buffer(self.getfilecontents("cam/pics.dat"))
        index={}
        g=self.protocolclass.campicsdat()
        g.readfrombuffer(buf)
        for i in g.items:
            if len(i.name):
                # index[i.index]={'name': i.name, 'date': i.taken, 'origin': 'camera' }
                # we currently use the filesystem name rather than rename in camera
                # since the latter doesn't include the file extension which then makes
                # life less pleasant once the file ends up on the computer
                index[i.index]={'name': "pic%02d.jpg"%(i.index,), 'date': i.taken, 'origin': 'camera' }
        return index

parentprofile=com_lgvx4400.Profile
class Profile(parentprofile):
    protocolclass=Phone.protocolclass
    serialsname=Phone.serialsname

    WALLPAPER_WIDTH=132
    WALLPAPER_HEIGHT=148
    MAX_WALLPAPER_BASENAME_LENGTH=24
    WALLPAPER_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ."
    WALLPAPER_CONVERT_FORMAT="jpg"
   
    MAX_RINGTONE_BASENAME_LENGTH=24
    RINGTONE_FILENAME_CHARS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ ."

    # nb we don't allow save to camera so it isn't listed here
    imageorigins={}
    imageorigins.update(common.getkv(parentprofile.stockimageorigins, "images"))
    imageorigins.update(common.getkv(parentprofile.stockimageorigins, "mms"))
    imageorigins.update(common.getkv(parentprofile.stockimageorigins, "drm"))
    def GetImageOrigins(self):
        return self.imageorigins

    # our targets are the same for all origins
    imagetargets={}
    imagetargets.update(common.getkv(parentprofile.stockimagetargets, "wallpaper",
                                      {'width': 132, 'height': 148, 'format': "JPEG"}))
    imagetargets.update(common.getkv(parentprofile.stockimagetargets, "pictureid",
                                      {'width': 132, 'height': 148, 'format': "JPEG"}))
    imagetargets.update(common.getkv(parentprofile.stockimagetargets, "fullscreen",
                                      {'width': 132, 'height': 160, 'format': "JPEG"}))
    # can the outside lcd display images?
    #imagetargets.update(common.getkv(parentprofile.stockimagetargets, "outsidelcd",
    #                                  {'width': 96, 'height': 64, 'format': "JPEG"}))
    
 
    def __init__(self):
        parentprofile.__init__(self)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.