Package phones :: Module com_lgvx4400 :: Class Phone
[hide private]
[frames] | no frames]

Class Phone

source code

               object --+    
                        |    
          com_phone.Phone --+
                            |
com_brew.RealBrewProtocol --+
                            |
       com_lg.LGPhonebook --+
                            |
    com_lg.LGIndexedMedia --+
                            |
                           Phone
Known Subclasses:

Talk to the LG VX4400 cell phone

Nested Classes [hide private]

Inherited from com_brew.RealBrewProtocol: DirCache

Instance Methods [hide private]
 
__init__(self, logtarget, commport)
Calls all the constructors and sets initial modes
source code
 
getfundamentals(self, results)
Gets information fundamental to interopating with the phone and UI.
source code
 
savesms(self, result, merge) source code
 
_setquicktext(self, result) source code
 
getsms(self, result) source code
 
_readsms(self) source code
 
_getquicktext(self) source code
 
_getinboxmessage(self, sf) source code
 
_getoutboxmessage(self, sf) source code
 
_get_text_from_sms_msg_without_header(self, msg, num_septets) source code
 
_get_text_from_sms_msg_with_header(self, msg, num_septets) source code
 
_getsender(self, raw, len) source code
 
getcallhistory(self, result) source code
 
_readhistoryfile(self, fname, folder, res) source code
 
getwallpaperindices(self, results) source code
 
getringtoneindices(self, results) source code
 
getphonebook(self, result)
Reads the phonebook data.
source code
 
getgroups(self, results) source code
 
savegroups(self, data) source code
 
savephonebook(self, data)
Saves out the phonebook
source code
 
_findserial(self, serial, dict)
Searches dict to find entry with matching serial.
source code
 
_normaliseindices(self, d)
turn all negative keys into positive ones for index
source code
 
extractphonebookentry(self, entry, speeds, fundamentals)
Return a phonebook entry in BitPim format.
source code
 
_assignpbtypeandspeeddialsbyposition(self, entry, speeds, res) source code
 
_assignpbtypeandspeeddialsbytype(self, entry, speeds, res) source code
 
_findmediainindex(self, index, name, pbentryname, type) source code
 
makeentry(self, counter, entry, data)
Creates pbentry object
source code
 
is_mode_brew(self) source code
 
get_detect_data(self, res) source code
 
get_esn(self, data=None) source code
 
eval_detect_data(self, res) source code
 
getcalendar(self, result) source code
 
savecalendar(self, dict, merge) source code
 
_build_cal_repeat(self, event, exceptions) source code
 
_get_voice_id(self, event, entry) source code
 
_build_cal_entry(self, event, exceptions, ringtone_index) source code
 
get_cal(self, sch_file, exceptions, ringtone_index) source code
 
_set_repeat_event(self, event, entry, exceptions) source code
 
_set_alarm(self, event, entry) source code
 
_set_voice_id(self, event, entry, voice_files) source code
 
_set_cal_event(self, event, entry, exceptions, ringtone_index, voice_files) source code
 
set_cal(self, sch_file, cal_dict, ringtone_index, voice_files) source code
 
getmemo(self, result) source code
 
savememo(self, result, merge) source code

Inherited from com_phone.Phone: alert, close, log, logdata, progress, raisecommsdnaexception, raisecommsexception, readobject, setmode, writeobject

Inherited from com_phone.Phone (private): _setmodemodem

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from com_brew.RealBrewProtocol: basename, dirname, exists, explore0c, get_brew_esn, getfilecontents, getfilesystem, getfirmwareinformation, hassubdirs, isdir, isfile, join, listfiles, listsubdirs, mkdir, mkdirs, modemmoderequest, offlinerequest, rmdir, rmdirs, rmfile, sendbrewcommand, setfileattr, statfile, writefile

Inherited from com_brew.RealBrewProtocol (private): _setmodebrew

Inherited from com_lg.LGPhonebook: sendpbcommand

Inherited from com_lg.LGIndexedMedia: getindex, getmedia, getmediaindex, getringtones, getwallpapers, savemedia, saveringtones, savewallpapers

Class Methods [hide private]
 
detectphone(_, coms, likely_ports, res, _module, _log) source code
Class Variables [hide private]
  desc = 'LG-VX4400'
  helpid = 'phone-lgvx4400.htm'
  wallpaperindexfilename = 'dloadindex/brewImageIndex.map'
  ringerindexfilename = 'dloadindex/brewRingerIndex.map'
  protocolclass
Various descriptions of data specific to LG VX4400
  serialsname = 'lgvx4400'
  imagelocations = ((10, 'dloadindex/brewImageIndex.map', 'brew/...
  ringtonelocations = ((50, 'dloadindex/brewRingerIndex.map', 'u...
  builtinimages = ('Balloons', 'Soccer', 'Basketball', 'Bird', '...
  builtinringtones = ('Ring 1', 'Ring 2', 'Ring 3', 'Ring 4', 'R...
  brew_version_txt_key = 'brew_version.txt'
  brew_version_file = 'brew/version.txt'
  lgpbinfo_key = 'lgpbinfo'
  esn_file_key = 'esn_file'
  esn_file = 'nvm/$SYS.ESN'
  my_model = 'VX4400'
  _repeat_values = {17: 'daily', 18: 'daily', 19: 'weekly', 20: ...
  _alarm_info = {-1: (0, 100, 100), 0: (1, 0, 0), 5: (2, 5, 0), ...
  _default_alarm = (0, 100, 100)
  _phone_dow = {1: 2048, 2: 1024, 4: 512, 8: 256, 16: 128, 32: 6...

Inherited from com_phone.Phone: MODEMODEM, MODENONE, getplaylist, gett9db, gettodo

Inherited from com_brew.RealBrewProtocol: MODEBREW, brewterminator

Inherited from com_brew.RealBrewProtocol (private): _brewepochtounix

Inherited from com_lg.LGPhonebook: MODEPHONEBOOK, pbterminator

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, logtarget, commport)
(Constructor)

source code 

Calls all the constructors and sets initial modes

Overrides: com_lg.LGIndexedMedia.__init__

getfundamentals(self, results)

source code 

Gets information fundamental to interopating with the phone and UI.

Currently this is:

  • 'uniqueserial' a unique serial number representing the phone
  • 'groups' the phonebook groups
  • 'wallpaper-index' map index numbers to names
  • 'ringtone-index' map index numbers to ringtone names

This method is called before we read the phonebook data or before we write phonebook data.

getsms(self, result)

source code 
Overrides: getsms

getcallhistory(self, result)

source code 
Overrides: getcallhistory

getphonebook(self, result)

source code 

Reads the phonebook data. The getfundamentals information will already be in result.

_findserial(self, serial, dict)

source code 

Searches dict to find entry with matching serial. If not found, returns None

extractphonebookentry(self, entry, speeds, fundamentals)

source code 

Return a phonebook entry in BitPim format. This is called from getphonebook.

makeentry(self, counter, entry, data)

source code 

Creates pbentry object

Parameters:
  • counter - The new entry number
  • entry - The phonebook object (as returned from convertphonebooktophone) that we are using as the source
  • data - The main dictionary, which we use to get access to media indices amongst other things

getmemo(self, result)

source code 
Overrides: getmemo

Class Variable Details [hide private]

protocolclass

Various descriptions of data specific to LG VX4400

Value:
phones.p_lgvx4400

imagelocations

Value:
((10, 'dloadindex/brewImageIndex.map', 'brew/shared', 'images', 30))

ringtonelocations

Value:
((50,
  'dloadindex/brewRingerIndex.map',
  'user/sound/ringer',
  'ringers',
  30))

builtinimages

Value:
('Balloons',
 'Soccer',
 'Basketball',
 'Bird',
 'Sunflower',
 'Puppy',
 'Mountain House',
 'Beach')

builtinringtones

Value:
('Ring 1',
 'Ring 2',
 'Ring 3',
 'Ring 4',
 'Ring 5',
 'Ring 6',
 'Voices of Spring',
 'Twinkle Twinkle',
...

_repeat_values

Value:
{17: 'daily', 18: 'daily', 19: 'weekly', 20: 'monthly', 21: 'yearly'}

_alarm_info

Value:
{-1: (0, 100, 100),
 0: (1, 0, 0),
 5: (2, 5, 0),
 10: (3, 10, 0),
 60: (4, 0, 1),
 1440: (5, 0, 24),
 2880: (6, 0, 48)}

_phone_dow

Value:
{1: 2048, 2: 1024, 4: 512, 8: 256, 16: 128, 32: 64, 64: 32}