Package phones :: Module com_lg :: Class LGDirectoryMedia
[show private | hide private]
[frames | no frames]

Class LGDirectoryMedia

Known Subclasses:
Phone

The media is stored one per directory with .desc and body files
Method Summary
  __init__(self)
  getindex(self, location, getmedia)
Returns an index based on the sub-directories of location.
  getmedia(self, maps, result, key)
Returns the contents of media as a dict where the key is a name as returned by getindex, and the value is the contents of the media
  getmediaindex(self, builtins, maps, results, key)
Gets the media (wallpaper/ringtone) index
  savemedia(self, mediakey, mediaindexkey, maps, results, merge, reindexfunction)
Actually saves out the media

Method Details

getindex(self, location, getmedia=False)

Returns an index based on the sub-directories of location. The key is an integer, and the value is the corresponding name

getmedia(self, maps, result, key)

Returns the contents of media as a dict where the key is a name as returned by getindex, and the value is the contents of the media

getmediaindex(self, builtins, maps, results, key)

Gets the media (wallpaper/ringtone) index
Parameters:
builtins - the builtin list on the phone
maps - the list of index files and locations
results - places results in this dict
key - key to place results in

savemedia(self, mediakey, mediaindexkey, maps, results, merge, reindexfunction)

Actually saves out the media
Parameters:
mediakey - key of the media (eg 'wallpapers' or 'ringtones')
mediaindexkey - index key (eg 'wallpaper-index')
maps - list index files and locations
results - results dict
merge - are we merging or overwriting what is there?
reindexfunction - the media is re-indexed at the end. this function is called to do it

Generated by Epydoc 2.1 on Fri Aug 15 18:58:37 2008 http://epydoc.sf.net