Package conduit :: Module Conduit :: Class Conduit
[hide private]

Class Conduit

source code


Model of a Conduit, which is a one-to-many bridge of DataSources to DataSinks.

Instance Methods [hide private]
 
__init__(self, syncManager, uid="")
Makes and empty conduit ready to hold one datasource and many datasinks
source code
 
_parameters_changed(self) source code
 
_change_detected(self, arg) source code
 
emit(self, *args)
Override the gobject signal emission so that all signals are emitted from the main loop on an idle handler
source code
 
add_dataprovider(self, dataprovider_wrapper, trySourceFirst=True)
Adds a dataprovider to the conduit.
source code
 
get_dataprovider_position(self, dataproviderWrapper)
Returns the dp position, Source = 0,0 Sink = 1, index
source code
 
is_busy(self)
Returns True if the conduit is currenlty performing a synchronisation operaton on one or more of its contained DataProviders
source code
 
can_sync(self)
Returns True if this conduit can be synchronized.
source code
 
get_dataproviders_by_key(self, key)
Use list comprehension to return all dp's with a given key
source code
 
get_all_dataproviders(self)
Returns: A list of dataproviders with a given key
source code
 
is_empty(self)
Returns: True if the conduit contains no dataproviders
source code
 
delete_dataprovider(self, dataprovider)
Deletes dataprovider
source code
 
can_do_two_way_sync(self)
Checks if the conduit is eleigable for two way sync, which is true if it has one source and once sink.
source code
 
enable_two_way_sync(self) source code
 
disable_two_way_sync(self) source code
 
is_two_way(self) source code
 
enable_slow_sync(self) source code
 
disable_slow_sync(self) source code
 
do_slow_sync(self) source code
 
enable_auto_sync(self) source code
 
disable_auto_sync(self) source code
 
do_auto_sync(self) source code
 
get_policy(self, policy) source code
 
set_policy(self, policy, value) source code
 
change_dataprovider(self, oldDpw, newDpw)
called when dpw becomes unavailable.
source code
 
refresh_dataprovider(self, dp, block=False) source code
 
refresh(self, block=False) source code
 
sync(self, block=False) source code
 
emit_conflict(self, conflict) source code
 
resolved_conflict(self, conflict) source code
Class Variables [hide private]
  __gsignals__ = {"dataprovider-added":(gobject.SIGNAL_RUN_LAST,...
Instance Variables [hide private]
conduit.Module.ModuleWrapper[] datasinks
List of DataSinks to synchronize to
conduit.Module.ModuleWrapper datasource
The DataSource to synchronize from
Method Details [hide private]

add_dataprovider(self, dataprovider_wrapper, trySourceFirst=True)

source code 
Adds a dataprovider to the conduit.
Parameters:

can_sync(self)

source code 
Returns True if this conduit can be synchronized. It must have a source and a sync, that are not pending

get_dataproviders_by_key(self, key)

source code 
Use list comprehension to return all dp's with a given key
Returns:
A list of dataproviders with a given key

get_all_dataproviders(self)

source code 
Returns:
A list of dataproviders with a given key

is_empty(self)

source code 
Returns:
True if the conduit contains no dataproviders

can_do_two_way_sync(self)

source code 
Checks if the conduit is eleigable for two way sync, which is true if it has one source and once sink. Two way doesnt make sense in any other case

Class Variable Details [hide private]

__gsignals__

Value:
{"dataprovider-added":(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [go\
bject.TYPE_PYOBJECT]), "dataprovider-removed":(gobject.SIGNAL_RUN_LAST\
, gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT]), "dataprovider-changed":\
(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, [gobject.TYPE_PYOBJECT, g\
object.TYPE_PYOBJECT]), "parameters-changed":(gobject.SIGNAL_RUN_LAST,\
 gobject.TYPE_NONE, []), "sync-conflict":(gobject.SIGNAL_RUN_LAST, gob\
ject.TYPE_NONE, [gobject.TYPE_PYOBJECT]), "sync-completed":(gobject.SI\
GNAL_RUN_LAST, gobject.TYPE_NONE, [gobject.TYPE_BOOLEAN, gobject.TYPE_\
...