Package conduit :: Package modules :: Package iPodModule :: Module iPodModule :: Class IPodNoteTwoWay
[hide private]

Class IPodNoteTwoWay

source code


Stores Notes on the iPod. Rather than requiring a perfect transform to and from notes to the ipod note format I also store the original note data in a .conduit directory in the root of the iPod.

Notes are saved as title.txt and a copy of the raw note is saved as title.note

LUID is the note title

Instance Methods [hide private]
 
__init__(self, *args)
All sync functionality should be provided by derived classes
source code
 
_get_shadow_dir(self) source code
 
_get_note_from_ipod(self, uid)
Gets a note from the ipod, If the pickled shadow copy exists then return that
source code
 
_save_note_to_ipod(self, uid, note)
Save a simple iPod note in /Notes If the note has raw then also save that in shadowdir uid is the note title.
source code
 
_note_exists(self, uid) source code
conduit.DataType.DataType
get(self, LUID)
Returns data with the specified LUID.
source code
 
put(self, note, overwrite, LUID=None)
The LUID for a note in the iPod is the note title
source code
 
delete(self, LUID)
Deletes data with LUID.
source code

Inherited from IPodBase: finish, get_UID, get_all, refresh

Inherited from IPodBase (private): _get_unique_filename

Inherited from dataproviders.DataProvider.DataSource: add, get_changes, get_num_items

Inherited from dataproviders.DataProvider.DataProviderBase: configure, emit, emit_change_detected, get_configuration, get_configuration_xml, get_input_conversion_args, get_input_type, get_name, get_output_conversion_args, get_output_type, get_status, initialize, is_busy, is_configured, set_configuration, set_configuration_xml, set_status, uninitialize

Class Variables [hide private]
  _name_ = "Notes"
  _description_ = "Sync your iPod notes"
  _module_type_ = "twoway"
  _in_type_ = "note"
  _out_type_ = "note"
  _icon_ = "tomboy"
  ENCODING_DECLARATION = '<?xml encoding="utf-8"?>'

Inherited from dataproviders.DataProvider.DataProviderBase: __gsignals__, _category_, _configurable_

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
All sync functionality should be provided by derived classes
Overrides: IPodBase.__init__

get(self, LUID)

source code 

Returns data with the specified LUID. This function must be overridden by the appropriate dataprovider.

Derived classes should call this function to ensure the dataprovider status is updated.
Returns: conduit.DataType.DataType
An item of data
Overrides: dataproviders.DataProvider.DataSource.get
(inherited documentation)

put(self, note, overwrite, LUID=None)

source code 
The LUID for a note in the iPod is the note title
Overrides: dataproviders.DataProvider.DataSink.put

delete(self, LUID)

source code 
Deletes data with LUID.
Overrides: IPodBase.delete