Package conduit :: Package modules :: Module TestModule :: Class TestSource
[hide private]

Class TestSource

source code


Instance Methods [hide private]
 
__init__(self, *args) source code
 
refresh(self)
Performs any (conduit.logging in, etc) which must be undertaken on the dataprovider prior to calling get_all().
source code
 
get_all(self)
Returns an array of all the LUIDs this dataprovider holds.
source code
conduit.DataType.DataType
get(self, LUID)
Returns data with the specified LUID.
source code
 
add(self, LUID)
Adds an item to the datasource according to LUID.
source code
 
finish(self, aborted, error, conflict)
Perform any post-sync cleanup.
source code

Inherited from _TestBase: configure, get_UID, get_configuration, initialize

Inherited from _TestBase (private): _change_detected

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

Inherited from dataproviders.DataProvider.DataSource: get_changes, get_num_items

Class Variables [hide private]
  _name_ = "Test Source"
  _description_ = "Emits TestDataTypes"
  _category_ = DataProviderCategory.DataProviderCategory("Test")
  _module_type_ = "source"
  _in_type_ = "test_type"
  _out_type_ = "test_type"
  _icon_ = "go-next"
  DEFAULT_NUM_DATA = 10

Inherited from _TestBase: _configurable_

Inherited from dataproviders.DataProvider.DataProviderBase: __gsignals__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 
Overrides: _TestBase.__init__

refresh(self)

source code 

Performs any (conduit.logging in, etc) which must be undertaken on the dataprovider prior to calling get_all(). Should gather all information so a subsequent call to get_all() can return the uids of all the data this dataprovider holds

This function may be called multiple times so derived classes should be aware of this.

Derived classes should call this function to ensure the dataprovider status is updated.
Overrides: dataproviders.DataProvider.DataProviderBase.refresh
(inherited documentation)

get_all(self)

source code 
Returns an array of all the LUIDs this dataprovider holds.
Overrides: dataproviders.DataProvider.DataSource.get_all
(inherited documentation)

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)

add(self, LUID)

source code 
Adds an item to the datasource according to LUID. This method is used by the DBus interface
Returns:
True if the data was successfully added
Overrides: dataproviders.DataProvider.DataSource.add
(inherited documentation)

finish(self, aborted, error, conflict)

source code 
Perform any post-sync cleanup. For example, free any structures created in refresh that were used in the synchronization.
Overrides: dataproviders.DataProvider.DataProviderBase.finish
(inherited documentation)